mirror of
https://github.com/nadoo/glider.git
synced 2025-02-23 17:35:40 +08:00
16 lines
407 B
Go
16 lines
407 B
Go
package proxy
|
|
|
|
import "net"
|
|
|
|
// Proxy is a dialer manager
|
|
type Proxy interface {
|
|
// Dial connects to the given address via the proxy.
|
|
Dial(network, addr string) (c net.Conn, proxy string, err error)
|
|
|
|
// DialUDP connects to the given address via the proxy.
|
|
DialUDP(network, addr string) (pc net.PacketConn, writeTo net.Addr, err error)
|
|
|
|
// Get the dialer by dstAddr
|
|
NextDialer(dstAddr string) Dialer
|
|
}
|