diff --git a/config/config.go b/config/config.go index e94a1a2..1bc7d93 100644 --- a/config/config.go +++ b/config/config.go @@ -81,8 +81,8 @@ func BuildConfig(opt ConfigOptions, input option.Options) (*option.Options, erro } options.Log = &option.LogOptions{ - Level: opt.LogLevel, - // Output: "box.log", + Level: opt.LogLevel, + Output: "box.log", Disabled: false, Timestamp: true, DisableColor: true, diff --git a/config/warp.go b/config/warp.go index 750d5f3..567789a 100644 --- a/config/warp.go +++ b/config/warp.go @@ -161,7 +161,7 @@ func generateWarp(license string, host string, port uint16, fakePackets string) } if host == "auto" && fakePackets == "" { - fakePackets = "5-10" + fakePackets = "8-15" } // warp.UpdatePath("./secondary") if _, err := os.Stat("./wgcf-identity.json"); err == nil { diff --git a/custom/commands.go b/custom/commands.go index d910d1b..3771368 100644 --- a/custom/commands.go +++ b/custom/commands.go @@ -21,7 +21,7 @@ func StartCommand(command int32, port int64, logFactory log.Factory) error { }, &libbox.CommandClientOptions{ Command: libbox.CommandStatus, - StatusInterval: 1000000000, + StatusInterval: 1000000000, //1000ms debounce }, ) return statusClient.Connect() @@ -33,7 +33,7 @@ func StartCommand(command int32, port int64, logFactory log.Factory) error { }, &libbox.CommandClientOptions{ Command: libbox.CommandGroup, - StatusInterval: 30, + StatusInterval: 300000000, //300ms debounce }, ) return groupClient.Connect() @@ -45,7 +45,7 @@ func StartCommand(command int32, port int64, logFactory log.Factory) error { }, &libbox.CommandClientOptions{ Command: libbox.CommandGroupInfoOnly, - StatusInterval: 10, + StatusInterval: 300000000, //300ms debounce }, ) return groupInfoOnlyClient.Connect() diff --git a/go.mod b/go.mod index 9186b46..c3d0ec7 100644 --- a/go.mod +++ b/go.mod @@ -38,7 +38,7 @@ require ( github.com/google/btree v1.1.2 // indirect github.com/google/pprof v0.0.0-20231101202521-4ca4178f5c7a // indirect github.com/hashicorp/yamux v0.1.1 // indirect - github.com/imkira/go-observer v1.0.3 // indirect + github.com/imkira/go-observer/v2 v2.0.0-20230629064422-8e0b61f11f1b // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/insomniacslk/dhcp v0.0.0-20231206064809-8c70d406f6d2 // indirect github.com/josharian/native v1.1.0 // indirect @@ -105,8 +105,8 @@ require ( lukechampine.com/blake3 v1.2.1 // indirect ) -replace github.com/sagernet/sing-box => github.com/hiddify/hiddify-sing-box v1.7.9-0.20240212124505-4c4820c60f1e +replace github.com/sagernet/sing-box => github.com/hiddify/hiddify-sing-box v1.8.6-0.20240213024345-1fb57d3690bd -replace github.com/sagernet/wireguard-go => github.com/hiddify/wireguard-go v0.0.0-20240125143346-481d18d77fe1 +replace github.com/sagernet/wireguard-go => github.com/hiddify/wireguard-go v0.0.0-20240213020321-89576b161250 replace github.com/bepass-org/wireguard-go => github.com/hiddify-com/wireguard-go v0.0.2-alpha.0.20240212065415-62301f758cb7 diff --git a/go.sum b/go.sum index b6768e6..caa23da 100644 --- a/go.sum +++ b/go.sum @@ -53,14 +53,14 @@ github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= github.com/hiddify-com/wireguard-go v0.0.2-alpha.0.20240212065415-62301f758cb7 h1:RTlGYawrP2Ir2ADQmLS7+OmRShmk1qPm69ufArXvsqI= github.com/hiddify-com/wireguard-go v0.0.2-alpha.0.20240212065415-62301f758cb7/go.mod h1:/ny1FvyrV7/QPClexDyYCEFQfTQn7dD/+1DfedBSwuY= -github.com/hiddify/hiddify-sing-box v1.7.9-0.20240212124505-4c4820c60f1e h1:gU2SgeLkuDfhyNahyfLeRnYXlKQiiODnKJoIvjYkh/g= -github.com/hiddify/hiddify-sing-box v1.7.9-0.20240212124505-4c4820c60f1e/go.mod h1:ugPScStYJR/Tzw2KMGBjw2wApO1da5ZMOrc5dTVStfU= +github.com/hiddify/hiddify-sing-box v1.8.6-0.20240213024345-1fb57d3690bd h1:F87K1GtyOOqX6Lsru+5CkUVwEuaOehN+ls4GC4RcL+k= +github.com/hiddify/hiddify-sing-box v1.8.6-0.20240213024345-1fb57d3690bd/go.mod h1:OQ0aCM3q+9mBaVr3yQx2cWvPR1pKZjaBcI24Y82Papw= github.com/hiddify/ray2sing v0.0.0-20240130210008-8975ff77e3cd h1:3fKPvAWXTMGY0Qsk6wjCamIeC4xbrOUShMY95G5AZN4= github.com/hiddify/ray2sing v0.0.0-20240130210008-8975ff77e3cd/go.mod h1:zYKnf7EoPqrk7JOMO9BApTXxfH0sva8AKfoFywN7uuA= -github.com/hiddify/wireguard-go v0.0.0-20240125143346-481d18d77fe1 h1:neOb+wzHbWLNZ2sHFEV4+GTuqORO7/MndQLFW8FjUY8= -github.com/hiddify/wireguard-go v0.0.0-20240125143346-481d18d77fe1/go.mod h1:K4J7/npM+VAMUeUmTa2JaA02JmyheP0GpRBOUvn3ecc= -github.com/imkira/go-observer v1.0.3 h1:l45TYAEeAB4L2xF6PR2gRLn2NE5tYhudh33MLmC7B80= -github.com/imkira/go-observer v1.0.3/go.mod h1:zLzElv2cGTHufQG17IEILJMPDg32TD85fFgKyFv00wU= +github.com/hiddify/wireguard-go v0.0.0-20240213020321-89576b161250 h1:mgIWgJSmGFfxYwcHPBcHel11zuBc5nQqTD4Zg1GBbH4= +github.com/hiddify/wireguard-go v0.0.0-20240213020321-89576b161250/go.mod h1:K4J7/npM+VAMUeUmTa2JaA02JmyheP0GpRBOUvn3ecc= +github.com/imkira/go-observer/v2 v2.0.0-20230629064422-8e0b61f11f1b h1:1+115FqGoS8p6Iry9AYmrcWDvSveH0F7P2nX1LU00qg= +github.com/imkira/go-observer/v2 v2.0.0-20230629064422-8e0b61f11f1b/go.mod h1:XCscqBi1KKh7GcVDDAdkT/Cf6WDjnDAA1XM3nwmA0Ag= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/insomniacslk/dhcp v0.0.0-20231206064809-8c70d406f6d2 h1:9K06NfxkBh25x56yVhWWlKFE8YpicaSfHwoV8SFbueA=