13#define RELAY_CONFIG_PRIVATE
56 STMT_BEGIN *msg = tor_strdup(arg); return -1; STMT_END
57#if defined(__GNUC__) && __GNUC__ <= 3
58#define COMPLAIN(args...) \
59 STMT_BEGIN log_warn(LD_CONFIG, args); STMT_END
61#define COMPLAIN(args, ...) \
62 STMT_BEGIN log_warn(LD_CONFIG, args, ##__VA_ARGS__); STMT_END
66#define YES_IF_CHANGED_BOOL(opt) \
67 if (!CFG_EQ_BOOL(old_options, new_options, opt)) return 1;
68#define YES_IF_CHANGED_INT(opt) \
69 if (!CFG_EQ_INT(old_options, new_options, opt)) return 1;
70#define YES_IF_CHANGED_STRING(opt) \
71 if (!CFG_EQ_STRING(old_options, new_options, opt)) return 1;
72#define YES_IF_CHANGED_LINELIST(opt) \
73 if (!CFG_EQ_LINELIST(old_options, new_options, opt)) return 1;
125 if (port->is_unix_addr)
128 if (!tor_addr_is_internal(&port->addr, 1)) {
129 log_warn(
LD_CONFIG,
"You specified a public address '%s' for %sPort. "
130 "This is not advised; this address is supposed to only be "
131 "exposed on localhost so that your pluggable transport "
132 "proxies can connect to it.",
135 } SMARTLIST_FOREACH_END(port);
160 return "<null port>";
163 static char buf[256];
164 const char *type, *addr;
166 switch (port->
type) {
181 if (port->explicit_addr) {
188 type, addr, (strlen(addr) > 0) ?
":" :
"",
211 ret &= (p1->is_group_writable == p2->is_group_writable);
212 ret &= (p1->is_world_writable == p2->is_world_writable);
213 ret &= (p1->relax_dirmode_check == p2->relax_dirmode_check);
214 ret &= (p1->explicit_addr == p2->explicit_addr);
220 ret &=
tor_memeq(&p1->server_cfg, &p2->server_cfg,
254 bool *removing = tor_calloc(smartlist_len(ports),
sizeof(
bool));
256 for (
int i = 0; i < smartlist_len(ports); ++i) {
257 const port_cfg_t *current = smartlist_get(ports, i);
267 for (
int j = 0; j < smartlist_len(ports); ++j) {
268 const port_cfg_t *next = smartlist_get(ports, j);
271 if (current == next) {
300 current->explicit_addr && next->explicit_addr) {
309 if (!current->explicit_addr && next->explicit_addr) {
314 log_warn(
LD_CONFIG,
"Configuration port %s superseded by %s",
322 for (
int i = smartlist_len(ports)-1; i >= 0; --i) {
325 port_cfg_t *current = smartlist_get(ports, i);
327 port_cfg_free(current);
341 int *n_low_ports_out)
349 if (BUG(!n_low_ports_out))
352 int n_orport_advertised = 0;
353 int n_orport_advertised_ipv4 = 0;
354 int n_orport_listeners = 0;
355 int n_dirport_advertised = 0;
356 int n_dirport_listeners = 0;
357 int n_dirport_listeners_v4 = 0;
366 if (! port->server_cfg.no_advertise)
367 ++n_dirport_advertised;
368 if (! port->server_cfg.no_listen) {
369 ++n_dirport_listeners;
370 if (port_binds_ipv4(port)) {
371 ++n_dirport_listeners_v4;
375 if (! port->server_cfg.no_advertise) {
376 ++n_orport_advertised;
377 if (port_binds_ipv4(port))
378 ++n_orport_advertised_ipv4;
380 if (! port->server_cfg.no_listen)
381 ++n_orport_listeners;
386 if (!port->server_cfg.no_listen && port->port < 1024)
389 } SMARTLIST_FOREACH_END(port);
391 if (n_orport_advertised && !n_orport_listeners) {
392 log_warn(
LD_CONFIG,
"We are advertising an ORPort, but not actually "
393 "listening on one.");
396 if (n_orport_listeners && !n_orport_advertised) {
397 log_warn(
LD_CONFIG,
"We are listening on an ORPort, but not advertising "
398 "any ORPorts. This will keep us from building a %s "
399 "descriptor, and make us impossible to use.",
403 if (n_dirport_advertised && !n_dirport_listeners) {
404 log_warn(
LD_CONFIG,
"We are advertising a DirPort, but not actually "
405 "listening on one.");
408 if (n_dirport_advertised > 1) {
409 log_warn(
LD_CONFIG,
"Can't advertise more than one DirPort.");
412 if (n_orport_advertised && !n_orport_advertised_ipv4 &&
414 log_warn(
LD_CONFIG,
"Configured public relay to listen only on an IPv6 "
415 "address. Tor needs to listen on an IPv4 address too.");
418 if (n_dirport_advertised && n_dirport_listeners_v4 == 0) {
419 log_warn(
LD_CONFIG,
"We are listening on a non-IPv4 DirPort. This is not "
420 "allowed. Consider either setting an IPv4 address or "
421 "simply removing it because it is not used anymore.");
427 const char *extra =
"";
429 extra =
", and you have disabled KeepBindCapabilities.";
431 "You have set AccountingMax to use hibernation. You have also "
432 "chosen a low DirPort or OrPort%s."
433 "This combination can make Tor stop "
434 "working when it tries to re-attach the port after a period of "
435 "hibernation. Please choose a different port or turn off "
436 "hibernation unless you know this combination will work on your "
441 *n_low_ports_out = n_low_port;
454 int *have_low_ports_out)
469 if (BUG(!have_low_ports_out))
481 CL_PORT_SERVER_OPTIONS) < 0) {
482 *msg = tor_strdup(
"Invalid ORPort configuration");
489 CL_PORT_SERVER_OPTIONS) < 0) {
490 *msg = tor_strdup(
"Invalid ORPort configuration");
497 CL_PORT_SERVER_OPTIONS|CL_PORT_WARN_NONLOCAL) < 0) {
498 *msg = tor_strdup(
"Invalid ExtORPort configuration");
505 CL_PORT_SERVER_OPTIONS) < 0) {
506 *msg = tor_strdup(
"Invalid DirPort configuration");
511 *msg = tor_strdup(
"Misconfigured server ports");
516 smartlist_free(ports);
521 if (*have_low_ports_out < 0)
522 *have_low_ports_out = (n_low_ports > 0);
525 smartlist_free(ports);
546 options->ORPort_set =
548 options->DirPort_set =
550 options->ExtORPort_set =
582 log_warn(
LD_CONFIG,
"Tor is running as a server, but you are "
583 "running %s; this probably won't work. See "
584 "https://www.torproject.org/docs/faq.html#BestOSForRelay "
585 "for details.", uname);
618 "Nickname '%s', nicknames must be between 1 and 19 characters "
619 "inclusive, and must contain only the characters [a-zA-Z0-9].",
627 "Your ContactInfo config option is not set. Please strongly "
628 "consider setting it, so we can contact you if your relay is "
629 "misconfigured, end-of-life, or something else goes wrong. "
630 "It is also possible that your relay might get rejected from "
631 "the network due to a missing valid contact address.");
635 if (ContactInfo && !
string_is_utf8(ContactInfo, strlen(ContactInfo)))
636 REJECT(
"ContactInfo config option must be UTF-8.");
656 if (!strcasecmp(
string,
"v1"))
657 log_warn(
LD_CONFIG,
"PublishServerDescriptor v1 has no effect, because "
658 "there are no v1 directory authorities anymore.");
659 else if (!strcmp(
string,
"1"))
664 else if (!strcasecmp(
string,
"v2"))
665 log_warn(
LD_CONFIG,
"PublishServerDescriptor v2 has no effect, because "
666 "there are no v2 directory authorities anymore.");
667 else if (!strcasecmp(
string,
"v3"))
669 else if (!strcasecmp(
string,
"bridge"))
671 else if (!strcasecmp(
string,
"hidserv"))
673 "PublishServerDescriptor hidserv is invalid. See "
674 "PublishHidServDescriptors.");
675 else if (!strcasecmp(
string,
"") || !strcmp(
string,
"0"))
679 } SMARTLIST_FOREACH_END(
string);
708 const char *RECOGNIZED[] = {
709 "none",
"any",
"https",
"email",
"moat"
713 if (!strcasecmp(bd, RECOGNIZED[i]))
719 while (TOR_ISALNUM(*cp) || *cp ==
'-' || *cp ==
'_')
723 log_warn(
LD_CONFIG,
"Unrecognized BridgeDistribution value %s. I'll "
724 "assume you know what you are doing...",
escaped(bd));
752 tor_asprintf(msg,
"Unrecognized value in PublishServerDescriptor");
759 REJECT(
"Bridges are not supposed to publish router descriptors to the "
760 "directory authorities. Please correct your "
761 "PublishServerDescriptor line.");
766 REJECT(
"You set BridgeDistribution, but you didn't set BridgeRelay!");
769 REJECT(
"Invalid BridgeDistribution value.");
775 if (!strcmp(pubdes,
"1") || !strcmp(pubdes,
"0"))
776 if (smartlist_len(options->PublishServerDescriptor) > 1) {
777 COMPLAIN(
"You have passed a list of multiple arguments to the "
778 "PublishServerDescriptor option that includes 0 or 1. "
779 "0 or 1 should only be used as the sole argument. "
780 "This configuration will be rejected in a future release.");
812 REJECT(
"Relays must use 'auto' for the ConnectionPadding setting.");
816 REJECT(
"Relays cannot set ReducedConnectionPadding. ");
820 REJECT(
"Relays cannot set CircuitPadding to 0. ");
824 REJECT(
"Relays cannot set ReducedCircuitPadding. ");
853 "MaxAdvertisedBandwidth", msg) < 0)
856 "RelayBandwidthRate", msg) < 0)
859 "RelayBandwidthBurst", msg) < 0)
862 "PerConnBWRate", msg) < 0)
865 "PerConnBWBurst", msg) < 0)
874 const unsigned required_min_bw =
876 RELAY_REQUIRED_MIN_BANDWIDTH : BRIDGE_REQUIRED_MIN_BANDWIDTH;
877 const char *
const optbridge =
881 "BandwidthRate is set to %d bytes/second. "
882 "For %sservers, it must be at least %u.",
889 "MaxAdvertisedBandwidth is set to %d bytes/second. "
890 "For %sservers, it must be at least %u.",
898 "RelayBandwidthRate is set to %d bytes/second. "
899 "For %sservers, it must be at least %u.",
909 REJECT(
"RelayBandwidthBurst must be at least equal "
910 "to RelayBandwidthRate.");
945 REJECT(
"Failed to parse accounting options. See logs for details.");
948 !hs_service_non_anonymous_mode_enabled(options)) {
950 log_warn(
LD_CONFIG,
"Using accounting with a hidden service and an "
951 "ORPort is risky: your hidden service(s) and your public "
952 "address will all turn off at the same time, which may alert "
953 "observers that they are being run by the same party.");
955 "HiddenServiceDir") > 1) {
956 log_warn(
LD_CONFIG,
"Using accounting with multiple hidden services is "
957 "risky: they will all turn off at the same time, which may "
958 "alert observers that they are being run by the same party.");
962 options->AccountingRule = ACCT_MAX;
965 options->AccountingRule = ACCT_SUM;
967 options->AccountingRule = ACCT_MAX;
969 options->AccountingRule = ACCT_IN;
971 options->AccountingRule = ACCT_OUT;
973 REJECT(
"AccountingRule must be 'sum', 'max', 'in', or 'out'");
997 for (cl = lst; cl; cl = cl->next) {
998 const char *line = cl->value;
1005 SPLIT_SKIP_SPACE|SPLIT_IGNORE_BLANK|SPLIT_STRIP_SPACE, 0);
1008 char *normalized = NULL;
1019 normalized = prepended;
1032 normalized = tor_strdup(s);
1036 next->key = tor_strdup(cl->key);
1037 next->value = normalized;
1040 *new_nicknames_next = next;
1041 new_nicknames_next = &next->next;
1042 } SMARTLIST_FOREACH_END(s);
1048 config_free_lines(new_nicknames);
1053 *normalized_out = new_nicknames;
1058#define ONE_MEGABYTE (UINT64_C(1) << 20)
1061#define DIRCACHE_MIN_MEM_MB 300
1062#define DIRCACHE_MIN_MEM_BYTES (DIRCACHE_MIN_MEM_MB*ONE_MEGABYTE)
1063#define STRINGIFY(val) #val
1075 if (total_mem == 0) {
1082 if (total_mem < DIRCACHE_MIN_MEM_BYTES) {
1084 tor_asprintf(msg,
"Running a Bridge with less than %d MB of memory "
1085 "is not recommended.", DIRCACHE_MIN_MEM_MB);
1087 tor_asprintf(msg,
"Being a directory cache (default) with less than "
1088 "%d MB of memory is not recommended and may consume "
1089 "most of the available resources. Consider disabling "
1090 "this functionality by setting the DirCache option "
1091 "to 0.", DIRCACHE_MIN_MEM_MB);
1095 if (total_mem >= DIRCACHE_MIN_MEM_BYTES) {
1096 *msg = tor_strdup(
"DirCache is disabled and we are configured as a "
1097 "relay. We will not become a Guard.");
1100 return *msg == NULL ? 0 : -1;
1125 !hs_service_non_anonymous_mode_enabled(options))
1127 "Tor is currently configured as a relay and a hidden service. "
1128 "That's not very secure: you should probably run your hidden service "
1129 "in a separate Tor process, at least -- see "
1130 "https://bugs.torproject.org/tpo/core/tor/8742.");
1132 if (options->
BridgeRelay && options->DirPort_set) {
1133 log_warn(
LD_CONFIG,
"Can't set a DirPort on a bridge relay; disabling "
1137 options->DirPort_set = 0;
1140 if (options->DirPort_set && !options->
DirCache) {
1141 REJECT(
"DirPort configured but DirCache disabled. DirPort requires "
1146 REJECT(
"We're a bridge but DirCache is disabled. BridgeRelay requires "
1150 if (options->
BridgeRelay == 1 && ! options->ORPort_set)
1151 REJECT(
"BridgeRelay is 1, ORPort is not set. This is an invalid "
1156 log_warn(
LD_CONFIG,
"BridgeRelay is 1, but ExitRelay is 1 or an "
1157 "ExitPolicy is configured. Tor will start, but it will not "
1158 "function as an exit relay.");
1162 char *dircache_msg = NULL;
1164 log_warn(
LD_CONFIG,
"%s", dircache_msg);
1170 log_warn(
LD_CONFIG,
"Listing a family for a bridge relay is not "
1171 "supported: it can reveal bridge fingerprints to censors. "
1172 "You should also make sure you aren't listing this bridge's "
1173 "fingerprint in any other MyFamily.");
1176 log_warn(
LD_CONFIG,
"MyFamily is set but ContactInfo is not configured. "
1177 "ContactInfo should always be set when MyFamily option is too.");
1184 if (options->DirPort_set) {
1187 COMPLAIN(
"You have requested constrained socket buffers while also "
1188 "serving directory entries via DirPort. It is strongly "
1189 "suggested that you disable serving directory requests when "
1190 "system TCP buffer resources are scarce.");
1218 REJECT(
"SigningKeyLifetime is too short.");
1220 REJECT(
"LinkCertLifetime is too short.");
1222 REJECT(
"TestingAuthKeyLifetime is too short.");
1233 YES_IF_CHANGED_STRING(DataDirectory);
1234 YES_IF_CHANGED_INT(NumCPUs);
1235 YES_IF_CHANGED_LINELIST(ORPort_lines);
1236 YES_IF_CHANGED_BOOL(ServerDNSSearchDomains);
1237 YES_IF_CHANGED_BOOL(SafeLogging_);
1238 YES_IF_CHANGED_BOOL(ClientOnly);
1239 YES_IF_CHANGED_BOOL(LogMessageDomains);
1240 YES_IF_CHANGED_LINELIST(Logs);
1260 YES_IF_CHANGED_STRING(DataDirectory);
1261 YES_IF_CHANGED_STRING(Nickname);
1262 YES_IF_CHANGED_LINELIST(Address);
1263 YES_IF_CHANGED_LINELIST(ExitPolicy);
1264 YES_IF_CHANGED_BOOL(ExitRelay);
1265 YES_IF_CHANGED_BOOL(ExitPolicyRejectPrivate);
1266 YES_IF_CHANGED_BOOL(ExitPolicyRejectLocalInterfaces);
1267 YES_IF_CHANGED_BOOL(IPv6Exit);
1268 YES_IF_CHANGED_LINELIST(ORPort_lines);
1269 YES_IF_CHANGED_LINELIST(DirPort_lines);
1270 YES_IF_CHANGED_LINELIST(DirPort_lines);
1271 YES_IF_CHANGED_BOOL(ClientOnly);
1272 YES_IF_CHANGED_BOOL(DisableNetwork);
1273 YES_IF_CHANGED_BOOL(PublishServerDescriptor_);
1274 YES_IF_CHANGED_STRING(ContactInfo);
1275 YES_IF_CHANGED_STRING(BridgeDistribution);
1276 YES_IF_CHANGED_LINELIST(MyFamily);
1277 YES_IF_CHANGED_STRING(AccountingStart);
1278 YES_IF_CHANGED_INT(AccountingMax);
1279 YES_IF_CHANGED_INT(AccountingRule);
1280 YES_IF_CHANGED_BOOL(DirCache);
1281 YES_IF_CHANGED_BOOL(AssumeReachable);
1308 const int transition_affects_workers =
1313 if (transition_affects_workers ||
1314 (authdir_mode_v3(options) && (!old_options ||
1315 !authdir_mode_v3(old_options)))) {
1317 log_warn(
LD_BUG,
"Error initializing keys; exiting");
1323 static int cdm_initialized = 0;
1324 if (cdm_initialized == 0) {
1325 cdm_initialized = 1;
1333 if (transition_affects_workers) {
1335 "Worker-related options changed. Rotating workers.");
1336 const int server_mode_turned_on =
1339 if (server_mode_turned_on) {
1369 log_warn(
LD_BUG,
"Error in previously validated accounting options");
1428#define RELAY_BRIDGE_STATS_DELAY (6 * 60 * 60)
1435 time_t int_start = time(NULL);
1437 int_start += RELAY_BRIDGE_STATS_DELAY;
1441 log_info(
LD_CONFIG,
"We are acting as a bridge now. Starting new "
1442 "GeoIP stats interval%s.", was_relay ?
" in 6 "
1443 "hours from now" :
"");
1446 log_info(
LD_GENERAL,
"We are no longer acting as a bridge. "
1447 "Forgetting GeoIP stats.");
1474 bool *print_notice_out)
1476 if (BUG(!print_notice_out))
1485 time_t now = time(NULL);
1486 int print_notice = 0;
1502 if (options->ORPort_set)
1503 log_notice(
LD_CONFIG,
"Configured to measure directory request "
1504 "statistics, but no GeoIP database found. "
1505 "Please specify a GeoIP database using the "
1506 "GeoIPFile option.");
1521 log_notice(
LD_CONFIG,
"Configured to measure entry node "
1522 "statistics, but no GeoIP database found. "
1523 "Please specify a GeoIP database using the "
1524 "GeoIPFile option.");
1538 log_info(
LD_CONFIG,
"Configured to measure hidden service statistics.");
1542 *print_notice_out = 1;
1573 log_notice(
LD_CONFIG,
"Configured to measure statistics. Look for "
1574 "the *-stats files that will first be written to the "
1575 "data directory in 24 hours from now.");
1660 "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
int policy_using_default_exit_options(const or_options_t *or_options)
Header file for policies.c.
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
static const char * describe_portnum(int port)
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)
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)
const char * relay_get_dirportfrontpage(void)
STATIC const char * describe_relay_port(const port_cfg_t *port)
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)
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)
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)