Add new proxy type pool

This commit is contained in:
rany
2021-03-07 12:47:04 +02:00
parent 5246eff0f5
commit e2c9711d73
4 changed files with 7 additions and 4 deletions

View File

@@ -4,7 +4,7 @@
Standalone Hola proxy client. Just run it and it'll start plain HTTP proxy server forwarding traffic via Hola proxies of your choice. By default application listens port on 127.0.0.1:8080.
Application is capable to forward traffic via proxies in datacenters (flag `-proxy-type direct`, default) or via peer proxies on residental IPs (consumer ISP) in that country (flag `-proxy-type peer`).
Application is capable to forward traffic via proxies in datacenters (flag `-proxy-type direct`, default) or via peer proxies on residental IPs (consumer ISP) in that country (flag `-proxy-type pool` or `-proxy-type lum`).
---

View File

@@ -133,7 +133,10 @@ func zgettunnels(ctx context.Context,
if proxy_type == "lum" {
params.Add("country", country + ".pool_lum_" + country + "_shared")
} else if proxy_type == "peer" {
params.Add("country", country + ".peer")
//params.Add("country", country + ".peer")
params.Add("country", country)
} else if proxy_type == "pool" {
params.Add("country", country + ".pool")
} else {
params.Add("country", country)
}

View File

@@ -57,7 +57,7 @@ func parse_args() CLIArgs {
"(10 - debug, 20 - info, 30 - warning, 40 - error, 50 - critical)")
flag.DurationVar(&args.timeout, "timeout", 10 * time.Second, "timeout for network operations")
flag.DurationVar(&args.rotate, "rotate", 1 * time.Hour, "rotate user ID once per given period")
flag.StringVar(&args.proxy_type, "proxy-type", "direct", "proxy type: direct or peer or lum")
flag.StringVar(&args.proxy_type, "proxy-type", "direct", "proxy type: direct or peer or lum or pool")
flag.StringVar(&args.resolver, "resolver", "https://cloudflare-dns.com/dns-query",
"DNS/DoH/DoT resolver to workaround Hola blocked hosts. " +
"See https://github.com/ameshkov/dnslookup/ for upstream DNS URL format.")

View File

@@ -104,7 +104,7 @@ func get_endpoint(tunnels *ZGetTunnelsResponse, typ string, trial bool) (string,
return "", errors.New("No tunnels found in API response")
}
var port uint16
if typ == "direct" || typ == "lum" {
if typ == "direct" || typ == "lum" || typ == "pool" {
if trial {
port = tunnels.Port.Trial
} else {