Documentation
¶
Index ¶
- Constants
- Variables
- func ParseRule(raw string) (string, error)
- func SplitRules(list []string) (cidrs, domains, keywords, names, paths []string)
- func ValidPort(port int) bool
- type Auth
- type General
- type Network
- type Node
- type NodeRef
- type Proto
- type Reality
- type Routing
- type Settings
- type ShadowTLS
- type TLS
- type Traffic
- type Transport
- type WireGuard
Constants ¶
View Source
const ( DefaultPort = 10808 DefaultDNS = "1.1.1.1" DefaultLogLevel = "error" DefaultTunMTU = 9000 DefaultTunStack = "gvisor" DefaultRefresh = 6 DefaultProbeURL = "https://connectivitycheck.gstatic.com/generate_204" TunInterface = "justray" )
View Source
const ( ProxyAll = "proxy all" DirectAll = "direct all" )
Variables ¶
Functions ¶
func SplitRules ¶
SplitRules splits entries into cidrs, domains, keywords, names and paths
Types ¶
type General ¶
type General struct {
Autostart string `yaml:"-"` // on/off, kept by the OS
RefreshEvery int `yaml:"refresh_hours,omitempty"` // 0 = never
Port int `yaml:"port,omitempty"`
LogLevel string `yaml:"log_level,omitempty"`
ProbeURL string `yaml:"probe_url,omitempty"`
Emoji string `yaml:"emoji,omitempty"`
}
type Network ¶
type Network struct {
DNSHijack string `yaml:"dns_hijack,omitempty"` // on/off, empty = on
DNS string `yaml:"dns,omitempty"`
IPVersion string `yaml:"ip_version,omitempty"`
TunStack string `yaml:"stack,omitempty"`
TunMTU int `yaml:"mtu,omitempty"`
TunStrict string `yaml:"strict_route,omitempty"` // on/off, empty = on
}
type Node ¶
type Node struct {
ID string
Name string
Protocol Proto
Server string
Port int
Auth Auth
Transport Transport
TLS *TLS // nil means plaintext
Reality *Reality
Obfs string // hysteria2
ObfsPassword string // hysteria2, hysteria xplus
UpMbps int // hysteria
DownMbps int // hysteria
Congestion string // tuic
UDPRelayMode string // tuic
PacketEncoding string // vless, vmess: xudp, packetaddr; empty = xudp
ShadowTLS *ShadowTLS
WireGuard *WireGuard
}
type Routing ¶
type Routing struct {
Mode string `yaml:"mode,omitempty"` // proxy-all/direct-all, empty = proxy-all
BypassLocal string `yaml:"bypass_local,omitempty"` // on/off, empty = on
BlockQUIC string `yaml:"block_quic,omitempty"` // on/off, empty = off
Except []string `yaml:"except,omitempty"`
Blocked []string `yaml:"blocked,omitempty"`
}
type Settings ¶
Click to show internal directories.
Click to hide internal directories.