platform: Enable Clash API support by default

This commit is contained in:
世界
2023-08-09 09:55:40 +08:00
parent 298d3cc054
commit 977aef8fba
2 changed files with 16 additions and 12 deletions

2
box.go
View File

@@ -51,7 +51,7 @@ func New(options Options) (*Box, error) {
applyDebugOptions(common.PtrValueOrDefault(experimentalOptions.Debug))
var needClashAPI bool
var needV2RayAPI bool
if experimentalOptions.ClashAPI != nil && experimentalOptions.ClashAPI.ExternalController != "" {
if experimentalOptions.ClashAPI != nil || options.PlatformInterface != nil {
needClashAPI = true
}
if experimentalOptions.V2RayAPI != nil && experimentalOptions.V2RayAPI.Listen != "" {