route.go 1.4 KB

123456789101112131415161718192021222324252627282930
  1. package option
  2. import "github.com/sagernet/sing/common/json/badoption"
  3. type RouteOptions struct {
  4. GeoIP *GeoIPOptions `json:"geoip,omitempty"`
  5. Geosite *GeositeOptions `json:"geosite,omitempty"`
  6. Rules []Rule `json:"rules,omitempty"`
  7. RuleSet []RuleSet `json:"rule_set,omitempty"`
  8. Final string `json:"final,omitempty"`
  9. FindProcess bool `json:"find_process,omitempty"`
  10. AutoDetectInterface bool `json:"auto_detect_interface,omitempty"`
  11. OverrideAndroidVPN bool `json:"override_android_vpn,omitempty"`
  12. DefaultInterface string `json:"default_interface,omitempty"`
  13. DefaultMark uint32 `json:"default_mark,omitempty"`
  14. DefaultNetworkStrategy NetworkStrategy `json:"default_network_strategy,omitempty"`
  15. DefaultFallbackDelay badoption.Duration `json:"default_fallback_delay,omitempty"`
  16. }
  17. type GeoIPOptions struct {
  18. Path string `json:"path,omitempty"`
  19. DownloadURL string `json:"download_url,omitempty"`
  20. DownloadDetour string `json:"download_detour,omitempty"`
  21. }
  22. type GeositeOptions struct {
  23. Path string `json:"path,omitempty"`
  24. DownloadURL string `json:"download_url,omitempty"`
  25. DownloadDetour string `json:"download_detour,omitempty"`
  26. }