随机构造自签证书信息,修复屏蔽协议引发的udp问题

This commit is contained in:
qaq
2025-10-09 14:55:05 +08:00
parent fa1c390b33
commit 50e7ff0f36
5 changed files with 257 additions and 13 deletions
+6 -1
View File
@@ -459,9 +459,14 @@ func (c *detectConn) Read(b []byte) (int, error) {
}
func detectProtocol(data []byte, conn net.Conn) (blocked bool) {
// 如果是 UDP,则不检测,直接放行
if _, ok := conn.(*net.UDPConn); ok {
return false
}
if isHttp == 1 && detectHTTP(data) {
conn.Close()
return false
return true
}
if isTls == 1 && detectTLS(data) {