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

Update dialer to prefer IPv6 #600

Closed
wants to merge 1 commit into from
Closed

Conversation

theluckiestsoul
Copy link
Contributor

Fix #1115

This PR introduces a new dialer function, preferIPV6Dialer, and a helper function, tcpAddrPrefer6IPv4Fallback. The preferIPV6Dialer function prefers IPv6 addresses when establishing network connections. If it fails to connect via IPv6, it falls back to the original network (likely IPv4). The tcpAddrPrefer6IPv4Fallback function attempts to resolve the hostport string into an IPv6 address, and if it fails, it falls back to IPv4.

@theluckiestsoul theluckiestsoul marked this pull request as draft February 21, 2024 13:50
@theluckiestsoul theluckiestsoul self-assigned this Feb 21, 2024
@theluckiestsoul theluckiestsoul deleted the feat/enable-ipv6 branch February 22, 2024 13:11
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.

1 participant