Possible issue on dns resolution
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 2.2k
- Forks
- 353
- Avg merge
- 1h 4m
- Merged PRs (30d)
- 1
Description
Hello,
I am using microsocks in a Debian 12 OS and all works fine, except one thing:
Sometimes with some websites the socks5 connection fails with "host unreachable" error:
socks connect tcp 1.2.3.4:1080->www.hugedomains.com:443: unknown error host unreachable
I found that another user reported a similar issue in the past:
https://github.com/rofl0r/microsocks/issues/40#issuecomment-898233932
And the suggested solution to edit /etc/gai.conf and uncomment this line:
precedence ::ffff:0:0/96 100
But I still get occasional "host unreachable" errors.
Here is the "host" output for both domains:
host 10ksolutions.com
10ksolutions.com is an alias for traff-1.hugedomains.com.
traff-1.hugedomains.com is an alias for hdr-nlb9-41371129e8304c29.elb.us-east-1.amazonaws.com.
hdr-nlb9-41371129e8304c29.elb.us-east-1.amazonaws.com has address 52.71.57.184
hdr-nlb9-41371129e8304c29.elb.us-east-1.amazonaws.com has address 54.209.32.212
host www.hugedomains.com
www.hugedomains.com has address 104.26.7.37
www.hugedomains.com has address 172.67.70.191
www.hugedomains.com has address 104.26.6.37
www.hugedomains.com has IPv6 address 2606:4700:20::ac43:46bf
www.hugedomains.com has IPv6 address 2606:4700:20::681a:625
www.hugedomains.com has IPv6 address 2606:4700:20::681a:725
Any idea as to why it is failing in this case?
PS: I am running microsocks like this:
microsocks -p 1080
And the VPS has both IPv4 and IPv6 address.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the failure with microsocks -p 1080 on Debian 12 using a dual-stack VPS, then compare DNS results and connection attempts for 10ksolutions.com and www.hugedomains.com. Review the behavior around IPv4 and IPv6 destination selection; done means identifying the cause of the intermittent host-unreachable errors and documenting or fixing the confirmed behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100