Open
Conversation
Changes: 1. Modified registration of SIGUSR1 to prevent segment fault on MIPS openwrt. 2. Introduced mechanism of self monitor to recover from hang process. 3. Introduced a new type of method 'direct' which relays incoming traffic out directly by default route and default interface. This method is useful to users whose ISP limits network connections from different computers. 4. Introduced a new type of method 'autosocks5' which by default relays incoming traffic out directly by default route and default interface. In case relay connection is closed/reset immediately by remote/GFW, redsocks then relays the traffic to SOCKS5 proxy. By doing this, most of traffic can be relayed without going through proxy. But, for those connections blocked by GFW can go through proxy automatically.
2. Enhance address cache in autosocks.c. The new cache stores IP addresses in blocks.
timeout occurs while connecting to target. The timeout value is set to 13 seconds. Whenever a connection to target timeouts, the connection will be retried via proxy.
2. Detect connection reset with more reliable method.
we failed to connect to target directly. Connection will be retried via proxy when connection timeouts in about 10 seconds or connection is reset before data is read & writen successfully.
This method is behaves just like 'autosocks5' and is intent to support Goagent.
minor misspelling of the word cache (cahce)
Co-authored-by: ge9 <ge9@users.noreply.github.com>
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.
只允许部分机器通过代理,其他机器不走代理