mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-12-06 20:18:33 +00:00
fix: handle decryption handshake errors in server
This commit is contained in:
1 parent
c210be21e0
commit
1cdca1a015
1 file changed
+3
-2
@@ -328,11 +328,12 @@ func (l *Listener) AddrList() (addrList []net.Addr) {
|
||||
func (l *Listener) HandleConn(conn net.Conn, tunnel C.Tunnel, additions ...inbound.Addition) {
|
||||
ctx := sing.WithAdditions(context.TODO(), additions...)
|
||||
if l.decryption != nil {
|
||||
var err error
|
||||
conn, err = l.decryption.Handshake(conn, nil)
|
||||
c, err := l.decryption.Handshake(conn, nil)
|
||||
if err != nil {
|
||||
_ = conn.Close()
|
||||
return
|
||||
}
|
||||
conn = c
|
||||
}
|
||||
err := l.service.NewConnection(ctx, conn, metadata.Metadata{
|
||||
Protocol: "vless",
|
||||
|
||||
Reference in new issue
Block a user