Skip to content

Commit

Permalink
Add backoff to schedialer
Browse files Browse the repository at this point in the history
  • Loading branch information
wzshiming committed Mar 13, 2024
1 parent ff88828 commit 34765dd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions chain/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/wzshiming/bridge/internal/scheme"
"github.com/wzshiming/geario"
"github.com/wzshiming/schedialer"
"github.com/wzshiming/schedialer/plugins/backoff"
"github.com/wzshiming/schedialer/plugins/flow"
"github.com/wzshiming/schedialer/plugins/probe"
"github.com/wzshiming/schedialer/plugins/random"
Expand Down Expand Up @@ -84,6 +85,7 @@ func (b *BridgeChain) Dial(dialer bridge.Dialer, addresses []string, probeUrl st
return b.dialOne(dialer, addresses[0])
}
plugins := []schedialer.Plugin{
backoff.NewBackoff(),
random.NewRandom(1),
flow.NewFlow(40),
rate.NewRate(40),
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/wzshiming/httpproxy v0.5.5
github.com/wzshiming/notify v0.1.1
github.com/wzshiming/permuteproxy v0.0.2
github.com/wzshiming/schedialer v0.3.0
github.com/wzshiming/schedialer v0.4.0
github.com/wzshiming/shadowsocks v0.4.0
github.com/wzshiming/socks4 v0.3.2
github.com/wzshiming/socks5 v0.4.3
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ github.com/wzshiming/notify v0.1.1 h1:rJXoszrkNglhCVyn/IfW500f5cW03q1q7YzL8hsLch
github.com/wzshiming/notify v0.1.1/go.mod h1:SFhsQKZJznzsDcj/Qfo9A65k5IRcpUrpgbLRzZEa/DI=
github.com/wzshiming/permuteproxy v0.0.2 h1:svedMueotlxJk9oJfA0gs8WzRYOdgd0DER9XvKpjwlY=
github.com/wzshiming/permuteproxy v0.0.2/go.mod h1:Ny08A1JbuljB8FeJAOiB7dfvRGCVD8PB9hwrALIvYI8=
github.com/wzshiming/schedialer v0.3.0 h1:dVdg20s5HsRKcOM7psO0eCsXaD/w+tCXaQmm92M6/04=
github.com/wzshiming/schedialer v0.3.0/go.mod h1:TvVxg4QZIBTJzRfmL/G7g6CzynFQKPmtXtSeJ2c4Lus=
github.com/wzshiming/schedialer v0.4.0 h1:BH77oM4ViOqxxtokMhvq1uKSFTTPnIapylXjM4hQLlM=
github.com/wzshiming/schedialer v0.4.0/go.mod h1:TvVxg4QZIBTJzRfmL/G7g6CzynFQKPmtXtSeJ2c4Lus=
github.com/wzshiming/shadowsocks v0.4.0 h1:Yi+4J/DK15qdKlssNEMoWjtmc8wyY8ByIBbC5Ft29bQ=
github.com/wzshiming/shadowsocks v0.4.0/go.mod h1:xYRRSKR+hTihSDUOE+evavx0wkLVODTWVXEcz5vosoE=
github.com/wzshiming/socks4 v0.3.2 h1:w87nwfgRWteVwIH39nqTur8c+2dcODeLgLrWspcUkSc=
Expand Down

0 comments on commit 34765dd

Please sign in to comment.