experimental.go 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. StoreRDRC bool `json:"store_rdrc,omitempty"`
  14. RDRCTimeout Duration `json:"rdrc_timeout,omitempty"`
  15. }
  16. type ClashAPIOptions struct {
  17. ExternalController string `json:"external_controller,omitempty"`
  18. ExternalUI string `json:"external_ui,omitempty"`
  19. ExternalUIDownloadURL string `json:"external_ui_download_url,omitempty"`
  20. ExternalUIDownloadDetour string `json:"external_ui_download_detour,omitempty"`
  21. Secret string `json:"secret,omitempty"`
  22. DefaultMode string `json:"default_mode,omitempty"`
  23. ModeList []string `json:"-"`
  24. // Deprecated: migrated to global cache file
  25. CacheFile string `json:"cache_file,omitempty"`
  26. // Deprecated: migrated to global cache file
  27. CacheID string `json:"cache_id,omitempty"`
  28. // Deprecated: migrated to global cache file
  29. StoreMode bool `json:"store_mode,omitempty"`
  30. // Deprecated: migrated to global cache file
  31. StoreSelected bool `json:"store_selected,omitempty"`
  32. // Deprecated: migrated to global cache file
  33. StoreFakeIP bool `json:"store_fakeip,omitempty"`
  34. }
  35. type V2RayAPIOptions struct {
  36. Listen string `json:"listen,omitempty"`
  37. Stats *V2RayStatsServiceOptions `json:"stats,omitempty"`
  38. }
  39. type V2RayStatsServiceOptions struct {
  40. Enabled bool `json:"enabled,omitempty"`
  41. Inbounds []string `json:"inbounds,omitempty"`
  42. Outbounds []string `json:"outbounds,omitempty"`
  43. Users []string `json:"users,omitempty"`
  44. }