mirror of
https://github.com/SagerNet/sing-box.git
synced 2025-06-13 21:54:13 +08:00
show clash_mode
list in clash api
(cherry picked from commit c25ad61e65ca17a830978db1a3530cc33f3a3c39)
This commit is contained in:
parent
1650ab2ae3
commit
185cfd8d1d
@ -26,6 +26,7 @@ type configSchema struct {
|
||||
AllowLan bool `json:"allow-lan"`
|
||||
BindAddress string `json:"bind-address"`
|
||||
Mode string `json:"mode"`
|
||||
Modes []string `json:"modes"`
|
||||
LogLevel string `json:"log-level"`
|
||||
IPv6 bool `json:"ipv6"`
|
||||
Tun map[string]any `json:"tun"`
|
||||
@ -41,6 +42,7 @@ func getConfigs(server *Server, logFactory log.Factory) func(w http.ResponseWrit
|
||||
}
|
||||
render.JSON(w, r, &configSchema{
|
||||
Mode: server.mode,
|
||||
Modes: server.modeList,
|
||||
BindAddress: "*",
|
||||
LogLevel: log.FormatLevel(logLevel),
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user