mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-06 09:16:58 +08:00
Chore: add Type() method to proxy.Proxy
This commit is contained in:
@@ -8,6 +8,8 @@ import (
|
||||
"github.com/xjasonlyu/tun2socks/common/adapter"
|
||||
)
|
||||
|
||||
var _ Proxy = (*Base)(nil)
|
||||
|
||||
type Base struct {
|
||||
addr string
|
||||
}
|
||||
@@ -20,6 +22,10 @@ func (b *Base) Addr() string {
|
||||
return b.addr
|
||||
}
|
||||
|
||||
func (b *Base) Type() string {
|
||||
return "base"
|
||||
}
|
||||
|
||||
func (b *Base) DialContext(context.Context, *adapter.Metadata) (net.Conn, error) {
|
||||
return nil, errors.New("not supported")
|
||||
}
|
||||
|
Reference in New Issue
Block a user