-
Notifications
You must be signed in to change notification settings - Fork 45
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
IPv6 not working on version 1.5.9 #6
Comments
This project is a fork of the vuze plugin. The plugin source can be found at http://dev.vuze.com/ I'll leave this issue open since I might try to unify the projects eventually, but that's unlikely to happen in the short-term. As a workaround you could open the .jar file of the previous working version and edit it to have a higher version number so it doesn't auto-update |
Hey, parg here :) If you get a chance perhaps you could check out https://github.com/BiglySoftware and https://github.com/BiglySoftware/BiglyBT-plugin-mlDHT - unification would be awesome! |
The idea would be stripping the plugin the DHT implementation itself, just leaving the UI, peer source integration and scheduling and deferring to this repo for the heavy lifting. |
Agreed - I've been vaguely maintaining the plugin over the years, only enough to keep things running really. At least BiglyBT is Java 8 as well... |
Just for fun I deleted the 'kad' package and DHTConfiguration.java from the Vuze/BiglyBT plugin and linked it to your latest and greatest and there were only 31 errors - would you have a few cycles to take a look at them? If not I'll start working through them to see what I can figure out. |
If you have specific questions I can help, but beyond that I have little spare capacity. |
Totally understand :) The one area that I currently could do with some help with is the ability to specify restricted bind-ips. In the Vuze plugin AddressUtils uses InetAddress[] allBindAddresses = NetworkAdmin.getSingleton().getAllBindAddresses(true); as the starting point for figuring out what to use. In your repo AddressUtils has, I think, two methods that would need to respect the required bind ips: getAvailableGloballyRoutableAddrs and getDefaultRoute Is this right? What do you think is the best way of dealing with this? For the available routable addresses I guess they could be filtered by the required IP set? For the default route this could perhaps just be set to (one of) the required bind ips? cheers |
I think the right approach is to extend |
I have implemented that approach in in 02a8328 |
Great! I'm away for a few days but will hack around with it when I get back
- cheers
…On Fri, Aug 4, 2017 at 9:40 PM, the8472 ***@***.***> wrote:
I have implemented that approach in in 02a8328
<02a8328>
Didn't have time to test it though. See if it works for you.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAYIHfu7vDexYtbovnWqQfoDIq_qoSl5ks5sU4GtgaJpZM4N13Ph>
.
|
@the8472 , hi! I've tested your change, and it works fine. There's one subtle gotcha with this approach, if the library user decides to use equality check as a predicate, then he has to know that in terms of Java objects IPv4 any-local is not equal to IPv6 any-local (due to how |
This is actually intentional. If you have a whitelist of allowed bind addresses, netmasks and interface names, e.g. This is a common pattern in daemon configuration files.
That's actually platform and configuration-specific. openjdk certainly tries to use dual-stack sockets by default, but it doesn't guarantee it. You can also explicitly specify a ProtocolFamily when opening a socket, mldht does this because the address family matters greatly to the DHT (BEP5 and BEP32 are separate networks). But for privacy-conscious users this can matter too, e.g. they might have a IPv4 default route through a VPN but the VPN does not support IPv6 at all or just add one route among many, making the host multi-homed. In that case |
Thank you for the explanation, I didn't even think about multihoming and complex configurations. |
I was thinking of doing something similar in my project, and realized that |
There might be some use-cases for preference-ordered binding, but I can't think of one right now. |
E.g. when I'm at work, I don't want to be a jerk and prefer to exclusively use a 4G modem for torrents. But if I ran out of money, I still need to watch my Game of Thrones S8E10, so I fall back to employer's Wi-Fi. Though it may sound a bit artificial :D |
In the case of single-homing you can simply tell mldht to use that single address. You can change the predicate as needed, mldht doesn't cache it. |
Of course, but the point was exactly that no configuration change would be required. If we put my case in a more formal way:
Then it can be described with a list of two predicates:
Which can then be statically defined in the application-level configuration, so I don't need to think about this matter each time I launch the app. For sure, switching between rules can be handled on the application level, but it will effectively require re-implementing what is already present in the library (I can see that there is a scheduled periodic task for updating bindings on the fly). But yeah, it's definitely possible to perform analogous checks in the application and restart mldht (or update the DHTConfiguration instance). |
mldht already has a fairly complicated internal ruleset for interface selection in single-homed mode because the goal is to avoid binding to the wildcard address whenever possible and the approaches differ for ipv4 and ipv6. I want to avoid pushing application level concerns into that. |
@psychic717 next BiglyBT mldht plugin version (2.2 presumably) will use this library again, so if you still see ipv6 problems with that I can help. |
2.2 is live for beta users |
Closing, please reopen if you still are facing ipv6 issues. |
I didn't know another way to contact the people responsible for the plugin, so I'm writing here.
I'm sorry if this isn't the right place.
Basically I tried everything to make mlDHT IPv6 to go past "Stopped" but nothing fixed it (disabling firewall, checking NAT settings, changing ports etc).
So now I decided to try the previous version (1.5.7) and it suddently started "Running" again.
I just thought you should know. It doesn't seem to be an issue with my connection/system because the previous version starts running as soon as Vuze starts, while 1.5.9 starts "Stopped" and stays like this with no change no matter how much time passes.
Thanks.
P.S: IPv4 has no issues on either the versions.
The text was updated successfully, but these errors were encountered: