Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect dual stack environments and show both IPv4 and IPv6 #10

Open
jamesmacwhite opened this issue Jun 7, 2015 · 4 comments
Open

Detect dual stack environments and show both IPv4 and IPv6 #10

jamesmacwhite opened this issue Jun 7, 2015 · 4 comments

Comments

@jamesmacwhite
Copy link
Contributor

Been testing ipMagnet out on my setup. I have a properly configured dual IPv4 and IPv6 (Provided by a tunnel broker service). ipMagnet correctly detects my IPv6, but because PHP defaults to IPv6 if its configured, it only shows the IPv6 address, my IPv4 is never shown.

IPv6 adoption is still very much rolling out, so a lot of torrent traffic will be going over IPv4 still. There aren't exactly hundreds of IPv6 trackers around right now.

As a future enhancement, ipMagnet should potentially do away with using $_SERVER["REMOTE_ADDR"] and instead switch to doing small IPv4 and IPv6 requests to test pages instead, in order to detect dual stack and provide both IPv4 and IPv6 address data.

@jamesmacwhite jamesmacwhite changed the title Detect dual stack enviorments and show both IPv4 and IPv6 Detect dual stack environments and show both IPv4 and IPv6 Jun 7, 2015
@cbdevnet
Copy link
Owner

One problem would be that performing additional requests from the client would require the use of Javascript (which currently is optional). The interface currently states that the address displayed is the one used to access the site, implying that it is not necessarily the one used for torrents or anything else, for that matter.

This might not be immediately obvious to most users, though.

Adding support for detecting more addresses (though still not necessarily all, due to IPv6 privacy extensions/stateless autoconfig/routing decisions) would also mean either providing static detection endpoints (which would be problematic from a privacy/decentralization standpoint) or including code and documentation for setting those up, which is a lot more advanced than what the current software requires...

@jamesmacwhite
Copy link
Contributor Author

Just to clarify, detecting the client IP when accessing ipMagnet from a web browser was not what I was referring to. If the client being reported as viewing the ipMagnet web page is IPv6 that's fine, it is the default to report IPv6 clients if valid.

My original post was more about the magnet torrent in a BitTorrent client picking up both IPv4 and IPv6 and reporting those values in the tracker information if a valid dual stack environment is found. Due to low IPv6 adoption rates in various parts of the world currently. I find only reporting on the IPv6 address only as a functional issue, but understand the behaviour is valid.

You are right, detecting this would require additional endpoints and JavaScript, so privacy is a concern and perhaps goes against the original project. I was just throwing it out there as a potential enhancement.

@schwabe
Copy link

schwabe commented Aug 30, 2016

You should also have two dns addtional dns names in the magnet links, one v4 only and one v6 only to see what extra addresses the clients adds to the request in these cases (the &ipv6= or &ip= parameters)

@cbdevnet
Copy link
Owner

cbdevnet commented Sep 1, 2016

That would be a viable idea to detect used IPv6 addresses, the problem I see would be the additional setup steps that would need to be taken by self-hosted instances in order to provide IPv6-only tracker URLs. However, I could see adding this as an option for experienced users.

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

No branches or pull requests

3 participants