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

fix:TCPInterface: Try connect to both IPv4 & IPv6 #679

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

skyguy
Copy link

@skyguy skyguy commented Jan 18, 2025

I noticed last night that RNS couldn't connect to the Chaosnet node (rns.c3.jitter.eu) IPv6 as it was firewalled and refusing connections, but RNS never tried the IPv4 address.

This change uses the socket.create_connection function to run the Happy Eyeballs procedure of resolving all addresses and trying to connect to them until 1 succeeds.

-Kevin

Fixes the problem where if a target host has both an IPv6 and IPv4
address, RNS only connects to the IPv6 address, even if it is down.
(target_ip here is sourced from the config file target_host entry, so
could also be a hostname, but socket.create_connection will resolve it)

Signed-off-by: Kevin Steen <code at kevinsteen.net>
@gretel
Copy link
Contributor

gretel commented Jan 20, 2025

I noticed last night that RNS couldn't connect to the Chaosnet node (rns.c3.jitter.eu) IPv6 as it was firewalled and refusing connections, but RNS never tried the IPv4 address.

yea that's right, ipv6 is not available right now on this node. working on it.

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