server

package
v0.0.0-...-72c0b7d Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CipherStruct

type CipherStruct struct {
	ID     string
	Port   int
	Cipher string
	Secret string
}

type Config

type Config struct {
	Keys []struct {
		ID     string
		Port   int
		Cipher string
		Secret string
	}
}

type SSConfig

type SSConfig struct {
	NatTimeout    time.Duration
	Metrics       metrics.ShadowsocksMetrics
	ReplayHistory int
	Ports         map[int]*SsPort
	Logger        *logging.Logger
}

type SSServer

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

func NewSSServer

func NewSSServer(cnf *SSConfig) *SSServer

func (*SSServer) AddCipher

func (s *SSServer) AddCipher(cs CipherStruct) (int, error)

func (*SSServer) IsCipherExists

func (s *SSServer) IsCipherExists(cs CipherStruct) bool

func (*SSServer) LoadConfig

func (s *SSServer) LoadConfig(filename string) error

func (*SSServer) RemoveCipher

func (s *SSServer) RemoveCipher(cs CipherStruct) error

func (*SSServer) Stop

func (s *SSServer) Stop() error

Stop serving on all ports.

type SsPort

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

Jump to

Keyboard shortcuts

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