Chore: logging remote port on request (#1494)

This commit is contained in:
ayanamist
2021-07-19 15:31:38 +08:00
committed by GitHub
parent 247dd84970
commit 53e17a916b
2 changed files with 13 additions and 15 deletions

View File

@ -14,9 +14,7 @@ type Direct struct {
// DialContext implements C.ProxyAdapter
func (d *Direct) DialContext(ctx context.Context, metadata *C.Metadata) (C.Conn, error) {
address := net.JoinHostPort(metadata.String(), metadata.DstPort)
c, err := dialer.DialContext(ctx, "tcp", address)
c, err := dialer.DialContext(ctx, "tcp", metadata.RemoteAddress())
if err != nil {
return nil, err
}