mirror of
https://github.com/xjasonlyu/tun2socks.git
synced 2025-10-07 09:41:09 +08:00
30 lines
490 B
Go
Executable File
30 lines
490 B
Go
Executable File
package proxy
|
|
|
|
import (
|
|
"context"
|
|
"errors"
|
|
"net"
|
|
|
|
"github.com/xjasonlyu/tun2socks/common/adapter"
|
|
)
|
|
|
|
type Base struct {
|
|
addr string
|
|
}
|
|
|
|
func NewBase(addr string) *Base {
|
|
return &Base{addr: addr}
|
|
}
|
|
|
|
func (b *Base) Addr() string {
|
|
return b.addr
|
|
}
|
|
|
|
func (b *Base) DialContext(context.Context, *adapter.Metadata) (net.Conn, error) {
|
|
return nil, errors.New("not supported")
|
|
}
|
|
|
|
func (b *Base) DialUDP(*adapter.Metadata) (net.PacketConn, error) {
|
|
return nil, errors.New("not supported")
|
|
}
|