diff options
Diffstat (limited to 'pkg/vpn/bonafide/gateways.go')
-rw-r--r-- | pkg/vpn/bonafide/gateways.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/vpn/bonafide/gateways.go b/pkg/vpn/bonafide/gateways.go index 6084985..d973530 100644 --- a/pkg/vpn/bonafide/gateways.go +++ b/pkg/vpn/bonafide/gateways.go @@ -142,6 +142,14 @@ func (p *gatewayPool) getBest(transport string, tz, max int) ([]Gateway, error) } } +func (p *gatewayPool) getAll(transport string, tz int) ([]Gateway, error) { + if len(p.ranked) != 0 { + return p.getGatewaysByServiceRank(transport, 999) + } else { + return p.getGatewaysByTimezone(transport, tz, 999) + } +} + func (p *gatewayPool) getGatewaysByServiceRank(transport string, max int) ([]Gateway, error) { gws := make([]Gateway, 0) for _, host := range p.ranked { |