chore: anytls protocol version 2 (#1936)

This commit is contained in:
anytls
2025-03-27 20:25:31 +08:00
committed by GitHub
parent 7b382611bb
commit f61534602b
7 changed files with 187 additions and 33 deletions

View File

@@ -174,6 +174,12 @@ func (l *Listener) HandleConn(conn net.Conn, h *sing.ListenerHandler) {
return
}
// It seems that mihomo does not implement a connection error reporting mechanism, so we report success directly.
err = stream.HandshakeSuccess()
if err != nil {
return
}
h.NewConnection(ctx, stream, M.Metadata{
Source: M.SocksaddrFromNet(conn.RemoteAddr()),
Destination: destination,