forked from kenzuya/unshackle
fix(remote): send the typed --proxy to the server when it resolved to loopback
dl and search keep the typed --proxy value, so --proxy controld:ca --remote sends the server the Control D resolver, not this machine's forwarder. The Control D log names the location and masks the resolver ID in place of 127.0.0.1.
This commit is contained in:
@@ -1613,6 +1613,7 @@ class dl:
|
||||
with console.status("Loading Proxy Providers...", spinner="dots"):
|
||||
self.proxy_providers = load_proxy_providers()
|
||||
|
||||
ctx.params["proxy_arg"] = proxy
|
||||
if proxy and proxy.startswith("controld://"):
|
||||
proxy = ctx.params["proxy"] = resolve_proxy(proxy, [])
|
||||
if proxy:
|
||||
@@ -1647,9 +1648,6 @@ class dl:
|
||||
ctx.params["proxy_query"] = None
|
||||
ctx.params["proxy_provider"] = None
|
||||
|
||||
if self.remote_needs_public_proxy and ctx.params.get("proxy") and is_loopback(ctx.params["proxy"]):
|
||||
raise click.UsageError("That proxy is on your machine, so --remote cannot use it.")
|
||||
|
||||
ctx.obj = ContextData(
|
||||
config=self.service_config,
|
||||
cdm=self.cdm,
|
||||
|
||||
Reference in New Issue
Block a user