rofl0r / rofl0r/microsocks

Trying IPv6 sockets w/ IPv6 being available but down, leads to connection failures

Open
#72 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
2.2k
Forks
353
Avg merge
1h 4m
Merged PRs (30d)
1

Description

This is ... kinda silly? I'm going to work around it for now by using -b but it would be nice to update socket logic to try different hosts.

The TL;DR is:

  • resolve() returns the host list
  • connect_socks_target() only tries /one/ entry in the list
  • github.com returns only A records
  • freebsd.org git repo IPs return AAAA and A records
  • my interfaces have local v6 addresses but currently (for stupid reasons) no global v6 addresses
  • so, if I try connecting to freebsd.org hosts, it will see AAAA is likely fine, bind() ok, connect() hits "HOST_UNREACHABLE" and bam.

It would be nice if instead it could loop over the hosts returned by getaddrinfo() and try them until one succeeds?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with resolve() and connect_socks_target(), which the issue identifies as producing and consuming the host list. Check how getaddrinfo() results are handled, then verify that connection attempts continue through the returned hosts after an unreachable IPv6 address until one succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.