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

@@ -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")
}