13 #define RELAY_CONFIG_PRIVATE
55 STMT_BEGIN *msg = tor_strdup(arg); return -1; STMT_END
56 #if defined(__GNUC__) && __GNUC__ <= 3
57 #define COMPLAIN(args...) \
58 STMT_BEGIN log_warn(LD_CONFIG, args); STMT_END
60 #define COMPLAIN(args, ...) \
61 STMT_BEGIN log_warn(LD_CONFIG, args, ##__VA_ARGS__); STMT_END
65 #define YES_IF_CHANGED_BOOL(opt) \
66 if (!CFG_EQ_BOOL(old_options, new_options, opt)) return 1;
67 #define YES_IF_CHANGED_INT(opt) \
68 if (!CFG_EQ_INT(old_options, new_options, opt)) return 1;
69 #define YES_IF_CHANGED_STRING(opt) \
70 if (!CFG_EQ_STRING(old_options, new_options, opt)) return 1;
71 #define YES_IF_CHANGED_LINELIST(opt) \
72 if (!CFG_EQ_LINELIST(old_options, new_options, opt)) return 1;
124 if (port->is_unix_addr)
127 if (!tor_addr_is_internal(&port->addr, 1)) {
128 log_warn(
LD_CONFIG,
"You specified a public address '%s' for %sPort. "
129 "This is not advised; this address is supposed to only be "
130 "exposed on localhost so that your pluggable transport "
131 "proxies can connect to it.",
134 } SMARTLIST_FOREACH_END(port);
159 return "<null port>";
162 static char buf[256];
163 const char *type, *addr;
165 switch (port->
type) {
180 if (port->explicit_addr) {
187 type, addr, (strlen(addr) > 0) ?
":" :
"",
210 ret &= (p1->is_group_writable == p2->is_group_writable);
211 ret &= (p1->is_world_writable == p2->is_world_writable);
212 ret &= (p1->relax_dirmode_check == p2->relax_dirmode_check);
213 ret &= (p1->explicit_addr == p2->explicit_addr);
219 ret &=
tor_memeq(&p1->server_cfg, &p2->server_cfg,
253 bool *removing = tor_calloc(smartlist_len(ports),
sizeof(
bool));
255 for (
int i = 0; i < smartlist_len(ports); ++i) {
256 const port_cfg_t *current = smartlist_get(ports, i);
266 for (
int j = 0; j < smartlist_len(ports); ++j) {
267 const port_cfg_t *next = smartlist_get(ports, j);
270 if (current == next) {
299 current->explicit_addr && next->explicit_addr) {
308 if (!current->explicit_addr && next->explicit_addr) {
313 log_warn(
LD_CONFIG,
"Configuration port %s superseded by %s",
321 for (
int i = smartlist_len(ports)-1; i >= 0; --i) {
324 port_cfg_t *current = smartlist_get(ports, i);
326 port_cfg_free(current);
340 int *n_low_ports_out)
348 if (BUG(!n_low_ports_out))
351 int n_orport_advertised = 0;
352 int n_orport_advertised_ipv4 = 0;
353 int n_orport_listeners = 0;
354 int n_dirport_advertised = 0;
355 int n_dirport_listeners = 0;
356 int n_dirport_listeners_v4 = 0;
365 if (! port->server_cfg.no_advertise)
366 ++n_dirport_advertised;
367 if (! port->server_cfg.no_listen) {
368 ++n_dirport_listeners;
369 if (port_binds_ipv4(port)) {
370 ++n_dirport_listeners_v4;
374 if (! port->server_cfg.no_advertise) {
375 ++n_orport_advertised;
376 if (port_binds_ipv4(port))
377 ++n_orport_advertised_ipv4;
379 if (! port->server_cfg.no_listen)
380 ++n_orport_listeners;
385 if (!port->server_cfg.no_listen && port->port < 1024)
388 } SMARTLIST_FOREACH_END(port);
390 if (n_orport_advertised && !n_orport_listeners) {
391 log_warn(
LD_CONFIG,
"We are advertising an ORPort, but not actually "
392 "listening on one.");
395 if (n_orport_listeners && !n_orport_advertised) {
396 log_warn(
LD_CONFIG,
"We are listening on an ORPort, but not advertising "
397 "any ORPorts. This will keep us from building a %s "
398 "descriptor, and make us impossible to use.",
402 if (n_dirport_advertised && !n_dirport_listeners) {
403 log_warn(
LD_CONFIG,
"We are advertising a DirPort, but not actually "
404 "listening on one.");
407 if (n_dirport_advertised > 1) {
408 log_warn(
LD_CONFIG,
"Can't advertise more than one DirPort.");
411 if (n_orport_advertised && !n_orport_advertised_ipv4 &&
413 log_warn(
LD_CONFIG,
"Configured public relay to listen only on an IPv6 "
414 "address. Tor needs to listen on an IPv4 address too.");
417 if (n_dirport_advertised && n_dirport_listeners_v4 == 0) {
418 log_warn(
LD_CONFIG,
"We are listening on a non-IPv4 DirPort. This is not "
419 "allowed. Consider either setting an IPv4 address or "
420 "simply removing it because it is not used anymore.");
426 const char *extra =
"";
428 extra =
", and you have disabled KeepBindCapabilities.";
430 "You have set AccountingMax to use hibernation. You have also "
431 "chosen a low DirPort or OrPort%s."
432 "This combination can make Tor stop "
433 "working when it tries to re-attach the port after a period of "
434 "hibernation. Please choose a different port or turn off "
435 "hibernation unless you know this combination will work on your "
440 *n_low_ports_out = n_low_port;
453 int *have_low_ports_out)
468 if (BUG(!have_low_ports_out))
480 CL_PORT_SERVER_OPTIONS) < 0) {
481 *msg = tor_strdup(
"Invalid ORPort configuration");
488 CL_PORT_SERVER_OPTIONS) < 0) {
489 *msg = tor_strdup(
"Invalid ORPort configuration");
496 CL_PORT_SERVER_OPTIONS|CL_PORT_WARN_NONLOCAL) < 0) {
497 *msg = tor_strdup(
"Invalid ExtORPort configuration");
504 CL_PORT_SERVER_OPTIONS) < 0) {
505 *msg = tor_strdup(
"Invalid DirPort configuration");
510 *msg = tor_strdup(
"Misconfigured server ports");
515 smartlist_free(ports);
520 if (*have_low_ports_out < 0)
521 *have_low_ports_out = (n_low_ports > 0);
524 smartlist_free(ports);
545 options->ORPort_set =
547 options->DirPort_set =
549 options->ExtORPort_set =
581 log_warn(
LD_CONFIG,
"Tor is running as a server, but you are "
582 "running %s; this probably won't work. See "
583 "https://www.torproject.org/docs/faq.html#BestOSForRelay "
584 "for details.", uname);
617 "Nickname '%s', nicknames must be between 1 and 19 characters "
618 "inclusive, and must contain only the characters [a-zA-Z0-9].",
626 "Your ContactInfo config option is not set. Please strongly "
627 "consider setting it, so we can contact you if your relay is "
628 "misconfigured, end-of-life, or something else goes wrong. "
629 "It is also possible that your relay might get rejected from "
630 "the network due to a missing valid contact address.");
634 if (ContactInfo && !
string_is_utf8(ContactInfo, strlen(ContactInfo)))
635 REJECT(
"ContactInfo config option must be UTF-8.");
655 if (!strcasecmp(
string,
"v1"))
656 log_warn(
LD_CONFIG,
"PublishServerDescriptor v1 has no effect, because "
657 "there are no v1 directory authorities anymore.");
658 else if (!strcmp(
string,
"1"))
663 else if (!strcasecmp(
string,
"v2"))
664 log_warn(
LD_CONFIG,
"PublishServerDescriptor v2 has no effect, because "
665 "there are no v2 directory authorities anymore.");
666 else if (!strcasecmp(
string,
"v3"))
668 else if (!strcasecmp(
string,
"bridge"))
670 else if (!strcasecmp(
string,
"hidserv"))
672 "PublishServerDescriptor hidserv is invalid. See "
673 "PublishHidServDescriptors.");
674 else if (!strcasecmp(
string,
"") || !strcmp(
string,
"0"))
678 } SMARTLIST_FOREACH_END(
string);
707 const char *RECOGNIZED[] = {
708 "none",
"any",
"https",
"email",
"moat"
712 if (!strcasecmp(bd, RECOGNIZED[i]))
718 while (TOR_ISALNUM(*cp) || *cp ==
'-' || *cp ==
'_')
722 log_warn(
LD_CONFIG,
"Unrecognized BridgeDistribution value %s. I'll "
723 "assume you know what you are doing...",
escaped(bd));
751 tor_asprintf(msg,
"Unrecognized value in PublishServerDescriptor");
758 REJECT(
"Bridges are not supposed to publish router descriptors to the "
759 "directory authorities. Please correct your "
760 "PublishServerDescriptor line.");
765 REJECT(
"You set BridgeDistribution, but you didn't set BridgeRelay!");
768 REJECT(
"Invalid BridgeDistribution value.");
774 if (!strcmp(pubdes,
"1") || !strcmp(pubdes,
"0"))
775 if (smartlist_len(options->PublishServerDescriptor) > 1) {
776 COMPLAIN(
"You have passed a list of multiple arguments to the "
777 "PublishServerDescriptor option that includes 0 or 1. "
778 "0 or 1 should only be used as the sole argument. "
779 "This configuration will be rejected in a future release.");
811 REJECT(
"Relays must use 'auto' for the ConnectionPadding setting.");
815 REJECT(
"Relays cannot set ReducedConnectionPadding. ");
819 REJECT(
"Relays cannot set CircuitPadding to 0. ");
823 REJECT(
"Relays cannot set ReducedCircuitPadding. ");
852 "MaxAdvertisedBandwidth", msg) < 0)
855 "RelayBandwidthRate", msg) < 0)
858 "RelayBandwidthBurst", msg) < 0)
861 "PerConnBWRate", msg) < 0)
864 "PerConnBWBurst", msg) < 0)
873 const unsigned required_min_bw =
875 RELAY_REQUIRED_MIN_BANDWIDTH : BRIDGE_REQUIRED_MIN_BANDWIDTH;
876 const char *
const optbridge =
880 "BandwidthRate is set to %d bytes/second. "
881 "For %sservers, it must be at least %u.",
888 "MaxAdvertisedBandwidth is set to %d bytes/second. "
889 "For %sservers, it must be at least %u.",
897 "RelayBandwidthRate is set to %d bytes/second. "
898 "For %sservers, it must be at least %u.",
908 REJECT(
"RelayBandwidthBurst must be at least equal "
909 "to RelayBandwidthRate.");
944 REJECT(
"Failed to parse accounting options. See logs for details.");
947 !hs_service_non_anonymous_mode_enabled(options)) {
949 log_warn(
LD_CONFIG,
"Using accounting with a hidden service and an "
950 "ORPort is risky: your hidden service(s) and your public "
951 "address will all turn off at the same time, which may alert "
952 "observers that they are being run by the same party.");
954 "HiddenServiceDir") > 1) {
955 log_warn(
LD_CONFIG,
"Using accounting with multiple hidden services is "
956 "risky: they will all turn off at the same time, which may "
957 "alert observers that they are being run by the same party.");
961 options->AccountingRule = ACCT_MAX;
964 options->AccountingRule = ACCT_SUM;
966 options->AccountingRule = ACCT_MAX;
968 options->AccountingRule = ACCT_IN;
970 options->AccountingRule = ACCT_OUT;
972 REJECT(
"AccountingRule must be 'sum', 'max', 'in', or 'out'");
996 for (cl = lst; cl; cl = cl->next) {
997 const char *line = cl->value;
1004 SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK|SPLIT_STRIP_SPACE, 0);
1007 char *normalized = NULL;
1018 normalized = prepended;
1031 normalized = tor_strdup(s);
1035 next->key = tor_strdup(cl->key);
1036 next->value = normalized;
1039 *new_nicknames_next = next;
1040 new_nicknames_next = &next->next;
1041 } SMARTLIST_FOREACH_END(s);
1047 config_free_lines(new_nicknames);
1052 *normalized_out = new_nicknames;
1057 #define ONE_MEGABYTE (UINT64_C(1) << 20)
1060 #define DIRCACHE_MIN_MEM_MB 300
1061 #define DIRCACHE_MIN_MEM_BYTES (DIRCACHE_MIN_MEM_MB*ONE_MEGABYTE)
1062 #define STRINGIFY(val) #val
1074 if (total_mem == 0) {
1081 if (total_mem < DIRCACHE_MIN_MEM_BYTES) {
1083 tor_asprintf(msg,
"Running a Bridge with less than %d MB of memory "
1084 "is not recommended.", DIRCACHE_MIN_MEM_MB);
1086 tor_asprintf(msg,
"Being a directory cache (default) with less than "
1087 "%d MB of memory is not recommended and may consume "
1088 "most of the available resources. Consider disabling "
1089 "this functionality by setting the DirCache option "
1090 "to 0.", DIRCACHE_MIN_MEM_MB);
1094 if (total_mem >= DIRCACHE_MIN_MEM_BYTES) {
1095 *msg = tor_strdup(
"DirCache is disabled and we are configured as a "
1096 "relay. We will not become a Guard.");
1099 return *msg == NULL ? 0 : -1;
1124 !hs_service_non_anonymous_mode_enabled(options))
1126 "Tor is currently configured as a relay and a hidden service. "
1127 "That's not very secure: you should probably run your hidden service "
1128 "in a separate Tor process, at least -- see "
1129 "https://bugs.torproject.org/tpo/core/tor/8742.");
1131 if (options->
BridgeRelay && options->DirPort_set) {
1132 log_warn(
LD_CONFIG,
"Can't set a DirPort on a bridge relay; disabling "
1136 options->DirPort_set = 0;
1139 if (options->DirPort_set && !options->
DirCache) {
1140 REJECT(
"DirPort configured but DirCache disabled. DirPort requires "
1145 REJECT(
"We're a bridge but DirCache is disabled. BridgeRelay requires "
1149 if (options->
BridgeRelay == 1 && ! options->ORPort_set)
1150 REJECT(
"BridgeRelay is 1, ORPort is not set. This is an invalid "
1154 char *dircache_msg = NULL;
1156 log_warn(
LD_CONFIG,
"%s", dircache_msg);
1162 log_warn(
LD_CONFIG,
"Listing a family for a bridge relay is not "
1163 "supported: it can reveal bridge fingerprints to censors. "
1164 "You should also make sure you aren't listing this bridge's "
1165 "fingerprint in any other MyFamily.");
1168 log_warn(
LD_CONFIG,
"MyFamily is set but ContactInfo is not configured. "
1169 "ContactInfo should always be set when MyFamily option is too.");
1176 if (options->DirPort_set) {
1179 COMPLAIN(
"You have requested constrained socket buffers while also "
1180 "serving directory entries via DirPort. It is strongly "
1181 "suggested that you disable serving directory requests when "
1182 "system TCP buffer resources are scarce.");
1210 REJECT(
"SigningKeyLifetime is too short.");
1212 REJECT(
"LinkCertLifetime is too short.");
1214 REJECT(
"TestingAuthKeyLifetime is too short.");
1225 YES_IF_CHANGED_STRING(DataDirectory);
1226 YES_IF_CHANGED_INT(NumCPUs);
1227 YES_IF_CHANGED_LINELIST(ORPort_lines);
1228 YES_IF_CHANGED_BOOL(ServerDNSSearchDomains);
1229 YES_IF_CHANGED_BOOL(SafeLogging_);
1230 YES_IF_CHANGED_BOOL(ClientOnly);
1231 YES_IF_CHANGED_BOOL(LogMessageDomains);
1232 YES_IF_CHANGED_LINELIST(Logs);
1252 YES_IF_CHANGED_STRING(DataDirectory);
1253 YES_IF_CHANGED_STRING(Nickname);
1254 YES_IF_CHANGED_LINELIST(Address);
1255 YES_IF_CHANGED_LINELIST(ExitPolicy);
1256 YES_IF_CHANGED_BOOL(ExitRelay);
1257 YES_IF_CHANGED_BOOL(ExitPolicyRejectPrivate);
1258 YES_IF_CHANGED_BOOL(ExitPolicyRejectLocalInterfaces);
1259 YES_IF_CHANGED_BOOL(IPv6Exit);
1260 YES_IF_CHANGED_LINELIST(ORPort_lines);
1261 YES_IF_CHANGED_LINELIST(DirPort_lines);
1262 YES_IF_CHANGED_LINELIST(DirPort_lines);
1263 YES_IF_CHANGED_BOOL(ClientOnly);
1264 YES_IF_CHANGED_BOOL(DisableNetwork);
1265 YES_IF_CHANGED_BOOL(PublishServerDescriptor_);
1266 YES_IF_CHANGED_STRING(ContactInfo);
1267 YES_IF_CHANGED_STRING(BridgeDistribution);
1268 YES_IF_CHANGED_LINELIST(MyFamily);
1269 YES_IF_CHANGED_STRING(AccountingStart);
1270 YES_IF_CHANGED_INT(AccountingMax);
1271 YES_IF_CHANGED_INT(AccountingRule);
1272 YES_IF_CHANGED_BOOL(DirCache);
1273 YES_IF_CHANGED_BOOL(AssumeReachable);
1300 const int transition_affects_workers =
1305 if (transition_affects_workers ||
1306 (authdir_mode_v3(options) && (!old_options ||
1307 !authdir_mode_v3(old_options)))) {
1309 log_warn(
LD_BUG,
"Error initializing keys; exiting");
1315 static int cdm_initialized = 0;
1316 if (cdm_initialized == 0) {
1317 cdm_initialized = 1;
1325 if (transition_affects_workers) {
1327 "Worker-related options changed. Rotating workers.");
1328 const int server_mode_turned_on =
1330 const int dir_server_mode_turned_on =
1333 if (server_mode_turned_on || dir_server_mode_turned_on) {
1337 if (server_mode_turned_on) {
1367 log_warn(
LD_BUG,
"Error in previously validated accounting options");
1426 #define RELAY_BRIDGE_STATS_DELAY (6 * 60 * 60)
1433 time_t int_start = time(NULL);
1435 int_start += RELAY_BRIDGE_STATS_DELAY;
1439 log_info(
LD_CONFIG,
"We are acting as a bridge now. Starting new "
1440 "GeoIP stats interval%s.", was_relay ?
" in 6 "
1441 "hours from now" :
"");
1444 log_info(
LD_GENERAL,
"We are no longer acting as a bridge. "
1445 "Forgetting GeoIP stats.");
1472 bool *print_notice_out)
1474 if (BUG(!print_notice_out))
1483 time_t now = time(NULL);
1484 int print_notice = 0;
1500 if (options->ORPort_set)
1501 log_notice(
LD_CONFIG,
"Configured to measure directory request "
1502 "statistics, but no GeoIP database found. "
1503 "Please specify a GeoIP database using the "
1504 "GeoIPFile option.");
1519 log_notice(
LD_CONFIG,
"Configured to measure entry node "
1520 "statistics, but no GeoIP database found. "
1521 "Please specify a GeoIP database using the "
1522 "GeoIPFile option.");
1536 log_info(
LD_CONFIG,
"Configured to measure hidden service statistics.");
1540 *print_notice_out = 1;
1571 log_notice(
LD_CONFIG,
"Configured to measure statistics. Look for "
1572 "the *-stats files that will first be written to the "
1573 "data directory in 24 hours from now.");
1658 "DirPortFrontPage file '%s' not found. Continuing anyway.",
const char * fmt_addrport(const tor_addr_t *addr, uint16_t port)
#define fmt_and_decorate_addr(a)
static sa_family_t tor_addr_family(const tor_addr_t *a)
#define tor_addr_eq(a, b)
Header file for directory authority mode.
int config_ensure_bandwidth_cap(uint64_t *value, const char *desc, char **msg)
or_options_t * get_options_mutable(void)
const or_options_t * get_options(void)
int port_count_real_listeners(const smartlist_t *ports, int listenertype, int count_sockets)
int port_parse_config(smartlist_t *out, const config_line_t *ports, const char *portname, int listener_type, const char *defaultaddr, int defaultport, const unsigned flags)
Header file for config.c.
int config_count_key(const config_line_t *a, const char *key)
int config_lines_eq(const config_line_t *a, const config_line_t *b)
void connection_bucket_adjust(const or_options_t *options)
Header file for connection.c.
#define CONN_TYPE_DIR_LISTENER
#define CONN_TYPE_OR_LISTENER
#define CONN_TYPE_EXT_OR_LISTENER
void connection_or_update_token_buckets(smartlist_t *conns, const or_options_t *options)
Header file for connection_or.c.
void conn_stats_terminate(void)
void conn_stats_init(time_t now)
Header for feature/stats/connstats.c.
void consdiffmgr_configure(const consdiff_cfg_t *cfg)
int consdiffmgr_validate(void)
Header for consdiffmgr.c.
void cpuworkers_rotate_keyinfo(void)
Header file for cpuworker.c.
int tor_memeq(const void *a, const void *b, size_t sz)
const char * escaped(const char *s)
int geoip_is_loaded(sa_family_t family)
Header file for geoip_stats.c.
void geoip_dirreq_stats_init(time_t now)
void geoip_bridge_stats_init(time_t now)
void geoip_bridge_stats_term(void)
void geoip_entry_stats_init(time_t now)
void geoip_dirreq_stats_term(void)
void geoip_entry_stats_term(void)
int should_record_bridge_info(const or_options_t *options)
int accounting_parse_options(const or_options_t *options, int validate_only)
void configure_accounting(time_t now)
int accounting_is_enabled(const or_options_t *options)
Header file for hibernate.c.
Header file containing service data for the HS subsystem.
void ip_address_changed(int on_client_conn)
smartlist_t * get_connection_array(void)
Header file for mainloop.c.
int get_total_system_memory(size_t *mem_out)
int is_legal_nickname(const char *s)
int is_legal_nickname_or_hexdigest(const char *s)
Header file for nickname.c.
Master header file for Tor-specific functionality.
#define UNNAMED_ROUTER_NICKNAME
Listener port configuration structure.
Header file for predict_ports.c.
int tor_asprintf(char **strp, const char *fmt,...)
int tor_snprintf(char *str, size_t size, const char *format,...)
STATIC void remove_duplicate_orports(smartlist_t *ports)
STATIC int check_bridge_distribution_setting(const char *bd)
static char * global_dirfrontpagecontents
int options_act_relay_bandwidth(const or_options_t *old_options)
int options_validate_relay_padding(const or_options_t *old_options, or_options_t *options, char **msg)
int options_act_relay_stats(const or_options_t *old_options, bool *print_notice_out)
void port_update_port_set_relay(or_options_t *options, const smartlist_t *ports)
int options_act_relay(const or_options_t *old_options)
int options_validate_relay_accounting(const or_options_t *old_options, or_options_t *options, char **msg)
const char * relay_get_dirportfrontpage(void)
void relay_config_free_all(void)
int options_validate_relay_bandwidth(const or_options_t *old_options, or_options_t *options, char **msg)
static int options_transition_affects_descriptor(const or_options_t *old_options, const or_options_t *new_options)
int options_validate_relay_os(const or_options_t *old_options, or_options_t *options, char **msg)
int options_act_relay_dir(const or_options_t *old_options)
static int check_and_prune_server_ports(smartlist_t *ports, const or_options_t *options, int *n_low_ports_out)
static bool port_cfg_eq(const port_cfg_t *p1, const port_cfg_t *p2)
void port_warn_nonlocal_ext_orports(const smartlist_t *ports, const char *portname)
int port_parse_ports_relay(or_options_t *options, char **msg, smartlist_t *ports_out, int *have_low_ports_out)
int options_act_relay_accounting(const or_options_t *old_options)
static int normalize_nickname_list(config_line_t **normalized_out, const config_line_t *lst, const char *name, char **msg)
void options_act_relay_stats_msg(void)
uint32_t relay_get_effective_bwrate(const or_options_t *options)
static int compute_publishserverdescriptor(or_options_t *options)
uint32_t relay_get_effective_bwburst(const or_options_t *options)
int options_validate_relay_info(const or_options_t *old_options, or_options_t *options, char **msg)
static const char * describe_portnum(int port)
int options_validate_publish_server(const or_options_t *old_options, or_options_t *options, char **msg)
int options_act_relay_dos(const or_options_t *old_options)
STATIC const char * describe_relay_port(const port_cfg_t *port)
int options_act_relay_desc(const or_options_t *old_options)
int options_act_bridge_stats(const or_options_t *old_options)
int options_validate_relay_testing(const or_options_t *old_options, or_options_t *options, char **msg)
STATIC int have_enough_mem_for_dircache(const or_options_t *options, size_t total_mem, char **msg)
int options_validate_relay_mode(const or_options_t *old_options, or_options_t *options, char **msg)
static int options_transition_affects_workers(const or_options_t *old_options, const or_options_t *new_options)
Header for feature/relay/relay_config.c.
void rep_hist_buffer_stats_term(void)
void rep_hist_hs_stats_term(void)
void rep_hist_buffer_stats_init(time_t now)
void rep_hist_exit_stats_init(time_t now)
void rep_hist_hs_stats_init(time_t now)
void rep_hist_exit_stats_term(void)
Header file for rephist.c.
void mark_my_descriptor_dirty(const char *reason)
int public_server_mode(const or_options_t *options)
int dir_server_mode(const or_options_t *options)
int server_mode(const or_options_t *options)
Header file for routermode.c.
Header file for selftest.c.
int have_capability_support(void)
void smartlist_add_all(smartlist_t *s1, const smartlist_t *s2)
smartlist_t * smartlist_new(void)
void smartlist_del_keeporder(smartlist_t *sl, int idx)
#define SMARTLIST_FOREACH_BEGIN(sl, type, var)
#define SMARTLIST_FOREACH(sl, type, var, cmd)
int smartlist_split_string(smartlist_t *sl, const char *str, const char *sep, int flags, int max)
struct smartlist_t * PublishServerDescriptor
int ReducedConnectionPadding
dirinfo_type_t PublishServerDescriptor_
struct config_line_t * MyFamily
uint64_t RelayBandwidthBurst
struct config_line_t * ORPort_lines
char * BridgeDistribution
struct config_line_t * ExtORPort_lines
int TestingAuthKeyLifetime
struct config_line_t * MyFamily_lines
int HiddenServiceStatistics
int TestingLinkCertLifetime
uint64_t RelayBandwidthRate
int TestingSigningKeySlop
uint64_t MaxAdvertisedBandwidth
int ReducedCircuitPadding
int ConnDirectionStatistics
char * AccountingRule_option
struct config_line_t * RendConfigLines
struct config_line_t * DirPort_lines
char unix_addr[FLEXIBLE_ARRAY_MEMBER]
entry_port_cfg_t entry_cfg
#define MOCK_IMPL(rv, funcname, arglist)
const char * get_uname(void)
#define IF_BUG_ONCE(cond)
int strcmpstart(const char *s1, const char *s2)
int string_is_utf8(const char *str, size_t len)