Documentation
¶
Index ¶
- type ApiConfig
- type CertConfig
- type Conf
- type CoreConfig
- type DynamicSpeedLimitConfig
- type FallBack
- type FallBackConfigForSing
- type FallBackConfigForXray
- type IpReportConfig
- type LimitConfig
- type LogConfig
- type NodeConfig
- type Options
- type RecorderConfig
- type RedisConfig
- type SingConfig
- type SingLogConfig
- type SingNtpConfig
- type SingOptions
- type XrayConfig
- type XrayConnectionConfig
- type XrayLogConfig
- type XrayOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertConfig ¶
type CertConfig struct {
CertMode string `json:"CertMode"` // none, file, http, dns
RejectUnknownSni bool `json:"RejectUnknownSni"`
CertDomain string `json:"CertDomain"`
CertFile string `json:"CertFile"`
KeyFile string `json:"KeyFile"`
Provider string `json:"Provider"` // alidns, cloudflare, gandi, godaddy....
Email string `json:"Email"`
DNSEnv map[string]string `json:"DNSEnv"`
}
func NewCertConfig ¶
func NewCertConfig() *CertConfig
type Conf ¶
type Conf struct {
LogConfig LogConfig `json:"Log"`
CoresConfig []CoreConfig `json:"Cores"`
NodeConfig []NodeConfig `json:"Nodes"`
}
func (*Conf) LoadFromPath ¶
type CoreConfig ¶
type CoreConfig struct {
Type string `json:"Type"`
Name string `json:"Name"`
XrayConfig *XrayConfig `json:"-"`
SingConfig *SingConfig `json:"-"`
}
func (*CoreConfig) UnmarshalJSON ¶
func (c *CoreConfig) UnmarshalJSON(b []byte) error
type DynamicSpeedLimitConfig ¶
type FallBackConfigForSing ¶
type FallBackConfigForXray ¶
type IpReportConfig ¶
type IpReportConfig struct {
Periodic int `json:"Periodic"`
Type string `json:"Type"`
RecorderConfig *RecorderConfig `json:"RecorderConfig"`
RedisConfig *RedisConfig `json:"RedisConfig"`
EnableIpSync bool `json:"EnableIpSync"`
}
type LimitConfig ¶
type LimitConfig struct {
EnableRealtime bool `json:"EnableRealtime"`
SpeedLimit int `json:"SpeedLimit"`
IPLimit int `json:"DeviceLimit"`
ConnLimit int `json:"ConnLimit"`
EnableIpRecorder bool `json:"EnableIpRecorder"`
IpRecorderConfig *IpReportConfig `json:"IpRecorderConfig"`
EnableDynamicSpeedLimit bool `json:"EnableDynamicSpeedLimit"`
DynamicSpeedLimitConfig *DynamicSpeedLimitConfig `json:"DynamicSpeedLimitConfig"`
}
type NodeConfig ¶
func (*NodeConfig) UnmarshalJSON ¶
func (n *NodeConfig) UnmarshalJSON(data []byte) (err error)
type Options ¶
type Options struct {
Name string `json:"Name"`
Core string `json:"Core"`
CoreName string `json:"CoreName"`
ListenIP string `json:"ListenIP"`
SendIP string `json:"SendIP"`
DeviceOnlineMinTraffic int64 `json:"DeviceOnlineMinTraffic"`
LimitConfig LimitConfig `json:"LimitConfig"`
RawOptions json.RawMessage `json:"RawOptions"`
XrayOptions *XrayOptions `json:"XrayOptions"`
SingOptions *SingOptions `json:"SingOptions"`
CertConfig *CertConfig `json:"CertConfig"`
}
func (*Options) UnmarshalJSON ¶
type RecorderConfig ¶
type RedisConfig ¶
type SingConfig ¶
type SingConfig struct {
LogConfig SingLogConfig `json:"Log"`
NtpConfig SingNtpConfig `json:"NTP"`
EnableConnClear bool `json:"EnableConnClear"`
DnsConfigPath string `json:"DnsConfigPath"`
OriginalPath string `json:"OriginalPath"`
}
func NewSingConfig ¶
func NewSingConfig() *SingConfig
type SingLogConfig ¶
type SingNtpConfig ¶
type SingOptions ¶
type SingOptions struct {
EnableProxyProtocol bool `json:"EnableProxyProtocol"`
TCPFastOpen bool `json:"EnableTFO"`
SniffEnabled bool `json:"EnableSniff"`
EnableDNS bool `json:"EnableDNS"`
DomainStrategy option.DomainStrategy `json:"DomainStrategy"`
SniffOverrideDestination bool `json:"SniffOverrideDestination"`
FallBackConfigs *FallBackConfigForSing `json:"FallBackConfigs"`
}
func NewSingOptions ¶
func NewSingOptions() *SingOptions
type XrayConfig ¶
type XrayConfig struct {
LogConfig *XrayLogConfig `json:"Log"`
AssetPath string `json:"AssetPath"`
DnsConfigPath string `json:"DnsConfigPath"`
RouteConfigPath string `json:"RouteConfigPath"`
ConnectionConfig *XrayConnectionConfig `json:"XrayConnectionConfig"`
InboundConfigPath string `json:"InboundConfigPath"`
OutboundConfigPath string `json:"OutboundConfigPath"`
}
func NewXrayConfig ¶
func NewXrayConfig() *XrayConfig
type XrayConnectionConfig ¶
type XrayLogConfig ¶
type XrayOptions ¶
type XrayOptions struct {
EnableProxyProtocol bool `json:"EnableProxyProtocol"`
EnableDNS bool `json:"EnableDNS"`
DNSType string `json:"DNSType"`
EnableUot bool `json:"EnableUot"`
EnableTFO bool `json:"EnableTFO"`
DisableIVCheck bool `json:"DisableIVCheck"`
DisableSniffing bool `json:"DisableSniffing"`
EnableFallback bool `json:"EnableFallback"`
FallBackConfigs []FallBackConfigForXray `json:"FallBackConfigs"`
}
func NewXrayOptions ¶
func NewXrayOptions() *XrayOptions
Click to show internal directories.
Click to hide internal directories.