Documentation
¶
Index ¶
- Variables
- func AnyTLSProxyInit(node *Proxy, ...)
- func GetRulesetContentName(rulePath []string) string
- func HttpProxyInit(node *Proxy, group, remarks, server, port, username, password string, tls bool, ...)
- func Hysteria2ProxyInit(node *Proxy, ...)
- func SSProxyInit(node *Proxy, ...)
- func SnellProxyInit(node *Proxy, group, remarks, server, port, password, obfs, host string, ...)
- func SocksProxyInit(node *Proxy, group, remarks, server, port, username, password string, ...)
- func TrojanProxyInit(node *Proxy, ...)
- func TuicProxyInit(node *Proxy, ...)
- func VMessProxyInit(node *Proxy, ...)
- func VlessProxyInit(node *Proxy, ...)
- func WireGuardProxyInit(node *Proxy, ...)
- type BalanceStrategy
- type ConfType
- type ExternalConfig
- type ExtraSettings
- type Proxy
- type ProxyGroupConfig
- type ProxyGroupType
- type ProxyType
- type RegexMatchConfig
- type RulesetConfig
- type RulesetContent
- type RulesetType
- type Tribool
- func (t Tribool) Bool() bool
- func (t *Tribool) Clear()
- func (t *Tribool) Define(value bool) *Tribool
- func (t *Tribool) DefineTriBool(value Tribool) *Tribool
- func (t Tribool) Equal(other Tribool) bool
- func (t Tribool) Get(defValue bool) bool
- func (t Tribool) GetStr() string
- func (t Tribool) IsUndef() bool
- func (t *Tribool) Parse(value bool) *Tribool
- func (t *Tribool) Reverse() *Tribool
- func (t *Tribool) Set(str string) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var RulesetTypes = map[string]RulesetType{ "clash-domain:": RULESET_CLASH_DOMAIN, "clash-ipcidr:": RULESET_CLASH_IPCIDR, "clash:": RULESET_CLASH_CLASSICAL, "quanx:": RULESET_QUANX, "surge:": RULESET_SURGE, }
Functions ¶
func AnyTLSProxyInit ¶ added in v0.0.10
func GetRulesetContentName ¶ added in v0.0.8
func HttpProxyInit ¶
func Hysteria2ProxyInit ¶ added in v0.0.12
func SSProxyInit ¶
func SnellProxyInit ¶
func SocksProxyInit ¶
func TrojanProxyInit ¶
func TuicProxyInit ¶ added in v0.0.10
func VMessProxyInit ¶
func VlessProxyInit ¶
Types ¶
type BalanceStrategy ¶
type BalanceStrategy int
const ( BalanceStrategy_ConsistentHashing BalanceStrategy = iota BalanceStrategy_RoundRobin )
type ExternalConfig ¶
type ExternalConfig struct {
CustomProxyGroups []*ProxyGroupConfig
RulesetConfigs []*RulesetConfig
ClashRuleBase string
//SurgeRuleBase string
//SurfboardRuleBase string
//MellowRuleBase string
//QuanRuleBase string
//QuanxRuleBase string
//LoonRuleBase string
//SssubRuleBase string
SingboxRuleBase string
Rename []*RegexMatchConfig
Emoji []*RegexMatchConfig
Include []string
Exclude []string
TplArgs map[string]interface{}
OverwriteOriginalRules bool
EnableRuleGenerator bool
AddEmoji bool
RemoveOldEmoji bool
}
func NewExternalConfig ¶
func NewExternalConfig() *ExternalConfig
type ExtraSettings ¶
type ExtraSettings struct {
NodePref *config.AppConfigNodePref
AppendProxyType Tribool
SkipCertVerify Tribool
FilterDeprecated Tribool
UDP Tribool
TFO Tribool
ManagedConfigPrefix string
ClashScript bool
EnableRuleGenerator bool
OverwriteOriginalRules bool
ClashRuleSetOptimize bool
ClashGeoConvertRuleSet bool
ClashRulesetOptimizeToHttp bool
RequestHost string
RequestHostWithProtocol string
}
func NewExtraSettings ¶
func NewExtraSettings() *ExtraSettings
type Proxy ¶
type Proxy struct {
Type ProxyType
Id uint32
GroupId uint32
Group string
Remark string
Hostname string
Port uint16
Username string
Password string
EncryptMethod string
Plugin string
PluginOption string
Protocol string
ProtocolParam string
OBFS string
OBFSParam string
UserId string
AlterId uint16
TransferProtocol string
FakeType string
TLSSecure bool
Flow string
FlowShow bool
Host string
Path string
Edge string
QUICSecure string
QUICSecret string
GRPCServiceName string
GRPCMode string
UDP Tribool
TCPFastOpen Tribool
AllowInsecure Tribool
TLS13 Tribool
SnellVersion uint16
ServerName string
SelfIP string
SelfIPv6 string
PublicKey string
PrivateKey string
DnsServers []string
Mtu uint16
AllowedIPs string
KeepAlive uint16
TestUrl string
ClientId string
Fingerprint string
ShortId string
ClientFingerprint string
// TUIC fields
UUID string
HeartbeatInterval string
DisableSNI string
ReduceRTT string
RequestTimeout uint32
UdpRelayMode string
CongestionController string
MaxUdpRelayPacketSize uint32
MaxOpenStreams uint32
FastOpen Tribool
Alpn []string
// ANYTLS session management fields
IdleSessionCheckInterval uint32
IdleSessionTimeout uint32
MinIdleSession uint32
// Hysteria2 fields
Ports string // Server ports for port hopping
UpSpeed uint32 // Upload speed in Mbps
DownSpeed uint32 // Download speed in Mbps
Ca string // CA certificate path
CaStr string // CA certificate content
CWND uint32 // Congestion window
HopInterval uint32 // Port hop interval in seconds
}
type ProxyGroupConfig ¶
type ProxyGroupConfig struct {
Name string
Type ProxyGroupType
Proxies []string
UsingProvider []string
Url string
Interval int
Timeout int
Tolerance int
Strategy BalanceStrategy
Lazy Tribool
DisableUdp Tribool
Persistent Tribool
EvaluateBeforeUse Tribool
}
func (*ProxyGroupConfig) StrategyStr ¶
func (p *ProxyGroupConfig) StrategyStr() string
func (*ProxyGroupConfig) TypeStr ¶
func (p *ProxyGroupConfig) TypeStr() string
type ProxyGroupType ¶
type ProxyGroupType int
const ( ProxyGroupType_Select ProxyGroupType = iota ProxyGroupType_URLTest ProxyGroupType_LoadBalance ProxyGroupType_Fallback ProxyGroupType_Relay ProxyGroupType_SSID ProxyGroupType_Smart )
type RegexMatchConfig ¶
type RulesetConfig ¶
func NewRulesetConfig ¶
func NewRulesetConfig() *RulesetConfig
func (*RulesetConfig) Equal ¶
func (c *RulesetConfig) Equal(r *RulesetConfig) bool
type RulesetContent ¶
type RulesetContent struct {
RuleGroup string
RulePath []string
RulePathTyped string
RuleType RulesetType
RuleContent string
UpdateInterval int
}
func CreateRulesetContentFromUrls ¶ added in v0.0.8
func CreateRulesetContentFromUrls(urls []string, group string, ruleType RulesetType) *RulesetContent
func ParseRulesetContents ¶
func ParseRulesetContents(rulesetConfig []*RulesetConfig) []*RulesetContent
func (*RulesetContent) GetRuleSetName ¶ added in v0.0.5
func (l *RulesetContent) GetRuleSetName() string
type RulesetType ¶
type RulesetType int
enum ruleset_type
const ( RULESET_SURGE RulesetType = iota RULESET_QUANX RULESET_CLASH_DOMAIN RULESET_CLASH_IPCIDR RULESET_CLASH_CLASSICAL )
type Tribool ¶
type Tribool struct {
// contains filtered or unexported fields
}
Tribool 表示三态布尔类型
func GetTriboolFromMap ¶
func NewTriboolFromBool ¶
NewTriboolFromBool 从 bool 创建 Tribool
func NewTriboolFromBoolPointer ¶ added in v0.0.2
func NewTriboolFromString ¶
NewTriboolFromString 从字符串创建 Tribool
func (*Tribool) DefineTriBool ¶
Click to show internal directories.
Click to hide internal directories.