Refuse to parse v2 onion addresses without deprecated_apis

Tor v2 hidden services have been deprecated for a while:
https://blog.torproject.org/v2-deprecation-timeline .

This prevents user from being able to set them in the configuration
and to connect to them while still letting us be able to parse them
for gossip.

Changelog-Deprecated: lightningd: v2 Tor addresses.  Use v3.  See https://blog.torproject.org/v2-deprecation-timeline.

Signed-off-by: Antoine Poinsot <darosior@protonmail.com>
This commit is contained in:
Antoine Poinsot
2021-05-20 17:45:27 +02:00
committed by Rusty Russell
parent 7bf17572b5
commit fe8074c8c3
12 changed files with 151 additions and 130 deletions

View File

@@ -299,7 +299,7 @@ int main(int argc, char *argv[])
(int)(at - argv[1]), argv[1]);
if (!parse_wireaddr_internal(at+1, &addr, DEFAULT_PORT, NULL,
true, false, &err_msg))
true, false, true, &err_msg))
opt_usage_exit_fail("%s '%s'", err_msg, argv[1]);
switch (addr.itype) {