listener

package
v1.53.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: MIT 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/tun
Package tun provides TUN which implemented device.Device interface.
Package tun provides TUN which implemented device.Device interface.

Jump to

Keyboard shortcuts

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