Add store_mode and platform Clash mode selector

This commit is contained in:
世界
2023-08-24 21:52:38 +08:00
parent 6dcacf3b5e
commit 43f72a6419
29 changed files with 405 additions and 71 deletions

View File

@@ -12,6 +12,7 @@ type ClashServer interface {
Service
PreStarter
Mode() string
ModeList() []string
StoreSelected() bool
StoreFakeIP() bool
CacheFile() ClashCacheFile
@@ -21,6 +22,8 @@ type ClashServer interface {
}
type ClashCacheFile interface {
LoadMode() string
StoreMode(mode string) error
LoadSelected(group string) string
StoreSelected(group string, selected string) error
LoadGroupExpand(group string) (isExpand bool, loaded bool)