proxy

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2025 License: GPL-3.0 Imports: 3 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  // rule
	Nodes      []string  // all node
	Default    string    // Default Node
	TemplateFS *embed.FS // Template file system
}

Adapter represents a proxy adapter

type AnyTLS added in v1.0.2

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

AnyTLS represents an AnyTLS proxy configuration

type Group

type Group struct {
	Name     string
	Type     GroupType
	Proxies  []string
	URL      string
	Interval int
	Reject   bool     // Reject group
	Direct   bool     // Direct group
	Tags     []string // Tags for the group
	Default  bool     // Default group
}

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   // Name of the proxy
	Server   string   // Server address of the proxy
	Port     int      // Port of the proxy server
	Protocol string   // Protocol type (e.g., shadowsocks, vless, vmess, trojan, hysteria2, tuic, anytls)
	Country  string   // Country of the proxy
	Tags     []string // Tags for the proxy
	Option   any      // Additional options for the proxy configuration
}

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
	DisableSNI           bool   `json:"disable_sni"`           // Disable SNI for the transport(tuic)
	ReduceRtt            bool   `json:"reduce_rtt"`            // Reduce RTT for the transport(tuic)
	UDPRelayMode         string `json:"udp_relay_mode"`        // UDP relay mode for the transport(tuic)
	CongestionController string `json:"congestion_controller"` // Congestion controller for the transport(tuic)
}

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"`
	DisableSNI           bool           `json:"disable_sni"`
	ReduceRtt            bool           `json:"reduce_rtt"`
	UDPRelayMode         string         `json:"udp_relay_mode"`
	CongestionController string         `json:"congestion_controller"`
	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