mirror of
https://github.com/SagerNet/sing-box.git
synced 2024-12-27 17:15:39 +08:00
clashapi: Add mode list
This commit is contained in:
parent
1086d5e665
commit
0e9129ee3f
|
@ -26,6 +26,8 @@ type configSchema struct {
|
||||||
AllowLan bool `json:"allow-lan"`
|
AllowLan bool `json:"allow-lan"`
|
||||||
BindAddress string `json:"bind-address"`
|
BindAddress string `json:"bind-address"`
|
||||||
Mode string `json:"mode"`
|
Mode string `json:"mode"`
|
||||||
|
// sing-box added
|
||||||
|
ModeList []string `json:"mode-list"`
|
||||||
LogLevel string `json:"log-level"`
|
LogLevel string `json:"log-level"`
|
||||||
IPv6 bool `json:"ipv6"`
|
IPv6 bool `json:"ipv6"`
|
||||||
Tun map[string]any `json:"tun"`
|
Tun map[string]any `json:"tun"`
|
||||||
|
@ -41,6 +43,7 @@ func getConfigs(server *Server, logFactory log.Factory) func(w http.ResponseWrit
|
||||||
}
|
}
|
||||||
render.JSON(w, r, &configSchema{
|
render.JSON(w, r, &configSchema{
|
||||||
Mode: server.mode,
|
Mode: server.mode,
|
||||||
|
ModeList: server.modeList,
|
||||||
BindAddress: "*",
|
BindAddress: "*",
|
||||||
LogLevel: log.FormatLevel(logLevel),
|
LogLevel: log.FormatLevel(logLevel),
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue
Block a user