core-lightning/gossipd/tor.h
Rusty Russell 9d8e3cf3da gossip: handle Tor proxy better.
1. Only force proxy use if we don't announce any non-TOR address.
   There's no option to turn it off, so this makes more sense.
2. Don't assume we want an IPv4 socket to reach proxy, use the family
   from the struct addrinfo.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-05-10 02:28:44 +00:00

19 lines
445 B
C

#ifndef LIGHTNING_GOSSIPD_TOR_H
#define LIGHTNING_GOSSIPD_TOR_H
#include "config.h"
#include <stdbool.h>
struct addrinfo;
struct wireaddr;
struct io_conn;
struct reaching;
bool all_tor_addresses(const struct wireaddr *wireaddr);
struct io_plan *io_tor_connect(struct io_conn *conn,
const struct addrinfo *tor_proxyaddr,
const struct wireaddr *addr,
struct reaching *reach);
#endif /* LIGHTNING_GOSSIPD_TOR_H */