outline-sdk icon indicating copy to clipboard operation
outline-sdk copied to clipboard

smart-proxy should support internationalized DNS

Open ohnorobo opened this issue 7 months ago • 1 comments

smart-proxy should handle internationalized unicode domains names. ex: https://grüße.de

Current behavior

Requesting an internationalized domain name fails to dial

go run -C ./examples/smart-proxy/ . -v -localAddr=localhost:1080 --transport="" --domain grüße.de  --config=/Users/laplante/Projects/outline-sdk/x/examples/smart-proxy/config_strategy_example.yaml
Finding strategy
🏃 run DNS: system: {}
 (domain: grüße.de.)
🏁 got DNS: system: {}
 (domain: grüße.de.), duration=133.848958ms, ips=[87.98.247.5], status=ok ✅
🏆 selected DNS resolver system: {}
 in 0.13s

🏃 running test: 'tlsfrag:010' (domain: grüße.de.)
🏁 failed TLS handshake: 'tlsfrag:010' (domain: grüße.de.), duration=209.151417ms, handshake=read tcp 192.168.0.180:50566->87.98.247.5:443: read: connection reset by peer ❌
2025/08/07 18:51:49 Failed to find dialer: could not find TLS strategy: all tests failed
exit status 1

Requesting the punycode equivalent succeeds (so we do have a workaround)

go run -C ./examples/smart-proxy/ . -v -localAddr=localhost:1080 --transport="" --domain xn--gre-6ka8l.de  --config=/Users/laplante/Projects/outline-sdk/x/examples/smart-proxy/config_strategy_example.yaml
Finding strategy
🏃 run DNS: system: {}
 (domain: xn--gre-6ka8l.de.)
🏁 got DNS: system: {}
 (domain: xn--gre-6ka8l.de.), duration=4.251792ms, ips=[185.53.178.50], status=ok ✅
🏆 selected DNS resolver system: {}
 in 0.00s

🏃 running test: 'tlsfrag:010' (domain: xn--gre-6ka8l.de.)
🏁 success: 'tlsfrag:010' (domain: xn--gre-6ka8l.de.), duration=127.419209ms, status=ok ✅
🏆 selected TLS strategy 'tlsfrag:010' in 0.13s

Found strategy in 0.13s
Proxy listening on 127.0.0.1:1080

After the tunnel is correctly setup, requesting the unicode domain through curl works fine

curl -p -x http://localhost:1080 https://grüße.de -m 20
[... successful fetch ...]

Expected behavior

Setting up smart-proxy with international domains names should work.

ohnorobo avatar Aug 07 '25 17:08 ohnorobo

go run -C ./examples/smart-proxy/ . -v -localAddr=localhost:1080 --transport="" --domain grüße.de --config=/Users/laplante/Projects/outline-sdk/x/examples/smart-proxy/config_strategy_example.yaml Finding strategy 🏃 run DNS: system: {} (domain: grüße.de.) 🏁 got DNS: system: {} (domain: grüße.de.), duration=133.848958ms, ips=[87.98.247.5], status=ok ✅ 🏆 selected DNS resolver system: {} in 0.13s

🏃 running test: 'tlsfrag:010' (domain: grüße.de.) 🏁 failed TLS handshake: 'tlsfrag:010' (domain: grüße.de.), duration=209.151417ms, handshake=read tcp 192.168.0.180:50566->87.98.247.5:443: read: connection reset by peer ❌ 2025/08/07 18:51:49 Failed to find dialer: could not find TLS strategy: all tests failed exit status 1

pbg97365-dev avatar Sep 04 '25 09:09 pbg97365-dev