Skip to content

Commit

Permalink
Update schedialer
Browse files Browse the repository at this point in the history
  • Loading branch information
wzshiming committed Aug 20, 2021
1 parent d17a315 commit d2de90e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions chain/chain.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package chain

import (
"context"
"fmt"
"strings"

Expand Down Expand Up @@ -73,7 +74,7 @@ func (b *BridgeChain) dialMulti(dialer bridge.Dialer, addresses []string, plugin
if len(addresses) == 1 {
return b.dialOne(dialer, addresses[0])
}

ctx := context.Background()
plugin := schedialer.NewPlugins(plugins...)
for _, address := range addresses {
dial, err := b.dialOne(dialer, address)
Expand All @@ -84,7 +85,7 @@ func (b *BridgeChain) dialMulti(dialer bridge.Dialer, addresses []string, plugin
Name: address,
Dialer: dial,
}
plugin.AddProxy(&proxy)
plugin.AddProxy(ctx, &proxy)
}
return schedialer.NewSchedialer(plugin), nil
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/wzshiming/commandproxy v0.2.0
github.com/wzshiming/httpproxy v0.3.4
github.com/wzshiming/notify v0.1.0
github.com/wzshiming/schedialer v0.1.1
github.com/wzshiming/schedialer v0.2.0
github.com/wzshiming/shadowsocks v0.2.1
github.com/wzshiming/socks4 v0.2.3
github.com/wzshiming/socks5 v0.2.3
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ github.com/wzshiming/httpproxy v0.3.4 h1:HpDmF0jQv83zMtMSJgd2CA41OlX98yNMJDnHnZP
github.com/wzshiming/httpproxy v0.3.4/go.mod h1:drZR+iQLfYsQi7/nETLjyB9Z0f5KDXQo2PEkJBbg3xQ=
github.com/wzshiming/notify v0.1.0 h1:BZND3IfiWkyDseAiaqLb43mTU8vefmmK0gOdnuschPI=
github.com/wzshiming/notify v0.1.0/go.mod h1:SFhsQKZJznzsDcj/Qfo9A65k5IRcpUrpgbLRzZEa/DI=
github.com/wzshiming/schedialer v0.1.1 h1:ozkPD0tiEDTj62SGq/tqyE9IpAmA51d3GCFTTZf0JxE=
github.com/wzshiming/schedialer v0.1.1/go.mod h1:TvVxg4QZIBTJzRfmL/G7g6CzynFQKPmtXtSeJ2c4Lus=
github.com/wzshiming/schedialer v0.2.0 h1:2fOE92jJG92pa+20vaQgHSWYxL5mdoY62+R0h8CrzKA=
github.com/wzshiming/schedialer v0.2.0/go.mod h1:TvVxg4QZIBTJzRfmL/G7g6CzynFQKPmtXtSeJ2c4Lus=
github.com/wzshiming/shadowsocks v0.2.1 h1:DmWJ6mojdAwdNGw5XWk9ooU2YAuE9vZpNNUYUkln+ME=
github.com/wzshiming/shadowsocks v0.2.1/go.mod h1:56WQwfUpgC/HMhZFNOVTBCP9nbMvL5rAepKRIkSKPsg=
github.com/wzshiming/socks4 v0.2.3 h1:H22IqBxSlWkXC6pZIN9y3ftqhc99TObRSjZQHKdtHqc=
Expand Down

0 comments on commit d2de90e

Please sign in to comment.