aboutsummaryrefslogtreecommitdiff
path: root/src/app/config/config.c
AgeCommit message (Collapse)Author
2020-08-14Revise trac.torproject.org urls to refer to gitlab replacements.Nick Mathewson
Closes #40101.
2020-08-03Minor style improvements. #30045Daniel Pinto
2020-08-01Add --format argument to --key-expiration option. #30045Daniel Pinto
2020-07-21relay: Automatically Enable an IPv6 ORPortDavid Goulet
This commit makes it that if the ORPort is set with a single port, it will bind to both global listen IPv4 and IPv6 addresses. To pin an "ORPort <PORT>" to be IPv4 or IPv6, the IPv4Only/IPv6Only flags are honored thus this will _only_ bind on IPv6 for that port value: ORPort 9050 IPv6Only Results in: [::]:9050 ORPort 9051 IPv4Only Results in: [0.0.0.0]:9051 Attempting to configure an explicit IPv4 address with IPv6Only flag is an error and vice versa. Closes #33246 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-21Extract shared parts of portcfg_get_first_advertised_*()Nick Mathewson
2020-07-21Rename get_first_advertised_{addr,port}_by_type_af().Nick Mathewson
Rationale: these don't actually give the first advertised address/port, but instead give us the first such port that we are _configured_ to advertise. Putting them in a portconf_ namespace therefore makes sense. Similarly, there are no other functions that get the first configured advertised addr/port, so the "by_type_af()" part is needless. This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ get_first_advertised_addr_by_type_af portconf_get_first_advertised_addr \ get_first_advertised_port_by_type_af portconf_get_first_advertised_port
2020-07-21relay: Add AddressDisableIPv6 torrc optionDavid Goulet
This option controls if a tor relay will attempt address auto discovery and thus ultimately publish an IPv6 ORPort in the descriptor. Behavior is from proposal 312 section 3.2.6. Closes #33245 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-20Merge remote-tracking branch 'tor-gitlab/mr/59'Nick Mathewson
2020-07-17Add running glibc version to the log. #40047Daniel Pinto
Also adds the compiled and running glibc version when using the --library-versions flag.
2020-07-16Use connection_describe() for log messages.Nick Mathewson
2020-07-14doc: Move manpages into doc/man/David Goulet
Closes #40044 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-07-13Merge branch 'maint-0.4.4'Nick Mathewson
2020-07-13Bug 31812: Change http URL's to httpsJeremyRand
2020-07-09Merge branch 'maint-0.4.4'Nick Mathewson
2020-07-07Revert "config: Make clients tell dual-stack exits they prefer IPv6"David Goulet
This reverts commit bf2a399fc0d90df76e091fa3259f7c1b8fb87781. Don't set by default the prefer IPv6 feature on client ports because it breaks the torsocks use case. The SOCKS resolve command is lacking a mechanism to ask for a specific address family (v4 or v6) thus prioritizing IPv6 when an IPv4 address is asked on the resolve SOCKS interface resulting in a failure. Tor Browser explicitly set PreferIPv6 so this should not affect the majority of our users. Closes #33796 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-06-26Merge branch 'assume_reachable_revamp'Nick Mathewson
2020-06-25Remove now-unused OPTIONS_DUMP_DEFAULTS.Nick Mathewson
2020-06-24Add an AssumeReachableIPv6 autobool option.Nick Mathewson
This option tells Tor that our IPv6 orport is reachable, and doesn't need to be checked. Closes the rest of 33224.
2020-06-23config: Change Address to be a LINELISTDavid Goulet
With prop312, we want to support IPv4 and IPv6 thus multiple Address statement (up to 2) will be accepted. For this, "Address" option becomes a LINELIST so we can properly process the IPv4 or/and IPv6. Part of #33233 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-05-16Fix spacing in if statement in port_parse_config()Neel Chauhan
2020-05-05config: New file resolve_addr.{c|h}David Goulet
Move a series of function from config.c into that new file which is related to address resolving. Part of #33789 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-03-26Add --dbg-dump-subsystem-list command to list the subsystems.Nick Mathewson
I'm prefixing this with --dbg-* because it is not meant to be used externally.
2020-03-23Merge remote-tracking branch 'tor-github/pr/1797/head'Nick Mathewson
2020-03-21Add some comments about future relay IPv6 workteor
Comments about 33681.
2020-03-21Merge branch 'bug32588_043' into bug32588_masterteor
2020-03-21Merge branch 'bug32588_042' into bug32588_043teor
Merge static function declaration deletions from bug32588_042 and maint-0.4.3 in app/config/config.c.
2020-03-21Merge branch 'bug32588_041' into bug32588_042teor
2020-03-21Merge branch 'bug32588_035' into bug32588_041teor
Merge tests from maint-0.4.1 with new tests from bug32588_035 in test_router.c.
2020-03-21Add tests for get_first_advertised_{addr,port}_by_type_af()Nick Mathewson
2020-03-14Get all default flags from port_cfg_new()MrSquanchee
Now port_cfg_new() returns all default flags and port_parse_config() acts on defaults returned by port_cfg_new() that is uses the default port_cfg_t object returned by port_cfg_new() and modifies them later according to the port specifications in configuration files Might close tor#32994.
2020-03-13Merge remote-tracking branch 'tor-github/pr/1718/head' into maint-0.4.2Nick Mathewson
2020-03-13config: Improve some commentsteor
Document the namelen argument to port_cfg_new(). Fix a typo in a comment in port_cfg_line_extract_addrport(). Comment-only changes.
2020-03-09Merge branch 'tor-github/pr/1751'David Goulet
2020-03-09Remove the ClientAutoIPv6ORPort optionNeel Chauhan
2020-03-05Merge branch 'clang_format_prep_3'Nick Mathewson
2020-02-12Merge branch 'maint-0.4.1' into maint-0.4.2teor
2020-02-12Merge branch 'maint-0.3.5' into maint-0.4.1teor
2020-02-12Lowercase the BridgeDistribution value from torrc in descriptors.Alexander Færøy
This patch ensures that we always lowercase the BridgeDistribution from torrc in descriptors before submitting it. See: https://bugs.torproject.org/32753
2020-02-11dirauth: Add option AuthDirRejectRequestsUnderLoadDavid Goulet
This controls the previous feature added that makes dirauth send back a 503 error code on non relay connections if under bandwidth pressure. Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-02-06Use parentheses to avoid mis-indentations of stringified macro argsNick Mathewson
clang-format sometimes thinks that "#name" should be written as "# name" if it appears at the start of a line. Using () appears to suppress this, while confusing Coccinelle.
2020-01-21hs-v3: Add the Onion Balance config file optionDavid Goulet
At this commit, the service reads the config file and parse it to finally set the service config object with the options. Part of #32709 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-01-20config: Make clients tell dual-stack exits they prefer IPv6teor
Make Tor clients tell dual-stack exits that they prefer IPv6 connections. This change is equivalent to setting the PreferIPv6 flag on SOCKSPorts (and most other listener ports). Tor Browser has been setting this flag for some time, and we want to remove a client distinguisher at exits. Also update the man page, putting all the IP flags in their non-default forms. Closes ticket 32637.
2020-01-17Merge branch 'ticket32806'Nick Mathewson
2020-01-16Merge branch 'ticket32487_squashed' into ticket32487_squashed_and_mergedNick Mathewson
Resolved conflicts in src/core/include.am
2020-01-16Document why dircache is not included in --list-modulesNick Mathewson
2020-01-16Rename dirclient_modes.h identifiers to start with dirclient_Nick Mathewson
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ directory_must_use_begindir dirclient_must_use_begindir \ directory_fetches_from_authorities dirclient_fetches_from_authorities \ directory_fetches_dir_info_early dirclient_fetches_dir_info_early \ directory_fetches_dir_info_later dirclient_fetches_dir_info_later \ directory_too_idle_to_fetch_descriptors dirclient_too_idle_to_fetch_descriptors
2020-01-16Move dirclient-related functions out of dirserv, and reenable themNick Mathewson
I had incorrectly identified these functions as dircache-only, when in fact they apply to everyone who acts a directory client.
2020-01-13Deprecate the ClientAutoIPv6ORPort optionNeel Chauhan
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2020-01-06Merge branch 'haxxpop/tcp_proxy_squashed' into tcp_proxy_squshed_and_mergedNick Mathewson