tproxy

package
v1.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 28, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package tproxy implements proxy.Server for tproxy.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewServer

func NewServer() (proxy.Server, error)

Types

type Server

type Server struct {
	proxy.Base

	sync.Once
	// contains filtered or unexported fields
}

implements proxy.ListenerServer

func (*Server) Close

func (s *Server) Close() error

func (*Server) Handshake

func (s *Server) Handshake(underlay net.Conn) (net.Conn, netLayer.MsgConn, netLayer.Addr, error)

func (*Server) Name

func (*Server) Name() string

func (*Server) SelfListen

func (s *Server) SelfListen() (is bool, tcp, udp int)

func (*Server) StartListen

func (s *Server) StartListen(tcpFunc func(netLayer.TCPRequestInfo), udpFunc func(netLayer.UDPRequestInfo)) io.Closer

func (*Server) Stop

func (s *Server) Stop()

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL