listener

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 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()

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, tunnel C.Tunnel, dropOld bool)

func PatchTunnel

func PatchTunnel(tunnels []LC.Tunnel, tunnel C.Tunnel)

func ReCreateAutoRedir

func ReCreateAutoRedir(ifaceNames []string, tunnel C.Tunnel)

func ReCreateHTTP

func ReCreateHTTP(port int, tunnel C.Tunnel)

func ReCreateMixed

func ReCreateMixed(port int, tunnel C.Tunnel)

func ReCreateRedir

func ReCreateRedir(port int, tunnel C.Tunnel)

func ReCreateRedirToTun

func ReCreateRedirToTun(ifaceNames []string)

func ReCreateShadowSocks

func ReCreateShadowSocks(shadowSocksConfig string, tunnel C.Tunnel)

func ReCreateSocks

func ReCreateSocks(port int, tunnel C.Tunnel)

func ReCreateTProxy

func ReCreateTProxy(port int, tunnel C.Tunnel)

func ReCreateTuic

func ReCreateTuic(config LC.TuicServer, tunnel C.Tunnel)

func ReCreateTun

func ReCreateTun(tunConf LC.Tun, tunnel C.Tunnel)

func ReCreateVmess

func ReCreateVmess(vmessConfig string, tunnel C.Tunnel)

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