mirror of
https://github.com/Snawoot/hola-proxy.git
synced 2026-04-02 14:48:12 +00:00
Add new proxy type pool
This commit is contained in:
@@ -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`).
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
2
main.go
2
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.")
|
||||
|
||||
2
utils.go
2
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 {
|
||||
|
||||
Reference in New Issue
Block a user