tproxy

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2020 License: GPL-3.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

View Source
const (
	IP6T_SO_ORIGINAL_DST = 80
	SO_ORIGINAL_DST      = 80
)
View Source
const MaxPacketSize = 1024 * 8
View Source
const Name = "TPROXY"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	LocalHost  string `json:"local_addr" yaml:"local-addr"`
	LocalPort  int    `json:"local_port" yaml:"local-port"`
	UDPTimeout int    `json:"udp_timeout" yaml:"udp-timeout"`
}

type Conn

type Conn struct {
	net.Conn
	// contains filtered or unexported fields
}

func (*Conn) Metadata

func (c *Conn) Metadata() *tunnel.Metadata

type PacketConn

type PacketConn struct {
	dokodemo.PacketConn
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(ctx context.Context, _ tunnel.Server) (*Server, error)

func (*Server) AcceptConn

func (s *Server) AcceptConn(tunnel.Tunnel) (tunnel.Conn, error)

func (*Server) AcceptPacket

func (s *Server) AcceptPacket(tunnel.Tunnel) (tunnel.PacketConn, error)

func (*Server) Close

func (s *Server) Close() error

type Tunnel

type Tunnel struct{}

func (*Tunnel) Name

func (t *Tunnel) Name() string

func (*Tunnel) NewClient

func (t *Tunnel) NewClient(ctx context.Context, client tunnel.Client) (tunnel.Client, error)

func (*Tunnel) NewServer

func (t *Tunnel) NewServer(ctx context.Context, server tunnel.Server) (tunnel.Server, error)

Jump to

Keyboard shortcuts

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