server

package
v0.0.0-...-1db1413 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShadowsocksRMapTimeCopy

func ShadowsocksRMapTimeCopy(dst *network.ShadowsocksRDecorate, target net.Addr, src *ShadowsocksRUDPMapItem, timeout time.Duration) error

copy from src to dst at target with read timeout

Types

type ShadowsocksRArgs

type ShadowsocksRArgs struct {
	TCPSwitch string `json:"tcp_switch"`
	UDPSwitch string `json:"udp_switch"`
}

ShadowsocksArgs is ShadowsocksProxy arguments

type ShadowsocksRProxy

type ShadowsocksRProxy struct {
	Host              string `json:"host,omitempty"`
	Port              int    `json:"port,omitempty"`
	Method            string `json:"method,omitempty"`
	Password          string `json:"password,omitempty"`
	Protocol          string `json:"protocol,omitempty"`
	ProtocolParam     string `json:"protocolParam,omitempty"`
	Obfs              string `json:"obfs,omitempty"`
	ObfsParam         string `json:"obfsParam,omitempty"`
	*network.Listener `json:"-"`
	Users             map[string]string `json:"users,omitempty"`
	Status            string            `json:"status,omitempty"`
	Single            int               `json:"single,omitempty"`
	network.ILimiter
	core.HostFirewall
	common.TrafficReport `json:"-"`
	common.OnlineReport  `json:"-"`
	*ShadowsocksRArgs
}

ShadowsocksProxy is respect shadowsocks proxy service it have Start and Stop method to control proxy

func (*ShadowsocksRProxy) AddUser

func (ssr *ShadowsocksRProxy) AddUser(uid int, password string)

func (*ShadowsocksRProxy) DelUser

func (ssr *ShadowsocksRProxy) DelUser(uid int)

func (*ShadowsocksRProxy) Reload

func (ssr *ShadowsocksRProxy) Reload(users map[string]string)

func (*ShadowsocksRProxy) Start

func (ssr *ShadowsocksRProxy) Start() error

Start tcp and udp according to the configuration

func (*ShadowsocksRProxy) StartTCP

func (ssr *ShadowsocksRProxy) StartTCP() error

func (*ShadowsocksRProxy) StartUDP

func (ssr *ShadowsocksRProxy) StartUDP() error

type ShadowsocksRUDPMap

type ShadowsocksRUDPMap struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

Packet NAT table

func NewShadowsocksRUDPMap

func NewShadowsocksRUDPMap(timeout time.Duration) *ShadowsocksRUDPMap

func (*ShadowsocksRUDPMap) Add

func (m *ShadowsocksRUDPMap) Add(client net.Addr, server *network.ShadowsocksRDecorate, remoteServer *ShadowsocksRUDPMapItem)

func (*ShadowsocksRUDPMap) Del

func (*ShadowsocksRUDPMap) Get

func (*ShadowsocksRUDPMap) Set

type ShadowsocksRUDPMapItem

type ShadowsocksRUDPMapItem struct {
	net.PacketConn
	Uid []byte
}

Jump to

Keyboard shortcuts

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