From 997a7152a00cf8cdc1999a2639c8a88ba84a431b Mon Sep 17 00:00:00 2001 From: e1732a364fed <75717694+e1732a364fed@users.noreply.github.com> Date: Sat, 1 Jan 2000 00:00:00 +0000 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=89=93=E5=8D=B0=E5=87=BAtl?= =?UTF-8?q?s=E7=9A=84=E5=85=B7=E4=BD=93=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- proxy/base.go | 12 +++++++++++- proxy/socks5/socks5.go | 2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/proxy/base.go b/proxy/base.go index 9c008a7..b6235c8 100644 --- a/proxy/base.go +++ b/proxy/base.go @@ -153,7 +153,17 @@ func (b *Base) MiddleName() string { sb.WriteString("") if b.TLS { - sb.WriteString("+tls") + tt := "tls" + if dc := b.DialConf; dc != nil && dc.TlsType != "" { + tt = dc.TlsType + } + + if lc := b.ListenConf; lc != nil && lc.TlsType != "" { + tt = lc.TlsType + } + + sb.WriteString("+") + sb.WriteString(tt) if b.IsLazyTls() { sb.WriteString("+lazy") } diff --git a/proxy/socks5/socks5.go b/proxy/socks5/socks5.go index 8a7f0d5..633a2ea 100644 --- a/proxy/socks5/socks5.go +++ b/proxy/socks5/socks5.go @@ -21,6 +21,8 @@ https://datatracker.ietf.org/doc/html/rfc1929 纵观各种代理协议,vless/vmess/trojan/shadowsocks协议 都借鉴了socks5,有不少类似的地方。 所以 制作代理, 有必要先学习socks5标准。 + +关于socks4, 它太简单了, 既不支持udp, 也不支持ipv6, 也没有验证功能, 所以本作不予支持 */ package socks5