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

UDP trackers resolving to IPv6 on IPv4 only system #7776

Open
autogris opened this issue Oct 28, 2024 · 1 comment
Open

UDP trackers resolving to IPv6 on IPv4 only system #7776

autogris opened this issue Oct 28, 2024 · 1 comment

Comments

@autogris
Copy link

libtorrent version (or branch): 2.0.11 (24e658a)

platform/architecture: Linux x86_64

compiler and compiler version: gcc 14.2.0

please describe what symptom you see, what you would expect to see instead and
how to reproduce it.

I'm running libtorrent through a SOCKS5 proxy, checking the proxy logs it shows that UDP connections are resolving to ipv6 address, but neither the client nor the server have ipv6 enabled, so the connection fails. The client side (tried with Deluge and qBittorent) resolves the hostname locally not through the proxy/server. Is there any settings or workaround to force libtorrent resolve to ipv4? Curiously, TCP connections uses ipv4 correctly.

@arvidn
Copy link
Owner

arvidn commented Nov 9, 2024

checking the proxy logs it shows that UDP connections are resolving to ipv6 address

What do you mean by a "connection" resolving to an address? Typically hostnames resolve to IP addresses. If you have a hostname to a UDP tracker that resolves to an IPv6 address, I would guess that it also resolves to an IPv4 address. libtorrent will attempt to contact the IPv6 address. If that fails, move down the list of resolved IPs and try those.

Is that not happening?
Is the hostname resolving only to an IPv6 address?

SOCKS5 supports talking to peers by just specifying their hostname, letting the proxy resolve it to an IP address. Is that your scenario, where the proxy is resolving it to IPv6 and then failing?

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

No branches or pull requests

2 participants