-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Regression] Local DNS now defaults to tcp_only
mode, causing UDP-only clients to fail
#1281
Comments
I just noticed today that local DNS is just not working at all in 1.16.0. Connections are all getting refused. So this is a serious regression. I'll take a look at the problematic commit and see what I can do. |
dns_relay
hangs indefinitelydns_relay
hangs indefinitely
Ah okay. After some investigation it seems like the issue is less severe than I thought. So in 1.15.4, the local DNS client will always create a TCP and a UDP server regardless of the mode configured: shadowsocks-rust/crates/shadowsocks-service/src/local/dns/server.rs Lines 76 to 88 in 16f280c
But in 1.16.0, the mode is now respected: shadowsocks-rust/crates/shadowsocks-service/src/local/dns/server.rs Lines 100 to 117 in 5f8fd17
This is a good change in theory; unfortunately it had the side-effect of changing the default behavior from "TCP and UDP" to "TCP only", and AFAIK, was not documented in the changelog. What's worse is that lots of DNS clients only support UDP (in particular, Windows; this is how I initially noticed the problem; my Windows VM was having DNS problems while my Linux VMs were fine), which made it look like the feature has stopped working entirely. |
dns_relay
hangs indefinitelytcp_only
mode, causing UDP-only clients to fail
Steps to reproduce
cargo test --features dns-over-https,dns-over-tls,local-dns,local-http-rustls,local-redir,local-tun dns_relay -- --nocapture
Observe that the test hangs indefinitely.
Environments tested
Things tried
dns_relay
test:cargo test --features dns-over-https,dns-over-tls,local-dns,local-http-rustls,local-redir,local-tun -- --skip dns_relay
; all other tests complete successfullysudo systemctl stop firewalld
; no effectDebugging info
println
s and it seems like it's stuck here:shadowsocks-rust/tests/dns.rs
Line 88 in b8ea553
git bisect
pinpointed the issue to 8d3461b.The text was updated successfully, but these errors were encountered: