proxy

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2025 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateShadowsocks2022Password added in v1.0.1

func GenerateShadowsocks2022Password(ss Shadowsocks, password string) (string, string)

Types

type Adapter

type Adapter struct {
	Proxies []Proxy
	Group   []Group
	Rules   []string
	Region  []string
}

Adapter represents a proxy adapter

type Group

type Group struct {
	Name     string
	Type     GroupType
	Proxies  []string
	URL      string
	Interval int
}

Group represents a group of proxies

type GroupType

type GroupType string
const (
	GroupTypeSelect   GroupType = "select"
	GroupTypeURLTest  GroupType = "url-test"
	GroupTypeFallback GroupType = "fallback"
)

type Hysteria2

type Hysteria2 struct {
	Port           int            `json:"port"`
	HopPorts       string         `json:"hop_ports"`
	HopInterval    int            `json:"hop_interval"`
	ObfsPassword   string         `json:"obfs_password"`
	SecurityConfig SecurityConfig `json:"security_config"`
}

Hysteria2 represents a Hysteria2 proxy configuration

type Proxy

type Proxy struct {
	Name     string
	Server   string
	Port     int
	Protocol string
	Country  string
	Option   any
}

Proxy represents a proxy server

type Relay

type Relay struct {
	RelayHost    string
	DispatchMode string
	Prefix       string
}

Relay represents a relay configuration

type SecurityConfig

type SecurityConfig struct {
	SNI               string `json:"sni"`
	AllowInsecure     bool   `json:"allow_insecure"`
	Fingerprint       string `json:"fingerprint"`
	RealityServerAddr string `json:"reality_server_addr"`
	RealityServerPort int    `json:"reality_server_port"`
	RealityPrivateKey string `json:"reality_private_key"`
	RealityPublicKey  string `json:"reality_public_key"`
	RealityShortId    string `json:"reality_short_id"`
}

SecurityConfig represents the security configuration for a proxy

type Shadowsocks

type Shadowsocks struct {
	Port      int    `json:"port"`
	Method    string `json:"method"`
	ServerKey string `json:"server_key"`
}

Shadowsocks represents a Shadowsocks proxy configuration

type TransportConfig

type TransportConfig struct {
	Path        string `json:"path,omitempty"` // ws/httpupgrade
	Host        string `json:"host,omitempty"`
	ServiceName string `json:"service_name"` // grpc
}

TransportConfig represents the transport configuration for a proxy

type Trojan

type Trojan struct {
	Port            int             `json:"port"`
	Flow            string          `json:"flow"`
	Transport       string          `json:"transport"`
	TransportConfig TransportConfig `json:"transport_config"`
	Security        string          `json:"security"`
	SecurityConfig  SecurityConfig  `json:"security_config"`
}

Trojan represents a Trojan proxy configuration

type Tuic

type Tuic struct {
	Port           int            `json:"port"`
	SecurityConfig SecurityConfig `json:"security_config"`
}

Tuic represents a Tuic proxy configuration

type Vless

type Vless struct {
	Port            int             `json:"port"`
	Flow            string          `json:"flow"`
	Transport       string          `json:"transport"`
	TransportConfig TransportConfig `json:"transport_config"`
	Security        string          `json:"security"`
	SecurityConfig  SecurityConfig  `json:"security_config"`
}

Vless represents a Vless proxy configuration

type Vmess

type Vmess struct {
	Port            int             `json:"port"`
	Flow            string          `json:"flow"`
	Transport       string          `json:"transport"`
	TransportConfig TransportConfig `json:"transport_config"`
	Security        string          `json:"security"`
	SecurityConfig  SecurityConfig  `json:"security_config"`
}

Vmess represents a Vmess proxy configuration

Jump to

Keyboard shortcuts

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