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

@@ -140,7 +140,8 @@ struct wireaddr_internal {
};
bool parse_wireaddr_internal(const char *arg, struct wireaddr_internal *addr,
u16 port, bool wildcard_ok, bool dns_ok,
bool unresolved_ok, const char **err_msg);
bool unresolved_ok, bool allow_deprecated,
const char **err_msg);
void towire_wireaddr_internal(u8 **pptr,
const struct wireaddr_internal *addr);