You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to customize the dialer so that it can dial outgoing connection using IPv6 address.
However, this library will prefer DNS resolution by default. In a dual-stack environment and the client use socks5h (which means the hostname will not be resolved by the client), the resolved IP address might be IPv4, thus making the dialing failed.
Although I found a workaround that can pretend the name resolution success with empty result:
It depends on the fallback of the error case, so it's not ideal to implement like this.
Considering we need to have backwards compatibility, we also can't change the resolve logic here:
So what I'm trying to do is that, I want to use user a for IPv4 outbound and b for IPv6 outbound.
Although I can use ctx for storing user information, it will be way easier if we have the option to skip the domain resolution.
I want to customize the dialer so that it can dial outgoing connection using IPv6 address.
However, this library will prefer DNS resolution by default. In a dual-stack environment and the client use
socks5h
(which means the hostname will not be resolved by the client), the resolved IP address might be IPv4, thus making the dialing failed.Although I found a workaround that can pretend the name resolution success with empty result:
And it can trick the address formatter to use the FQDN instead:
go-socks5/statute/addr.go
Lines 19 to 26 in 6191a34
It depends on the fallback of the error case, so it's not ideal to implement like this.
Considering we need to have backwards compatibility, we also can't change the resolve logic here:
go-socks5/handle.go
Lines 50 to 65 in 6191a34
So I'm creating an issue looking for ideas to solve this issue.
The text was updated successfully, but these errors were encountered: