2022-07-02 14:07:50 +08:00
|
|
|
package option
|
|
|
|
|
2024-11-12 19:37:10 +08:00
|
|
|
import "github.com/sagernet/sing/common/json/badoption"
|
|
|
|
|
2022-07-02 22:55:10 +08:00
|
|
|
type RouteOptions struct {
|
2024-11-13 19:05:28 +08:00
|
|
|
GeoIP *GeoIPOptions `json:"geoip,omitempty"`
|
|
|
|
Geosite *GeositeOptions `json:"geosite,omitempty"`
|
|
|
|
Rules []Rule `json:"rules,omitempty"`
|
|
|
|
RuleSet []RuleSet `json:"rule_set,omitempty"`
|
|
|
|
Final string `json:"final,omitempty"`
|
|
|
|
FindProcess bool `json:"find_process,omitempty"`
|
|
|
|
AutoDetectInterface bool `json:"auto_detect_interface,omitempty"`
|
|
|
|
OverrideAndroidVPN bool `json:"override_android_vpn,omitempty"`
|
|
|
|
DefaultInterface string `json:"default_interface,omitempty"`
|
|
|
|
DefaultMark FwMark `json:"default_mark,omitempty"`
|
2024-12-15 00:45:41 +08:00
|
|
|
DefaultNetworkStrategy *NetworkStrategy `json:"default_network_strategy,omitempty"`
|
2024-11-13 19:05:28 +08:00
|
|
|
DefaultNetworkType badoption.Listable[InterfaceType] `json:"default_network_type,omitempty"`
|
|
|
|
DefaultFallbackNetworkType badoption.Listable[InterfaceType] `json:"default_fallback_network_type,omitempty"`
|
|
|
|
DefaultFallbackDelay badoption.Duration `json:"default_fallback_delay,omitempty"`
|
2022-07-02 22:55:10 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
type GeoIPOptions struct {
|
|
|
|
Path string `json:"path,omitempty"`
|
|
|
|
DownloadURL string `json:"download_url,omitempty"`
|
|
|
|
DownloadDetour string `json:"download_detour,omitempty"`
|
|
|
|
}
|
|
|
|
|
2022-07-05 09:05:35 +08:00
|
|
|
type GeositeOptions struct {
|
|
|
|
Path string `json:"path,omitempty"`
|
|
|
|
DownloadURL string `json:"download_url,omitempty"`
|
|
|
|
DownloadDetour string `json:"download_detour,omitempty"`
|
|
|
|
}
|