Documentation ¶
Index ¶
Constants ¶
View Source
const (
DefaultSubscriptionUpdateInterval = 1 * time.Hour
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExtraGroup ¶
type ExtraGroup struct { Tag string `json:"tag,omitempty"` Type string `json:"type,omitempty"` Filter option.Listable[string] `json:"filter,omitempty"` Exclude option.Listable[string] `json:"exclude,omitempty"` CustomSelector *option.SelectorOutboundOptions `json:"custom_selector,omitempty"` CustomURLTest *option.URLTestOutboundOptions `json:"custom_urltest,omitempty"` }
type OutboundProcessOptions ¶
type OutboundProcessOptions struct { Filter option.Listable[string] `json:"filter,omitempty"` Exclude option.Listable[string] `json:"exclude,omitempty"` FilterOutboundType option.Listable[string] `json:"filter_outbound_type,omitempty"` ExcludeOutboundType option.Listable[string] `json:"exclude_outbound_type,omitempty"` Rename *badjson.TypedMap[string, string] `json:"rename,omitempty"` RemoveEmoji bool `json:"remove_emoji,omitempty"` }
type Profile ¶
type Profile struct { Name string `json:"name,omitempty"` Template string `json:"template,omitempty"` TemplateForPlatform *badjson.TypedMap[string, string] `json:"template_for_platform,omitempty"` TemplateForUserAgent *badjson.TypedMap[string, string] `json:"template_for_user_agent,omitempty"` Outbound option.Listable[string] `json:"outbound,omitempty"` Subscription option.Listable[string] `json:"subscription,omitempty"` }
type Subscription ¶
type Subscription struct { Name string `json:"name,omitempty"` URL string `json:"url,omitempty"` UserAgent string `json:"user_agent,omitempty"` UpdateInterval option.Duration `json:"update_interval,omitempty"` Process option.Listable[OutboundProcessOptions] `json:"process,omitempty"` DeDuplication bool `json:"deduplication,omitempty"` GenerateSelector bool `json:"generate_selector,omitempty"` GenerateURLTest bool `json:"generate_urltest,omitempty"` URLTestTagSuffix string `json:"urltest_suffix,omitempty"` CustomSelector *option.SelectorOutboundOptions `json:"custom_selector,omitempty"` CustomURLTest *option.URLTestOutboundOptions `json:"custom_urltest,omitempty"` }
type Template ¶
type Template struct { Name string `json:"name,omitempty"` DomainStrategy option.DomainStrategy `json:"domain_strategy,omitempty"` DisableTrafficBypass bool `json:"disable_traffic_bypass,omitempty"` DisableRuleSet bool `json:"disable_rule_set,omitempty"` RemoteResolve bool `json:"remote_resolve,omitempty"` // DNS DNSDefault string `json:"dns_default,omitempty"` DNSLocal string `json:"dns_local,omitempty"` EnableFakeIP bool `json:"enable_fakeip,omitempty"` PreDNSRules []option.DNSRule `json:"pre_dns_rules,omitempty"` CustomDNSRules []option.DNSRule `json:"custom_dns_rules,omitempty"` // Inbound DisableTUN bool `json:"disable_tun,omitempty"` DisableSystemProxy bool `json:"disable_system_proxy,omitempty"` CustomTUN *TypedMessage[option.TunInboundOptions] `json:"custom_tun,omitempty"` CustomMixed *TypedMessage[option.HTTPMixedInboundOptions] `json:"custom_mixed,omitempty"` // Outbound ExtraGroups []ExtraGroup `json:"extra_groups,omitempty"` GenerateGlobalURLTest bool `json:"generate_global_urltest,omitempty"` DirectTag string `json:"direct_tag,omitempty"` DefaultTag string `json:"default_tag,omitempty"` URLTestTag string `json:"urltest_tag,omitempty"` CustomDirect *option.DirectOutboundOptions `json:"custom_direct,omitempty"` CustomSelector *option.SelectorOutboundOptions `json:"custom_selector,omitempty"` CustomURLTest *option.URLTestOutboundOptions `json:"custom_urltest,omitempty"` // Route DisableDefaultRules bool `json:"disable_default_rules,omitempty"` PreRules []option.Rule `json:"pre_rules,omitempty"` CustomRules []option.Rule `json:"custom_rules,omitempty"` CustomRulesForVersionLessThan badjson.TypedMap[semver.Version, []option.Rule] `json:"custom_rules_for_version_less_than,omitempty"` EnableJSDelivr bool `json:"enable_jsdelivr,omitempty"` CustomGeoIP *option.GeoIPOptions `json:"custom_geoip,omitempty"` CustomGeosite *option.GeositeOptions `json:"custom_geosite,omitempty"` CustomRuleSet []option.RuleSet `json:"custom_rule_set,omitempty"` // Experimental DisableCacheFile bool `json:"disable_cache_file,omitempty"` DisableClashMode bool `json:"disable_clash_mode,omitempty"` ClashModeRule string `json:"clash_mode_rule,omitempty"` ClashModeGlobal string `json:"clash_mode_global,omitempty"` ClashModeDirect string `json:"clash_mode_direct,omitempty"` CustomClashAPI *TypedMessage[option.ClashAPIOptions] `json:"custom_clash_api,omitempty"` // Debug PProfListen string `json:"pprof_listen,omitempty"` MemoryLimit option.MemoryBytes `json:"memory_limit,omitempty"` }
func (Template) DisableIPv6 ¶
type TypedMessage ¶
type TypedMessage[T any] struct { Message json.RawMessage Value T }
func (*TypedMessage[T]) MarshalJSON ¶
func (m *TypedMessage[T]) MarshalJSON() ([]byte, error)
func (*TypedMessage[T]) UnmarshalJSON ¶
func (m *TypedMessage[T]) UnmarshalJSON(bytes []byte) error
Click to show internal directories.
Click to hide internal directories.