mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
Move always-use-proxy auto-override to master daemon.
This means it will effect connect commands too (though it's too late to stop DNS lookups caused by commandline options). We also warn that this is one case where we allow forcing through Tor without a proxy set: it just means all connections will fail. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -839,6 +839,15 @@ void handle_opts(struct lightningd *ld, int argc, char *argv[])
|
||||
if (argc != 1)
|
||||
errx(1, "no arguments accepted");
|
||||
|
||||
/* We keep a separate variable rather than overriding use_proxy_always,
|
||||
* so listconfigs shows the correct thing. */
|
||||
if (tal_count(ld->proposed_wireaddr) != 0
|
||||
&& all_tor_addresses(ld->proposed_wireaddr)) {
|
||||
ld->pure_tor_setup = true;
|
||||
if (!ld->proxyaddr)
|
||||
log_info(ld->log, "Pure Tor setup with no --proxy:"
|
||||
" you won't be able to make connections out");
|
||||
}
|
||||
check_config(ld);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user