listener

package
v1.19.31-hako.2 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: GPL-3.0 Imports: 24 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 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 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 SetAllowLanObserver

func SetAllowLanObserver(observe func(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

Directories

Path Synopsis
Package hysteria2_realm copy and modify from: https://github.com/apernet/hysteria-realm-server/tree/1ec22609705b5896df17d4ae4bfb2a1675cdb606
Package hysteria2_realm copy and modify from: https://github.com/apernet/hysteria-realm-server/tree/1ec22609705b5896df17d4ae4bfb2a1675cdb606

Jump to

Keyboard shortcuts

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