gfwproxyshadowsocksdocker-imagegogolanggvisornatnetworksocks4socks5tcpip-stacktortun-devicetun2sockstunneludpwireguard
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
555 B
33 lines
555 B
package proxy
|
|
|
|
import (
|
|
"context"
|
|
"errors"
|
|
"net"
|
|
|
|
M "github.com/xjasonlyu/tun2socks/v2/metadata"
|
|
"github.com/xjasonlyu/tun2socks/v2/proxy/proto"
|
|
)
|
|
|
|
var _ Proxy = (*Base)(nil)
|
|
|
|
type Base struct {
|
|
addr string
|
|
proto proto.Proto
|
|
}
|
|
|
|
func (b *Base) Addr() string {
|
|
return b.addr
|
|
}
|
|
|
|
func (b *Base) Proto() proto.Proto {
|
|
return b.proto
|
|
}
|
|
|
|
func (b *Base) DialContext(context.Context, *M.Metadata) (net.Conn, error) {
|
|
return nil, errors.ErrUnsupported
|
|
}
|
|
|
|
func (b *Base) DialUDP(*M.Metadata) (net.PacketConn, error) {
|
|
return nil, errors.ErrUnsupported
|
|
}
|
|
|