package conf type SingConfig struct { LogConfig SingLogConfig `json:"Log"` OriginalPath string `json:"OriginalPath"` } type SingLogConfig struct { Disabled bool `json:"Disable"` Level string `json:"Level"` Output string `json:"Output"` Timestamp bool `json:"Timestamp"` } func NewSingConfig() *SingConfig { return &SingConfig{ LogConfig: SingLogConfig{ Level: "error", Timestamp: true, }, } } type SingOptions struct { EnableProxyProtocol bool `json:"EnableProxyProtocol"` TCPFastOpen bool `json:"EnableTFO"` SniffEnabled bool `json:"EnableSniff"` SniffOverrideDestination bool `json:"SniffOverrideDestination"` FallBackConfigs *FallBackConfigForSing `json:"FallBackConfigs"` } type FallBackConfigForSing struct { // sing-box FallBack FallBack `json:"FallBack"` FallBackForALPN map[string]FallBack `json:"FallBackForALPN"` } type FallBack struct { Server string `json:"Server"` ServerPort string `json:"ServerPort"` } func NewSingOptions() *SingOptions { return &SingOptions{ EnableProxyProtocol: false, TCPFastOpen: false, SniffEnabled: true, SniffOverrideDestination: true, FallBackConfigs: &FallBackConfigForSing{}, } }