Replies: 4 comments 7 replies
-
|
这里的DNS应该是指代理DNS请求吧,而不是解析域名的SOCKS5服务器地址?如果是指代理DNS,这就需要增加识别DNS流量的功能,目前对TCP和UDP都是透传的。 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
对,指代理DNS请求。 因为是透传的,还不太好修改,本想自己修改,发现难度还有点大。 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
尝试用AI做了一个实现,不知道正不正确?:nange#4 |
Beta Was this translation helpful? Give feedback.
6 replies
-
|
打算暂时放弃实现这个特性的想法,原因如下:
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
背景
当前TCP和UDP连接的超时时间是由配置
read-write-timeout决定的,默认是60s。但这对于DNS请求来说,此超时时间,过于久了,可能导致连接长时间无法关闭(端口长时间被占用),如果一段时间内,出现大量的DNS请求,可能会出现端口耗尽的问题。
另外对于某些TCP场景,60s的超时时间,又太短了,比如对于Android系统上的Google推送服务(可通过在拨号界面输入:
*#*#426#*#*,打开状态监控界面),如果60s内,没有出现系统推送,则连接会被关闭,系统发现此连接关闭了,又会立即新建一个连接,如此循环,会明显增加手机的电量消耗。功能需求
如果可以新增一个配置DNS的超时时间参数,如
dns-timeout,默认5s。 这样就可以解决上面说到的两个问题。因为DNS的超时时间很短了,就难以出现端口耗尽的问题;再对
read-write-timeout参数配置更长的时间,就可以解决第二个Android推送服务频繁创建连接的问题。Beta Was this translation helpful? Give feedback.
All reactions