Skip to content

Conversation

@astro
Copy link
Contributor

@astro astro commented Nov 25, 2014

Depends on the next versions of the following modules:

  • string2compat
  • compat2string
  • addr-to-ip-port

You can test with torrents from Bitlove.org, the tracker always returns the IPv4 & IPv6 address of the prittorrent seeder.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there ever a time when an IPv6 address won't have a : character? What is this check for?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my reading of the spec, the peers6 key should only contain ipv6 addresses.

peers6 contains address-port pairs where the addresses are all IPv6

And IPv6 addresses seem to always have : because that's the delimiter. So I can't figure out what this line is for.

I'll remove it for now, but let me know if it's important and we can re-add it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was adding some tolerance in #40, and because the non-compact format essentially allows free-form hostnames, why not check if this is an IPv6 address at all?

It's not important to me and might lead interoperating people to assume a false level of flexibility in the HTTP tracker protocol.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see what you're saying. It's not hard to check if it's a domain, so let's do it.

@feross
Copy link
Member

feross commented Nov 26, 2014

Okay, this is all merged and published as 2.9.0 now! Thanks for all the awesome PRs, @astro!

@feross feross closed this Nov 26, 2014
@feross
Copy link
Member

feross commented Nov 26, 2014

Also, I added you as a collaborator on this repo. Please read CONTRIBUTING.md and enjoy!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoa! Discovered a bigger bug. This should be data.peers6.forEach! Will fix. ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oopsie. Ideally, we'd cover this with tests...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once we support ipv6 on the server (#43) we can easily add a test that tests both sides of this. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants