<<

SOCKS Protocol Version 6

draft-olteanu-intarea--6-08 Vladimir Olteanu

IETF 106

What’s new

● DNS provided by SOCKS ● Options for at the proxy

Clients need DNS-like features

● A and AAAA – LD_PRELOAD for non-SOCKS-aware apps: gedaddrinfo() separate from connect() – Happy Eyeballs: need to do queries separately ● TXT – ESNI ● MX, Service Binding, etc. –

Providing DNS-like features

● Individual SOCKS options (removed in -08) – Have to keep up with use cases – Duplicate DNS functionality – Until -07: A, AAAA, PTR ● Having the use DNS – Hard to convey policies: resolver IPs, plaintext / over TLS / over HTTPS etc., maybe credentials, etc. – Provide a DNS proxy

Why not separate DNS from SOCKS?

Client Proxy HTTP/SOCKS :1080 HTTP :80

DNS :53

Why not separate DNS from SOCKS?

Client HTTP/SOCKS :1080 HTTP :80

DNS :53 WHICH CIRCUIT?

● Need context for DNS query

– Otherwise: privacy leaks, suboptimal CDN use DNS provided by SOCKS

● Clients make CONNECT request to 0.0.0.0:53 – Proxy needn’t provide a valid bind address ● Plaintext DNS over SOCKS (opt. over TLS) – TCP by default: SOCKS + UDP more cumbersome to use ● Implementation in Sixtysocks – Run separate DNS proxy locally – Translate 0.0.0.0:53 to 127.0.0.1:53

Happy Eyeballs

● RFC 8305: resolve and connect to a server using both IPv4 and IPv6, keep only one connection – Failover from IPv6 to IPv4 – Better responsiveness if one is faster ● Clients can implement Happy Eyeballs locally – Have DNS + CONNECT

Happy Eyeballs: client vs proxy R esolv e som esite .org x 2: A + AAAA

CO NNEC T x2: IPv4 + IPv6 S YN x2 X

ESS SUCC C (High RTT) P S

Happy Eyeballs: client vs proxy R CO esolve NNE som CT so esite. mesi org x2 te.org : A + w/ Ey AAAA eballs S YN x2 X

CONN ECT x 2: IPv 4 + IP v6 ESS S SUCC YN x2 X

ESS SUCC

C (High RTT) P S C (High RTT) P S ● Sometimes it’s a lot better if the proxy does it Happy Eyeballs at the proxy

● Request MUST have a 1 2 3 ● At the minimum: retry using 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 IPv4 if IPv6 fails +------+------+ | Kind = 1 | Length = 8 | ● No knobs from RFC8305 +---+------+------+------+ (yet) | 2 | Level = 1 | Code = 2 | Padding = 0 | +---+------+------+------+ ● Caveat: Happy Eyeballs +

TFO Happy Eyeballs option