summaryrefslogtreecommitdiff
path: root/src/or/config.h
AgeCommit message (Collapse)Author
2018-05-09config: Move any_client_port_set() to config.cDavid Goulet
This functions is now used outside of networkstatus.c and makes more sense to be in config.c. It is also renamed to options_any_client_port_set() for the config.c namespace. No code behavior change. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-04-12Use less memory for MaxMemInQueues for machines with more than 8 GB of RAM.Alexander Færøy
This patch changes the algorithm of compute_real_max_mem_in_queues() to use 0.4 * RAM iff the system has more than or equal to 8 GB of RAM, but will continue to use the old value of 0.75 * RAM if the system have less than * GB of RAM available. This patch also adds tests for compute_real_max_mem_in_queues(). See: https://bugs.torproject.org/24782
2018-04-12Use STATIC for compute_real_max_mem_in_queuesAlexander Færøy
This patch makes compute_real_max_mem_in_queues use the STATIC macro, which allows us to test the function. See: https://bugs.torproject.org/24782
2018-01-31Use thread-safe types to store the LOG_PROTOCOL_WARN severityNick Mathewson
Fixes a race condition; resolves 23954.
2017-12-08Merge branch 'macro_free_v2_squashed'Nick Mathewson
2017-12-08Convert remaining function (mostly static) to new free styleNick Mathewson
2017-12-08Fix wide lines introduced by previous patch.Nick Mathewson
2017-12-08Replace all FREE_AND_NULL* uses to take a type and a free function.Nick Mathewson
This commit was made mechanically by this perl script: \#!/usr/bin/perl -w -i -p next if /^#define FREE_AND_NULL/; s/\bFREE_AND_NULL\((\w+),/FREE_AND_NULL\(${1}_t, ${1}_free_,/; s/\bFREE_AND_NULL_UNMATCHED\(/FREE_AND_NULL\(/;
2017-12-08Update free functions into macros: src/or/ part 1Nick Mathewson
This covers addressmap.h (no change needed) through confparse.h
2017-12-05Implement the various get_foodir_*() functions.Nick Mathewson
2017-12-05New accessors for keydir/cachedir accessNick Mathewson
This patch is a result of auditing all of our uses of get_datadir_fname() and its kin, and dividing them into cache vs keys vs other data. The new get_keydir_fname() and get_cachedir_fname() functions don't actually do anything new yet.
2017-12-05Extract common code for creating the keys directory.Nick Mathewson
This had somehow gotten duplicated between router.c and routerkeys.c
2017-10-24Merge branch 'feature18329_029_squashed' into maint-0.3.2Nick Mathewson
2017-10-24test: Add unittest for descriptors with BridgeDistribution option.Isis Lovecruft
2017-10-23Have LOG_PROTOCOL_WARN call its own functionNick Mathewson
Also, make the function that implements LOG_PROTOCOL_WARN use a cached value of the desired loglevel, rather than calling get_options().
2017-09-15Run our #else/#endif annotator on our source code.Nick Mathewson
2017-07-12If writing a heartbeat message fails, retry after MIN_HEARTBEAT_PERIOD.Isis Lovecruft
* FIXES #19476.
2017-05-09config: Remove {Control,DNS,Dir,Socks,Trans,NATD,OR}ListenAddress optionDavid Goulet
Deprecated in 0.2.9.2-alpha, this commits changes it as OBSOLETE() and cleans up the code associated with it. Partially fixes #22060 Signed-off-by: David Goulet <dgoulet@torproject.org>
2017-03-15Run the copyright update script.Nick Mathewson
2016-10-14Merge remote-tracking branch 'public/spaces_in_unix_addrs'Nick Mathewson
2016-10-13Tweak patch for 18529.Nick Mathewson
- function doesn't need to be inline. - rename function - Make documentation more pedantically correct - Remove needless "? 1 : 0."
2016-10-13Remove duplicate code that checks for default authoritiesNick Mathewson
Patch from ericho. Fixes 18529. Simple refactoring.
2016-10-04Allow a unix: address to contain a C-style quoted string.Nick Mathewson
Feature 18753 -- all this to allow spaces.
2016-09-13Implement Prop #260: Single Onion Servicesteor (Tim Wilson-Brown)
Add experimental OnionServiceSingleHopMode and OnionServiceNonAnonymousMode options. When both are set to 1, every hidden service on a tor instance becomes a non-anonymous Single Onion Service. Single Onions make one-hop (direct) connections to their introduction and renzedvous points. One-hop circuits make Single Onion servers easily locatable, but clients remain location-anonymous. This is compatible with the existing hidden service implementation, and works on the current tor network without any changes to older relays or clients. Implements proposal #260, completes ticket #17178. Patch by teor & asn. squash! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Implement Prop #260: Single Onion Services Redesign single onion service poisoning. When in OnionServiceSingleHopMode, each hidden service key is poisoned (marked as non-anonymous) on creation by creating a poison file in the hidden service directory. Existing keys are considered non-anonymous if this file exists, and anonymous if it does not. Tor refuses to launch in OnionServiceSingleHopMode if any existing keys are anonymous. Similarly, it refuses to launch in anonymous client mode if any existing keys are non-anonymous. Rewrite the unit tests to match and be more comprehensive. Adds a bonus unit test for rend_service_load_all_keys().
2016-08-23Merge branch 'bug13953_squashed'Nick Mathewson
2016-08-03Add new warn_deprecated option to config_assign*().Nick Mathewson
Also, collapse all the config_assign*() options into a flags argument, since having two boolean arguments was already confusing.
2016-06-30Make options_get_datadir_fname2_suffix() mockableAndrea Shepard
2016-05-30Replace nearly all XXX0vv comments with smarter onesNick Mathewson
So, back long ago, XXX012 meant, "before Tor 0.1.2 is released, we had better revisit this comment and fix it!" But we have a huge pile of such comments accumulated for a large number of released versions! Not cool. So, here's what I tried to do: * 0.2.9 and 0.2.8 are retained, since those are not yet released. * XXX+ or XXX++ or XXX++++ or whatever means, "This one looks quite important!" * The others, after one-by-one examination, are downgraded to plain old XXX. Which doesn't mean they aren't a problem -- just that they cannot possibly be a release-blocking problem.
2016-05-07Warn users when addresses in ports and descriptor are inconsistentteor (Tim Wilson-Brown)
This mitigates bug 13953.
2016-03-11Add changes file for 18448; refactorNick Mathewson
(I've made it so FreeBSD || FreeBSD_kernel is enough to ensure that we think you might have ipfw, and so that the logic is all in one place.)
2016-02-27Update the copyright year.Nick Mathewson
2016-01-22Fix redundant-declaration warningNick Mathewson
2016-01-21Merge remote-tracking branch 'twstrike/parse_port_config_tests'Nick Mathewson
2015-12-18Add new DirCache configuration optionMatthew Finkel
This will give relay operators the ability of disabling the caching of directory data. In general, this should not be necessary, but on some lower-resource systems it may beneficial.
2015-12-14Authorities on IPv6: minor fixes and unit teststeor (Tim Wilson-Brown)
Update the code for IPv6 authorities and fallbacks for function argument changes. Update unit tests affected by the function argument changes in the patch. Add unit tests for authority and fallback: * adding via a function * line parsing * adding default authorities (Adding default fallbacks is unit tested in #15775.)
2015-11-20Block OutboundBindAddressIPv[4|6]_ and configured ports on exit relaysteor (Tim Wilson-Brown)
Modify policies_parse_exit_policy_reject_private so it also blocks the addresses configured for OutboundBindAddressIPv4_ and OutboundBindAddressIPv6_, and any publicly routable port addresses on exit relays. Add and update unit tests for these functions.
2015-10-05Divide the different parse_port_config groups into separate testsOla Bini
2015-10-05Move CL_PORT definitions so they are accessible to the tests as wellOla Bini
2015-10-05Make compilation work under gcc-warningsOla Bini
2015-09-15Add tests for parse_port_configOla Bini
2015-09-15Add tests for directory_handle_command_getReinaldo de Souza Jr
2015-05-28Merge branch '12498_ed25519_keys_v6'Nick Mathewson
Fixed numerous conflicts, and ported code to use new base64 api.
2015-05-28prop220: Implement certificates and key storage/creationNick Mathewson
For prop220, we have a new ed25519 certificate type. This patch implements the code to create, parse, and validate those, along with code for routers to maintain their own sets of certificates and keys. (Some parts of master identity key encryption are done, but the implementation of that isn't finished)
2015-04-23Unit tests for consider_adding_dir_servers() as modified in #15642teor
Unit tests for the 10 valid combinations of set/NULL config options DirAuthorities, AlternateBridgeAuthority, AlternateDirAuthority, and FallbackDir. Add assertion in consider_adding_dir_servers() for checks in validate_dir_servers(): "You cannot set both DirAuthority and Alternate*Authority."
2015-04-01Drop support for --digestsNick Mathewson
This is a fair amount of maintainance burden, and doesn't help much more than the git microversion. Closes ticket 14742.
2015-01-28Support unix: prefix in port configurationDavid Goulet
It's now possible to use SocksPort or any other kind of port that can use a Unix socket like so: SocksPort unix:/foo/bar/unix.sock Fixes #14451 Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2015-01-02Bump copyright dates to 2015, in case someday this matters.Nick Mathewson
2014-11-27Merge remote-tracking branch 'andrea/cmux_refactor_configurable_threshold'Nick Mathewson
Conflicts: src/or/or.h src/test/Makefile.nmake
2014-11-04Merge remote-tracking branch 'andrea/ticket6456'Nick Mathewson
Somewhat tricky conflicts: src/or/config.c Also, s/test_assert/tt_assert in test_config.c
2014-10-28Add another year to our copyright dates.Nick Mathewson
Because in 95 years, we or our successors will surely care about enforcing the BSD license terms on this code. Right?