diff --git a/README.md b/README.md index e47c908..5b310b8 100644 --- a/README.md +++ b/README.md @@ -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`). --- diff --git a/holaapi.go b/holaapi.go index 9e20871..8611f06 100644 --- a/holaapi.go +++ b/holaapi.go @@ -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) } diff --git a/main.go b/main.go index 177391a..eb49727 100644 --- a/main.go +++ b/main.go @@ -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.") diff --git a/utils.go b/utils.go index 66b3f27..ec01a5f 100644 --- a/utils.go +++ b/utils.go @@ -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 {