Documentation ¶
Overview ¶
Package tun implements proxy.Server for tun device.
tun Server使用 host 配置作为 tun device name 使用 ip 配置作为 gateway 的ip 使用 extra.tun_selfip 作为 tun向外拨号的ip tun device name的默认值约定: mac: 系统指派, windows: vs_wintun, linux: vs_tun
Index ¶
- Variables
- type Server
- func (s *Server) Close() error
- func (s *Server) Handshake(underlay net.Conn) (net.Conn, netLayer.MsgConn, netLayer.Addr, error)
- func (*Server) Name() string
- func (s *Server) SelfListen() (is bool, tcp, udp int)
- func (s *Server) StartListen(tcpFunc func(netLayer.TCPRequestInfo), udpFunc func(netLayer.UDPRequestInfo)) io.Closer
- func (s *Server) Stop()
- type ServerCreator
Constants ¶
This section is empty.
Variables ¶
View Source
var (
AddManualRunCmdsListFunc func([]string)
)
Functions ¶
This section is empty.
Types ¶
type Server ¶
func (*Server) SelfListen ¶
func (*Server) StartListen ¶
func (s *Server) StartListen(tcpFunc func(netLayer.TCPRequestInfo), udpFunc func(netLayer.UDPRequestInfo)) io.Closer
非阻塞
type ServerCreator ¶
type ServerCreator struct{ proxy.CreatorCommonStruct }
func (ServerCreator) AfterCommonConfServer ¶
func (ServerCreator) AfterCommonConfServer(ps proxy.Server) (err error)
func (ServerCreator) NewServer ¶
func (ServerCreator) NewServer(lc *proxy.ListenConf) (proxy.Server, error)
func (ServerCreator) URLToListenConf ¶
func (ServerCreator) URLToListenConf(url *url.URL, lc *proxy.ListenConf, format int) (*proxy.ListenConf, error)
Click to show internal directories.
Click to hide internal directories.