Chore: add Type() method to proxy.Proxy

This commit is contained in:
xjasonlyu
2021-02-06 18:54:42 +08:00
parent 6375708e4a
commit a84eebe284
5 changed files with 30 additions and 0 deletions

View File

@@ -22,6 +22,12 @@ type Dialer interface {
DialUDP(*adapter.Metadata) (net.PacketConn, error)
}
type Proxy interface {
Dialer
Addr() string
Type() string
}
// SetDialer sets default Dialer.
func SetDialer(d Dialer) {
_defaultDialer = d