decode

package
v1.7.3 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TransportProtocolList []string = []string{
	"tcp",
	"websocket",
	"grpc",
}

Functions

func Base64StdDecode

func Base64StdDecode(s string) (string, error)

封装base64.StdEncoding进行解码,加入了长度补全,换行删除。当error时,返回输入和err

func Base64URLDecode

func Base64URLDecode(s string) (string, error)

封装base64.URLEncoding进行解码,加入了长度补全,换行删除。当error时,返回输入和err

func ParseSubscribeByRaw

func ParseSubscribeByRaw(data string) (dt string, err error)

func ParseSubscribeByUrl

func ParseSubscribeByUrl(url string, proxy string) (dt string, rawdt string, err error)

Types

type Shadowsocks

type Shadowsocks struct {
	TransportStream                   StreamConfig
	Address, Password, Cipher, Plugin string
	Title                             string
	Port                              int
}

"aes-256-gcm", "aes-128-gcm", "chacha20-poly1305", "chacha20-ietf-poly1305", "plain", "none"

func ParseShadowsocks

func ParseShadowsocks(u string) (ss Shadowsocks, err error)

ParseShadowsocks. parse shadowsocks protocol url string. begin with: ss://

type StreamConfig

type StreamConfig struct {
	Protocol, Security, Path string
}

type Trojan

type Trojan struct {
	TransportStream   StreamConfig
	Address, Password string
	Title             string
	Port              int
	Sni               string `json:"sni"`
	AllowInsecure     bool   `json:"allowInsecure"`
	Alpn              string `json:"alpn,omitempty"`
}

func ParseTrojan

func ParseTrojan(d string) (tr Trojan, err error)

Jump to

Keyboard shortcuts

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