chore: more context passing in outbounds

This commit is contained in:
wwqgtxx
2023-05-18 13:15:08 +08:00
parent 6b1a4385b2
commit 033f902ace
16 changed files with 65 additions and 88 deletions

View File

@ -106,11 +106,11 @@ type ProxyAdapter interface {
//
// Examples:
// conn, _ := net.DialContext(context.Background(), "tcp", "host:port")
// conn, _ = adapter.StreamConn(conn, metadata)
// conn, _ = adapter.StreamConnContext(context.Background(), conn, metadata)
//
// It returns a C.Conn with protocol which start with
// a new session (if any)
StreamConn(c net.Conn, metadata *Metadata) (net.Conn, error)
StreamConnContext(ctx context.Context, c net.Conn, metadata *Metadata) (net.Conn, error)
// DialContext return a C.Conn with protocol which
// contains multiplexing-related reuse logic (if any)