Fix platform API check

This commit is contained in:
世界 2023-11-20 23:41:10 +08:00
parent 925214869b
commit eaccc9759a
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4

2
box.go
View File

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