mirror of
https://github.com/nadoo/glider.git
synced 2025-02-23 01:15:41 +08:00
strategy: fixed a bug in haproxy which actually act as a rrproxy.
This commit is contained in:
parent
b3b06cbfa5
commit
f8f6308e92
2
ss.go
2
ss.go
@ -19,7 +19,7 @@ type ss struct {
|
||||
func SSProxy(addr, method, pass string, upProxy Proxy) (Proxy, error) {
|
||||
ciph, err := core.PickCipher(method, nil, pass)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
log.Fatalf("PickCipher for '%s', error: %s", method, err)
|
||||
}
|
||||
|
||||
s := &ss{
|
||||
|
@ -75,7 +75,7 @@ func (p *rrProxy) Enabled() bool { return true }
|
||||
func (p *rrProxy) SetEnable(enable bool) {}
|
||||
|
||||
func (p *rrProxy) Dial(network, addr string) (net.Conn, error) {
|
||||
return p.NextProxy().Dial(network, addr)
|
||||
return p.GetProxy(addr).Dial(network, addr)
|
||||
}
|
||||
|
||||
// high availability proxy
|
||||
@ -95,3 +95,7 @@ func (p *haProxy) GetProxy(dstAddr string) Proxy {
|
||||
}
|
||||
return proxy
|
||||
}
|
||||
|
||||
func (p *haProxy) Dial(network, addr string) (net.Conn, error) {
|
||||
return p.GetProxy(addr).Dial(network, addr)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user