mirror of
https://github.com/nadoo/glider.git
synced 2026-11-19 07:09:42 +08:00
proxy: add a new interface proxy to distinguish client and server
This commit is contained in:
1 parent
6c8141e43b
commit
edcb21236a
27 files changed
+371
-398
No files matched your search
@@ -0,0 +1,15 @@
|
||||
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
|
||||
}
|
||||
Reference in new issue
Block a user