listener

package
v1.31.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllowLan

func AllowLan() bool

func BindAddress

func BindAddress() string

func Cleanup

func Cleanup()

func GetInbounds

func GetInbounds() []C.Inbound

func PatchTunnel

func PatchTunnel(tunnels []config.Tunnel, tcpIn chan<- C.ConnContext, udpIn chan<- *inbound.PacketAdapter)

func ReCreateAutoRedir

func ReCreateAutoRedir(ifaceNames []string, defaultInterface string, tcpIn chan<- C.ConnContext, _ chan<- *inbound.PacketAdapter)

func ReCreateListeners

func ReCreateListeners(inbounds []C.Inbound, tcpIn chan<- C.ConnContext, udpIn chan<- *inbound.PacketAdapter)

ReCreateListeners only recreate inbound config listener

func ReCreatePortsListeners

func ReCreatePortsListeners(ports Ports, tcpIn chan<- C.ConnContext, udpIn chan<- *inbound.PacketAdapter)

ReCreatePortsListeners only recreate ports config listener

func ReCreateRedirToTun

func ReCreateRedirToTun(ifaceNames []string)

func ReCreateTun

func ReCreateTun(tunConf *C.Tun, tcpIn chan<- C.ConnContext, udpIn chan<- *inbound.PacketAdapter)

func SetAllowLan

func SetAllowLan(al bool)

func SetBindAddress

func SetBindAddress(host string)

Types

type Ports

type Ports struct {
	Port       int `json:"port"`
	SocksPort  int `json:"socks-port"`
	RedirPort  int `json:"redir-port"`
	TProxyPort int `json:"tproxy-port"`
	MixedPort  int `json:"mixed-port"`
	MitmPort   int `json:"mitm-port"`
}

func GetPorts

func GetPorts() *Ports

GetPorts return the ports of proxy servers

Directories

Path Synopsis
tun
device/iobased
Package iobased provides the implementation of io.ReadWriter based data-link layer endpoints.
Package iobased provides the implementation of io.ReadWriter based data-link layer endpoints.
device/tun
Package tun provides TUN which implemented device.Device interface.
Package tun provides TUN which implemented device.Device interface.
ipstack/gvisor
Package gvisor provides a thin wrapper around a gVisor's stack.
Package gvisor provides a thin wrapper around a gVisor's stack.

Jump to

Keyboard shortcuts

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