util

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2026 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InboundTypeWithLink = []string{"socks", "http", "mixed", "shadowsocks", "naive", "hysteria", "hysteria2", "anytls", "tuic", "vless", "trojan", "vmess"}

Functions

func B64StrToByte

func B64StrToByte(str string) ([]byte, error)

func ByteToB64Str

func ByteToB64Str(b []byte) string

func FillOutJson

func FillOutJson(i *model.Inbound, hostname string) error

Fill Inbound's out_json

func GetExternalLink(rawURL string) string

func GetExternalSub

func GetExternalSub(url string) ([]map[string]interface{}, error)

func GetHeaders

func GetHeaders(client *model.Client, updateInterval int, options ...SubInfoOptions) []string

func GetOutbound

func GetOutbound(uri string, i int) (*map[string]interface{}, string, error)

func LinkGenerator

func LinkGenerator(clientConfig json.RawMessage, i *model.Inbound, hostname string) []string

func StrOrBase64Encoded

func StrOrBase64Encoded(str string) string

Function to return decoded bytes if a string is Base64 encoded

Types

type LinkParam

type LinkParam struct {
	Key   string
	Value string
}

type SubInfoOptions

type SubInfoOptions struct {
	Upload   bool
	Download bool
	Total    bool
	Expire   bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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