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.

34 lines
555 B

4 years ago
package proxy
import (
"context"
"errors"
"net"
M "github.com/xjasonlyu/tun2socks/v2/metadata"
"github.com/xjasonlyu/tun2socks/v2/proxy/proto"
4 years ago
)
var _ Proxy = (*Base)(nil)
4 years ago
type Base struct {
addr string
proto proto.Proto
4 years ago
}
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
4 years ago
}
func (b *Base) DialUDP(*M.Metadata) (net.PacketConn, error) {
return nil, errors.ErrUnsupported
4 years ago
}