Skip to content
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

add timeout parameter #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

wellenvogel
Copy link

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;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants