Documentation
¶
Index ¶
- Constants
- func Base64DecodeStripped(s string) (string, error)
- func CopyFile(from, to string) error
- func Disable()
- func DownloadWithProgressbar(fileUrl, fileName string) error
- func DownloadWithProgressbarWithTimeout(fileUrl, fileName string, timeout time.Duration) error
- func EnableSysPac(proxy string)
- func EnableSysProxy(proxy string)
- func FileExists(path string) bool
- func FileRead(filename string) (content string, err error)
- func FileReadByLine(fileName string, logic func(line string) error) error
- func FileWrite(filename string, content string) error
- func GenPassword(key, pwd string) string
- func GetConfigDir() string
- func GetExecPath() string
- func GetExitSign() chan os.Signal
- func GetFileModTime(path string) time.Time
- func GetProxyNodeType(u string) types.ProxyNodeType
- func GetPwd() string
- func GetRealIpFromCtx(ctx *fiber.Ctx) string
- func GetUserConfigDir() string
- func GetUserHomeDir() string
- func IsDir(path string) bool
- func IsFile(path string) bool
- func IsIp(ip string) bool
- func IsIpV4(ip string) bool
- func IsIpV6(ip string) bool
- func Md5(s string) string
- func Now() uint32
- func RandStringRunes(n int) string
- func Sha224(s string) string
- func Sha256(s string) string
- func Sha384(s string) string
- func Sha512(s string) string
- func ShortStr(str string, max int) string
- func ShortStr4Web(str string, max int) string
- type ClashRSSR
- type ClashSS
- type ClashVmess
- type Ecc
- func (p *Ecc) ECCDecrypt(ct string) (string, error)
- func (p *Ecc) ECCEncrypt(pt interface{}) (string, error)
- func (p *Ecc) ECCEncrypt4Bytes(pt []byte) (string, error)
- func (p *Ecc) ECCEncrypt4Str(pt string) (string, error)
- func (p *Ecc) EccSign(pt []byte) (sign []byte, err error)
- func (p *Ecc) EccSignVer(pt, sign []byte) bool
- func (p *Ecc) GetPrivate() *ecdsa.PrivateKey
- func (p *Ecc) Init(key string) error
- type PluginOpts
- type SSD
- type Trojan
- type Vmess
Constants ¶
View Source
const ( SSRServer = iota SSRPort SSRProtocol SSRCipher SSROBFS SSRSuffix )
Variables ¶
This section is empty.
Functions ¶
func Base64DecodeStripped ¶
func DownloadWithProgressbar ¶
func EnableSysPac ¶
func EnableSysPac(proxy string)
func EnableSysProxy ¶
func EnableSysProxy(proxy string)
func FileExists ¶
func FileReadByLine ¶ added in v0.0.7
func GenPassword ¶ added in v0.0.7
func GetConfigDir ¶
func GetConfigDir() string
func GetExecPath ¶
func GetExecPath() string
func GetExitSign ¶
func GetFileModTime ¶
func GetProxyNodeType ¶
func GetProxyNodeType(u string) types.ProxyNodeType
func GetRealIpFromCtx ¶
func GetUserConfigDir ¶
func GetUserConfigDir() string
func GetUserHomeDir ¶
func GetUserHomeDir() string
func RandStringRunes ¶
func ShortStr4Web ¶
Types ¶
type ClashRSSR ¶
type ClashRSSR struct {
Name string `json:"name"`
Type string `json:"type"`
Server string `json:"server"`
Port interface{} `json:"port"`
Password string `json:"password"`
Cipher string `json:"cipher"`
Protocol string `json:"protocol"`
ProtocolParam string `json:"protocol-param"`
OBFS string `json:"obfs"`
OBFSParam string `json:"obfs-param"`
}
type ClashVmess ¶
type ClashVmess struct {
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
Server string `json:"server,omitempty"`
Port interface{} `json:"port,omitempty"`
UUID string `json:"uuid,omitempty"`
AlterID interface{} `json:"alterId,omitempty"`
Cipher string `json:"cipher,omitempty"`
TLS bool `json:"tls,omitempty"`
Network string `json:"network,omitempty"`
WSPATH string `json:"ws-path,omitempty"`
WSHeaders map[string]string `json:"ws-headers,omitempty"`
SkipCertVerify bool `json:"skip-cert-verify,omitempty"`
}
type Ecc ¶
type Ecc struct {
// contains filtered or unexported fields
}
func (*Ecc) GetPrivate ¶
func (p *Ecc) GetPrivate() *ecdsa.PrivateKey
type PluginOpts ¶
type SSD ¶
type SSD struct {
Airport string `json:"airport"`
Port int `json:"port"`
Encryption string `json:"encryption"`
Password string `json:"password"`
TrafficUsed float64 `json:"traffic_used"`
TrafficTotal float64 `json:"traffic_total"`
Expiry string `json:"expiry"`
URL string `json:"url"`
Servers []struct {
ID int `json:"id"`
Server string `json:"server"`
Ratio float64 `json:"ratio"`
Remarks string `json:"remarks"`
Port string `json:"port"`
Encryption string `json:"encryption"`
Password string `json:"password"`
Plugin string `json:"plugin"`
PluginOptions string `json:"plugin_options"`
} `json:"servers"`
}
type Vmess ¶
type Vmess struct {
Add string `json:"add"`
Aid interface{} `json:"aid"`
Host string `json:"host"`
ID string `json:"id"`
Net string `json:"net"`
Path string `json:"path"`
Port interface{} `json:"port"`
PS string `json:"ps"`
TLS string `json:"tls"`
Type string `json:"type"`
V interface{} `json:"v"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.