summaryrefslogtreecommitdiff
path: root/src/or/config.h
AgeCommit message (Collapse)Author
2018-07-05Move literally everything out of src/orNick Mathewson
This commit won't build yet -- it just puts everything in a slightly more logical place. The reasoning here is that "src/core" will hold the stuff that every (or nearly every) tor instance will need in order to do onion routing. Other features (including some necessary ones) will live in "src/feature". The "src/app" directory will hold the stuff needed to have Tor be an application you can actually run. This commit DOES NOT refactor the former contents of src/or into a logical set of acyclic libraries, or change any code at all. That will have to come in the future. We will continue to move things around and split them in the future, but I hope this lays a reasonable groundwork for doing so.
2018-07-03Merge remote-tracking branch 'github/ticket26626'Nick Mathewson
2018-07-03Replace U64_LITERAL with the standard UINT64_CNick Mathewson
2018-07-01Extract or_options_t from or.hNick Mathewson
I decided to have this file included from config.h, though, since it is used nearly everywhere.
2018-07-01Extract various enums and tiny structs from or.hNick Mathewson
These all have a logical header to go in.
2018-07-01Remove needless includes from or.hNick Mathewson
or.h should really include only the minimum of stuff from or/*, common/*, and lib/*.
2018-06-22Finally extract the log library and make it build.Nick Mathewson
This patch: - introduces an fdio module for low-level fd functions that don't need to log. - moves the responsibility for opening files outside of torlog.c, so it won't need to call tor_open_cloexec.
2018-06-21Rectify include paths (automated).Nick Mathewson
You have no idea how glad I am that this is automated.
2018-06-20Run rectify_include_paths.pyNick Mathewson
2018-06-20Update copyrights to 2018.Nick Mathewson
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