fix: skip proxy deep verification for SOCKS5 connections (#579)

SOCKS5 protocol validates connection reachability at protocol level,
deep verification was incorrectly rejecting non-banner services like
SMB(445), RPC(139) and Kerberos(88).
This commit is contained in:
ZacharyZcR
2026-05-12 21:40:47 +08:00
parent 7db89e0bd3
commit 8f72acd17f
3 changed files with 17 additions and 2 deletions
+3 -2
View File
@@ -420,8 +420,9 @@ func isTimeoutError(err error) bool {
// 2. 轻量探测 (发送 \r\n) - 触发某些服务响应,同时不污染协议状态
// 3. 短超时等待 (500ms) - 平衡准确性和性能
func verifyProxyConnectionDeep(conn net.Conn, addr string) (bool, string) {
// 如果没有使用代理,跳过验证
if !common.IsProxyEnabled() {
// 无代理或SOCKS5代理:跳过深度验证
// SOCKS5协议层已验证连接可达性,连接成功即端口开放
if !common.IsProxyEnabled() || common.IsSOCKS5Proxy() {
return true, "direct"
}