listener

package
v0.0.0-...-845ab49 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: GPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LastTunConf  LC.Tun
	LastTuicConf LC.TuicServer
)

Functions

func AllowLan

func AllowLan() bool

func BindAddress

func BindAddress() string

func Cleanup

func Cleanup(wait bool)

func GetTuicConf

func GetTuicConf() LC.TuicServer

func GetTunConf

func GetTunConf() LC.Tun

func ParseListener

func ParseListener(mapping map[string]any) (C.InboundListener, error)

func PatchInboundListeners

func PatchInboundListeners(newListenerMap map[string]C.InboundListener, tcpIn chan<- C.ConnContext, udpIn chan<- C.PacketAdapter, natTable C.NatTable, dropOld bool)

func PatchTunnel

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

func ReCreateAutoRedir

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

func ReCreateHTTP

func ReCreateHTTP(port int, tcpIn chan<- C.ConnContext)

func ReCreateMixed

func ReCreateMixed(port int, tcpIn chan<- C.ConnContext, udpIn chan<- C.PacketAdapter)

func ReCreateRedir

func ReCreateRedir(port int, tcpIn chan<- C.ConnContext, udpIn chan<- C.PacketAdapter, natTable C.NatTable)

func ReCreateRedirToTun

func ReCreateRedirToTun(ifaceNames []string)

func ReCreateShadowSocks

func ReCreateShadowSocks(shadowSocksConfig string, tcpIn chan<- C.ConnContext, udpIn chan<- C.PacketAdapter)

func ReCreateSocks

func ReCreateSocks(port int, tcpIn chan<- C.ConnContext, udpIn chan<- C.PacketAdapter)

func ReCreateTProxy

func ReCreateTProxy(port int, tcpIn chan<- C.ConnContext, udpIn chan<- C.PacketAdapter, natTable C.NatTable)

func ReCreateTuic

func ReCreateTuic(config LC.TuicServer, tcpIn chan<- C.ConnContext, udpIn chan<- C.PacketAdapter)

func ReCreateTun

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

func ReCreateVmess

func ReCreateVmess(vmessConfig string, tcpIn chan<- C.ConnContext, udpIn chan<- C.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"`
	ShadowSocksConfig string `json:"ss-config"`
	VmessConfig       string `json:"vmess-config"`
}

func GetPorts

func GetPorts() *Ports

GetPorts return the ports of proxy servers

Jump to

Keyboard shortcuts

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