-
Notifications
You must be signed in to change notification settings - Fork 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
SOCKS Proxy Not Working with Forwarding Rules #2441
Comments
The DNS library supports dialers, so it should be compatible with SOCKS proxies. What would be a sane syntax in the forward configuration file to mention what zones should be routed through the proxy? |
Thank you for your enthusiastic response! Initially, I thought the proxy should be a global option that applies to all outgoing connections. However, I later discovered that it doesn't support UDP. So, I set force_tcp = true. However, I noticed that the forwarding_rules didn't use the configured SOCKS proxy as expected. According to your reply, this is the default behavior. Unfortunately, my network environment doesn't allow direct connections to the target DNS servers for forwarding, so I require a SOCKS proxy. As you mentioned in the discussions, it's possible to forward certain regions through SOCKS, but this needs to be separate from the global proxy configuration. I believe a configuration file that is easy to understand and less prone to confusion could look like this:
Here, the proxy server is concatenated with the forwarded domain server using the @ symbol, indicating that the connection should be forwarded via SOCKS5. When the content after @ is empty, it would use the value of the global proxy. It would be ideal if the proxy supports both UDP and TCP protocols. The above is my understanding and suggestion for the configuration file. If there's anything else I can assist you with, please let me know. |
In some cases, the user's SOCKS5 proxy may not support proxying UDP. However, DNS servers usually support TCP queries. Therefore, it might be more convenient to explicitly specify the forwarding server's protocol. For example:
|
Maybe a simpler and more flexible approach would be a syntax such as:
And then some global configuration settings to define how exactly forwarded queries are proxied (could be SOCKS, with or without UDP, Tor, or eventually later, something else). |
The syntax appears to be well-structured, but there could indeed be ambiguity when it comes to the term "proxy." For instance, if we consider "proxy" as a domain name (e.g., an internal hostname in Docker), and the name "proxy" resolves to the docker IP address , the current representation might be confusing:
|
Of course, this is just my assumption. Perhaps, after undergoing a rigorous code inspection and format check, it should work perfectly fine without any issues. |
As discussed earlier, I have drafted a possible format for the configuration file that could be beneficial for your development needs. This format allows users to define additional settings within the global configuration. The key additions are the New Settings in Global Configuration:
Configuration File Format: The configuration file, named
|
|
1 similar comment
|
THE TRACKER IS DEDICATED TO KEEPING TRACK OF BUGS,
preferably after they have been already discussed and confirmed to be reproducible.
FOR ASSISTANCE, PLEASE CLOSE THIS FORM AND USE THE DISCUSSIONS SECTION INSTEAD:
https://github.com/DNSCrypt/dnscrypt-proxy/discussions/categories/q-a
The text was updated successfully, but these errors were encountered: