experimental.go 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. AccessControlAllowOrigin Listable[string] `json:"access_control_allow_origin,omitempty"`
  25. AccessControlAllowPrivateNetwork bool `json:"access_control_allow_private_network,omitempty"`
  26. // Deprecated: migrated to global cache file
  27. CacheFile string `json:"cache_file,omitempty"`
  28. // Deprecated: migrated to global cache file
  29. CacheID string `json:"cache_id,omitempty"`
  30. // Deprecated: migrated to global cache file
  31. StoreMode bool `json:"store_mode,omitempty"`
  32. // Deprecated: migrated to global cache file
  33. StoreSelected bool `json:"store_selected,omitempty"`
  34. // Deprecated: migrated to global cache file
  35. StoreFakeIP bool `json:"store_fakeip,omitempty"`
  36. }
  37. type V2RayAPIOptions struct {
  38. Listen string `json:"listen,omitempty"`
  39. Stats *V2RayStatsServiceOptions `json:"stats,omitempty"`
  40. }
  41. type V2RayStatsServiceOptions struct {
  42. Enabled bool `json:"enabled,omitempty"`
  43. Inbounds []string `json:"inbounds,omitempty"`
  44. Outbounds []string `json:"outbounds,omitempty"`
  45. Users []string `json:"users,omitempty"`
  46. }