Open
Conversation
7fa694d to
5df6a30
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I propose to add a timeout parameter to redsocks.
usage Scenario:
When using redsocks to also redirect naming resolution (DNS) via forward of udp port 53 to the built in DNS responder (with forcing redirect to tcp), the resolver get's a bit confused when the remote host is unreachable as it is able to connect but times out on send/receive. This leads to long timeouts when using DNS resolution (with no chance to lower them by resolver settings).
With an additional timeout option we can easily configure a second redsocks section in the config file using an own port only for DNS forwarding and applying a timeout value there.
Example:
iptables -t nat -I REDSOCKS -d 0.0.0.0/0 -p tcp --dport 53 -j REDIRECT --to-ports 12346
and in the config file (beside the normal forwarding stuff):
redsocks {
local_ip = 127.0.0.1;
local_port = 12346;
ip=...
port=....
....
timeout = 1;
}