experimental.go 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. package option
  2. type ExperimentalOptions struct {
  3. CacheFile *CacheFileOptions `json:"cache_file,omitempty"`
  4. ClashAPI *ClashAPIOptions `json:"clash_api,omitempty"`
  5. V2RayAPI *V2RayAPIOptions `json:"v2ray_api,omitempty"`
  6. Debug *DebugOptions `json:"debug,omitempty"`
  7. }
  8. type CacheFileOptions struct {
  9. Enabled bool `json:"enabled,omitempty"`
  10. Path string `json:"path,omitempty"`
  11. CacheID string `json:"cache_id,omitempty"`
  12. StoreFakeIP bool `json:"store_fakeip,omitempty"`
  13. }
  14. type ClashAPIOptions struct {
  15. ExternalController string `json:"external_controller,omitempty"`
  16. ExternalUI string `json:"external_ui,omitempty"`
  17. ExternalUIDownloadURL string `json:"external_ui_download_url,omitempty"`
  18. ExternalUIDownloadDetour string `json:"external_ui_download_detour,omitempty"`
  19. Secret string `json:"secret,omitempty"`
  20. DefaultMode string `json:"default_mode,omitempty"`
  21. ModeList []string `json:"-"`
  22. // Deprecated: migrated to global cache file
  23. CacheFile string `json:"cache_file,omitempty"`
  24. // Deprecated: migrated to global cache file
  25. CacheID string `json:"cache_id,omitempty"`
  26. // Deprecated: migrated to global cache file
  27. StoreMode bool `json:"store_mode,omitempty"`
  28. // Deprecated: migrated to global cache file
  29. StoreSelected bool `json:"store_selected,omitempty"`
  30. // Deprecated: migrated to global cache file
  31. StoreFakeIP bool `json:"store_fakeip,omitempty"`
  32. }
  33. type V2RayAPIOptions struct {
  34. Listen string `json:"listen,omitempty"`
  35. Stats *V2RayStatsServiceOptions `json:"stats,omitempty"`
  36. }
  37. type V2RayStatsServiceOptions struct {
  38. Enabled bool `json:"enabled,omitempty"`
  39. Inbounds []string `json:"inbounds,omitempty"`
  40. Outbounds []string `json:"outbounds,omitempty"`
  41. Users []string `json:"users,omitempty"`
  42. }