Add clash mode support

This commit is contained in:
世界
2022-09-10 14:09:47 +08:00
parent 80cfc9a25b
commit 5297273937
12 changed files with 98 additions and 23 deletions

View File

@@ -1,6 +1,7 @@
package option
type ClashAPIOptions struct {
DefaultMode string `json:"default_mode,omitempty"`
ExternalController string `json:"external_controller,omitempty"`
ExternalUI string `json:"external_ui,omitempty"`
Secret string `json:"secret,omitempty"`

View File

@@ -99,6 +99,7 @@ type DefaultDNSRule struct {
User Listable[string] `json:"user,omitempty"`
UserID Listable[int32] `json:"user_id,omitempty"`
Outbound Listable[string] `json:"outbound,omitempty"`
ClashMode string `json:"clash_mode,omitempty"`
Invert bool `json:"invert,omitempty"`
Server string `json:"server,omitempty"`
DisableCache bool `json:"disable_cache,omitempty"`

View File

@@ -101,6 +101,7 @@ type DefaultRule struct {
PackageName Listable[string] `json:"package_name,omitempty"`
User Listable[string] `json:"user,omitempty"`
UserID Listable[int32] `json:"user_id,omitempty"`
ClashMode string `json:"clash_mode,omitempty"`
Invert bool `json:"invert,omitempty"`
Outbound string `json:"outbound,omitempty"`
}