Skip to content

Commit

Permalink
add auto recovery, send group with their active profiles, make warp m…
Browse files Browse the repository at this point in the history
…ore robust thanks to uoosef, support multiple receiver for command group
  • Loading branch information
hiddify-com committed Feb 13, 2024
1 parent a2f5708 commit a1314d8
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion config/warp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions custom/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand All @@ -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()
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down

0 comments on commit a1314d8

Please # to comment.