aboutsummaryrefslogtreecommitdiff
path: root/src/or/config.h
AgeCommit message (Collapse)Author
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?
2014-09-30Make is_local_addr() mockableAndrea Shepard
2014-09-29Clear the cached address from resolve_my_address() when our IP changesNick Mathewson
Closes 11582; patch from "ra".
2014-08-15Restore functionality for CookieAuthFileGroupReadable.Nick Mathewson
When we merged the cookieauthfile creation logic in 33c3e60a37, we accidentally took out this feature. Fixes bug 12864, bugfix on 0.2.5.1-alpha. Also adds an ExtORPortCookieAuthFileGroupReadable, since there's no reason not to.
2014-07-28Replace all calls to parse_client_transport_line() or ↵Andrea Shepard
parse_server_transport_line() with new parse_transport_line() stub
2014-07-25Expose parse_client_transport_line() and parse_server_transport_line() for ↵Andrea Shepard
the test suite
2014-04-15Uplift status.c unit test coverage with new test cases and macros.dana koch
A new set of unit test cases are provided, as well as introducing an alternative paradigm and macros to support it. Primarily, each test case is given its own namespace, in order to isolate tests from each other. We do this by in the usual fashion, by appending module and submodule names to our symbols. New macros assist by reducing friction for this and other tasks, like overriding a function in the global namespace with one in the current namespace, or declaring integer variables to assist tracking how many times a mock has been called. A set of tests for a small-scale module has been included in this commit, in order to highlight how the paradigm can be used. This suite gives 100% coverage to status.c in test execution.
2013-09-13Whoops; make options_validate conform to validate_fn_t.Nick Mathewson
This just goes to show: never cast a function pointer. Found while testing new command line parse logic. Bugfix on 1293835440dd4debf6fbfc66e755d9b9384aa362, which implemented 6752: Not in any released tor.
2013-09-13Expose commandline parser so that we can use it for --quiet,etc.Nick Mathewson
Fix for bug 9578.
2013-08-15Implement and use a generic auth. cookie initialization function.George Kadianakis
Use the generic function for both the ControlPort cookie and the ExtORPort cookie. Also, place the global cookie variables in the heap so that we can pass them around more easily as pointers. Also also, fix the unit tests that broke by this change. Conflicts: src/or/config.h src/or/ext_orport.c
2013-07-18Start of a unit test for options_validate.Nick Mathewson
I added this so I could write a unit test for ServerTransportOptions, but it incidentally exercises the succeed-on-defaults case of options_validate too.
2013-07-18Place the options in the environment after processing them properly.George Kadianakis
2013-07-18Write function that parses ServerTransportOptions torrc lines.George Kadianakis
And use it to validate them.
2013-07-15Merge remote-tracking branch 'public/fancy_test_tricks'Nick Mathewson
Conflicts: src/common/include.am Conflict was from adding testsupport.h near where sandbox.h had already been added.
2013-07-11Remove a bogus semicolon spotted by Gisle VanemNick Mathewson
2013-07-10Completely refactor how FILENAME_PRIVATE worksNick Mathewson
We previously used FILENAME_PRIVATE identifiers mostly for identifiers exposed only to the unit tests... but also for identifiers exposed to the benchmarker, and sometimes for identifiers exposed to a similar module, and occasionally for no really good reason at all. Now, we use FILENAME_PRIVATE identifiers for identifiers shared by Tor and the unit tests. They should be defined static when we aren't building the unit test, and globally visible otherwise. (The STATIC macro will keep us honest here.) For identifiers used only by the unit tests and never by Tor at all, on the other hand, we wrap them in #ifdef TOR_UNIT_TESTS. This is not the motivating use case for the split test/non-test build system; it's just a test example to see how it works, and to take a chance to clean up the code a little.
2013-05-24Extract duplicate code in geoip and rephist.Peter Retzlaff
Create new methods check_or_create_data_subdir() and write_to_data_subdir() in config.c and use them throughout rephist.c and geoip.c. This should solve ticket #4282.
2013-03-19Merge remote-tracking branch 'asn/bug3594_rebased_and_fixed'Nick Mathewson
Conflicts: src/common/util.c src/or/entrynodes.h
2013-02-12get rid of the new caching notion in resolve_my_address()Roger Dingledine
and replace it with the good old-fashioned two functions approach