Fix Server Name not Supplied to Security Engine for TCP Transport

This commit is contained in:
Shelikhoo 2023-01-14 12:04:44 +00:00
parent 51bbbc06d1
commit 001aace748
No known key found for this signature in database
GPG Key ID: C4D5E79D22B25316
2 changed files with 2 additions and 2 deletions

View File

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

View File

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