server

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Accounts []*AccountStruct

Functions

func ReadConfig

func ReadConfig()

func Server

func Server()

func SetConfigPath

func SetConfigPath(path string)

Types

type AccountStruct

type AccountStruct struct {
	Username     string   `yaml:"username"  mapstructure:"username"`
	Password     string   `yaml:"password"  mapstructure:"password"`
	BindAddress  string   `yaml:"bind_address"  mapstructure:"bind_address"`
	OutAddress   string   `yaml:"out_address" mapstructure:"out_address"`
	UDPBindIP    string   `yaml:"udp_bind_ip"  mapstructure:"udp_bind_ip"`
	Whitelist    []string `yaml:"whitelist"  mapstructure:"whitelist"`
	TCPTimeout   int      `yaml:"tcp_timeout"  mapstructure:"tcp_timeout"`
	UDPTimeout   int      `yaml:"udp_timeout" mapstructure:"udp_timeout"`
	WhitelistMap WhitelistMapType
}

type DefaultHandle

type DefaultHandle struct {
	// contains filtered or unexported fields
}

func (*DefaultHandle) TCPHandle

func (h *DefaultHandle) TCPHandle(s *socks5.Server, c *net.TCPConn, r *socks5.Request) error

func (*DefaultHandle) UDPHandle

func (h *DefaultHandle) UDPHandle(s *socks5.Server, addr *net.UDPAddr, d *socks5.Datagram) error

type WhitelistMapType

type WhitelistMapType map[string]bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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