Browse Source

Fix Server Name not Supplied to Security Engine for TCP Transport

Shelikhoo 2 years ago
parent
commit
001aace748
2 changed files with 2 additions and 2 deletions
  1. 1 1
      app/proxyman/outbound/handler.go
  2. 1 1
      transport/internet/tcp/dialer.go

+ 1 - 1
app/proxyman/outbound/handler.go

@@ -188,7 +188,7 @@ func (h *Handler) Dial(ctx context.Context, dest net.Destination) (internet.Conn
 				}
 				}
 
 
 				if securityEngine != nil {
 				if securityEngine != nil {
-					conn, err = securityEngine.Client(conn)
+					conn, err = securityEngine.Client(conn, security.OptionWithDestination{Dest: dest})
 					if err != nil {
 					if err != nil {
 						return nil, newError("unable to create security protocol client from security engine").Base(err)
 						return nil, newError("unable to create security protocol client from security engine").Base(err)
 					}
 					}

+ 1 - 1
transport/internet/tcp/dialer.go

@@ -25,7 +25,7 @@ func Dial(ctx context.Context, dest net.Destination, streamSettings *internet.Me
 	}
 	}
 
 
 	if securityEngine != nil {
 	if securityEngine != nil {
-		conn, err = securityEngine.Client(conn)
+		conn, err = securityEngine.Client(conn, security.OptionWithDestination{Dest: dest})
 		if err != nil {
 		if err != nil {
 			return nil, newError("unable to create security protocol client from security engine").Base(err)
 			return nil, newError("unable to create security protocol client from security engine").Base(err)
 		}
 		}