Documentation
¶
Overview ¶
Copyright 2022 gdy, 272288813@qq.com
Copyright 2022 gdy, 272288813@qq.com
Copyright 2022 gdy, 272288813@qq.com
Index ¶
- func AddRuleToGlobalRuleList(sync bool, rl ...RelayRule) (string, error)
- func AlterRuleInGlobalRuleListByKey(key string, rule *RelayRule) (bool, error)
- func CheckProxyConflict(proxyList *[]base.Proxy, proxyType, listenIP string, listenPort int) error
- func DeleteGlobalRuleByKey(key string) (bool, error)
- func EnableAllRelayRule() error
- func GetGlobalEnableProxyCount() int64
- func GetProxyInfo(p base.Proxy) map[string]string
- func GetRelayRuleList() (*[]RelayRule, map[string][]RelayRuleProxyInfo)
- func GetRelayRulesFromCMD(configureList []string, options *base.RelayRuleOptions) (relayRules *[]RelayRule, err error)
- func SetGlobalRelayRules(rl *[]RelayRule)
- type RelayRule
- func CreateRuleByConfigureAndOptions(name, configureStr string, options base.RelayRuleOptions) (rule *RelayRule, err error)
- func DeleteRuleSlice(a []RelayRule, deleteIndex int) []RelayRule
- func DisableRelayRuleByKey(key string) (*RelayRule, bool, error)
- func EnableRelayRuleByKey(key string) (*RelayRule, bool, error)
- func GetRuleByMainConfigure(configStr string) *RelayRule
- type RelayRuleProxyInfo
- type SubRelayRule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddRuleToGlobalRuleList ¶
func CheckProxyConflict ¶
CheckProxyConflict 冲突检查
func DeleteGlobalRuleByKey ¶
func EnableAllRelayRule ¶
func EnableAllRelayRule() error
func GetGlobalEnableProxyCount ¶
func GetGlobalEnableProxyCount() int64
func GetRelayRuleList ¶
func GetRelayRuleList() (*[]RelayRule, map[string][]RelayRuleProxyInfo)
func GetRelayRulesFromCMD ¶
func GetRelayRulesFromCMD(configureList []string, options *base.RelayRuleOptions) (relayRules *[]RelayRule, err error)
func SetGlobalRelayRules ¶
func SetGlobalRelayRules(rl *[]RelayRule)
Types ¶
type RelayRule ¶
type RelayRule struct { Name string `json:"Name"` MainConfigure string `json:"Mainconfigure"` RelayType string `json:"RelayType"` ListenIP string `json:"ListenIP"` ListenPorts string `json:"ListenPorts"` TargetIP string `json:"TargetIP"` TargetPorts string `json:"TargetPorts"` BalanceTargetAddressList []string `json:"BalanceTargetAddressList"` Options base.RelayRuleOptions `json:"Options"` SubRuleList []SubRelayRule `json:"SubRuleList"` From string `json:"From"` IsEnable bool `json:"Enable"` // contains filtered or unexported fields }
func CreateRuleByConfigureAndOptions ¶
func CreateRuleByConfigureAndOptions(name, configureStr string, options base.RelayRuleOptions) (rule *RelayRule, err error)
func DeleteRuleSlice ¶
func GetRuleByMainConfigure ¶
func (*RelayRule) CreateMainConfigure ¶
func (*RelayRule) GetProxyCount ¶
type RelayRuleProxyInfo ¶
type SubRelayRule ¶
Click to show internal directories.
Click to hide internal directories.