config

package
v0.0.0-...-7e11129 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IPMATCH      = regexp.MustCompile(`[\d\.]+`)
	InvalidSSURI = errors.New("Not Validat SSURI ")
)

Functions

func PackAddr

func PackAddr(addr string) []byte

PackAddr : pack to || 1 (ipv4) | ip(4) | port(2) || or || 1 (domain) | 1 (len) | n (host str bytes) | 2 (port) ||

func ParseOrding

func ParseOrding(urlOrbuf string) (ssuri []string)

Types

type Config

type Config struct {
	Server        string `json:"server"`
	Password      string `json:"password"`
	Method        string `json:"method"`
	ServerPort    int    `json:"server_port"`
	Timeout       int    `json:"timeout"`
	LocalPort     int    `json:"local_port"`
	LocalAddress  string `json:"local_address"`
	Protocol      string `json:"protocol"`
	Obfs          string `json:"obfs"`
	ConfigType    string `json:"conf_type"`
	ObfsParam     string `json:"obfs-param"`
	ProtocolParam string `json:"protocol-param"`
	OptionID      int    `json:"aid"`
	OptUUID       string `json:"uuid"`
}

func ParseSSUri

func ParseSSUri(u string) (cfg Config, err error)

func ParseVmessUri

func ParseVmessUri(u string) (cfg Config, err error)

func ToConfig

func ToConfig(uri string) (cfg Config)

func (Config) String

func (config Config) String() string

Jump to

Keyboard shortcuts

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