mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-03-06 14:17:32 +00:00
chore: code cleanup
This commit is contained in:
@@ -121,17 +121,6 @@ type ProxyAdapter interface {
|
||||
ProxyInfo() ProxyInfo
|
||||
MarshalJSON() ([]byte, error)
|
||||
|
||||
// Deprecated: use DialContextWithDialer and ListenPacketWithDialer instead.
|
||||
// StreamConn wraps a protocol around net.Conn with Metadata.
|
||||
//
|
||||
// Examples:
|
||||
// conn, _ := net.DialContext(context.Background(), "tcp", "host:port")
|
||||
// conn, _ = adapter.StreamConnContext(context.Background(), conn, metadata)
|
||||
//
|
||||
// It returns a C.Conn with protocol which start with
|
||||
// a new session (if any)
|
||||
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)
|
||||
DialContext(ctx context.Context, metadata *Metadata) (Conn, error)
|
||||
@@ -140,13 +129,6 @@ type ProxyAdapter interface {
|
||||
// SupportUOT return UDP over TCP support
|
||||
SupportUOT() bool
|
||||
|
||||
// SupportWithDialer only for deprecated relay group, the new protocol does not need to be implemented.
|
||||
SupportWithDialer() NetWork
|
||||
// DialContextWithDialer only for deprecated relay group, the new protocol does not need to be implemented.
|
||||
DialContextWithDialer(ctx context.Context, dialer Dialer, metadata *Metadata) (Conn, error)
|
||||
// ListenPacketWithDialer only for deprecated relay group, the new protocol does not need to be implemented.
|
||||
ListenPacketWithDialer(ctx context.Context, dialer Dialer, metadata *Metadata) (PacketConn, error)
|
||||
|
||||
// IsL3Protocol return ProxyAdapter working in L3 (tell dns module not pass the domain to avoid loopback)
|
||||
IsL3Protocol(metadata *Metadata) bool
|
||||
|
||||
|
||||
Reference in New Issue
Block a user