summaryrefslogtreecommitdiff
path: root/src/or/config.c
AgeCommit message (Collapse)Author
2018-07-18Warn the directory authority operator if their versions list is bogusNick Mathewson
Prevents bug 26485; bugfix on 0.1.1.6-alpha.
2018-04-09Lift the list of default directory servers into their own file.Alexander Færøy
This patch lifts the list of default directory authorities from config.c into their own auth_dirs.inc file, which is then included in config.c using the C preprocessor. Patch by beastr0. See: https://bugs.torproject.org/24854
2018-01-30dos: Make circuit rate limit per second, not tenths anymoreDavid Goulet
Because this touches too many commits at once, it is made into one single commit. Remove the use of "tenths" for the circuit rate to simplify things. We can only refill the buckets at best once every second because of the use of approx_time() and our token system is set to be 1 token = 1 circuit so make the rate a flat integer of circuit per second. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-01-30dos: Initial code of Denial of Service mitigationDavid Goulet
This commit introduces the src/or/dos.{c|h} files that contains the code for the Denial of Service mitigation subsystem. It currently contains basic functions to initialize and free the subsystem. They are used at this commit. The torrc options and consensus parameters are defined at this commit and getters are implemented. Signed-off-by: David Goulet <dgoulet@torproject.org>
2018-01-05Merge branch 'teor_ticket24681_028' into maint-0.2.9Nick Mathewson
2018-01-05fix a wide lineNick Mathewson
2017-12-23Make the default DirAuthorityFallbackRate 0.1teor
This makes clients on the public tor network prefer to bootstrap off fallback directory mirrors. This is a follow-up to 24679, which removed weights from the default fallbacks. Implements ticket 24681.
2017-11-27Merge branch 'maint-0.2.8' into maint-0.2.9Nick Mathewson
2017-11-27Add bastet's ipv6 addressSebastian Hahn
Implements ticket 24394
2017-10-31Merge remote-tracking branch 'public/bug23693_029' into maint-0.2.9Nick Mathewson
2017-10-23Merge branch 'maint-0.2.8' into maint-0.2.9Nick Mathewson
2017-10-23Merge branch 'maint-0.2.5' into maint-0.2.8Nick Mathewson
2017-10-23dirauth: Add bastet to the default authoritiesDavid Goulet
Fixes #23910 Based on a patch by dgoulet; backported to 0.2.5
2017-10-23Merge branch 'maint-0.2.8' into maint-0.2.9Nick Mathewson
2017-10-23Merge branch 'maint-0.2.5' into maint-0.2.8Nick Mathewson
2017-10-17Update Longclaw's IP address; fixes 23592.Nick Mathewson
2017-10-02Make changes in server_mode() affect workers; fix a crash.Nick Mathewson
Without this fix, changes from client to bridge don't trigger transition_affects_workers(), so we would never have actually initialized the cpuworkers. Fixes bug 23693. Bugfix on 3bcdb26267502e0 0.2.6.3-alpha, which fixed bug 14901 in the general case, but not on the case where public_server_mode() did not change.
2017-09-20Merge branch 'maint-0.2.8' into maint-0.2.9Nick Mathewson
2017-09-20Remove longclaw's IPv6 address, as it will soon changeteor
Authority IPv6 addresses were originally added in 0.2.8.1-alpha. This leaves 3/8 directory authorities with IPv6 addresses, but there are also 52 fallback directory mirrors with IPv6 addresses. Resolves 19760.
2017-02-07Merge branch 'maint-0.2.4' into maint-0.2.5Nick Mathewson
2017-02-07Backport the tonga->bifroest move to 0.2.4.Nick Mathewson
This is a backport of 19728 and 19690
2016-12-07Netbsd doesn't have ipfw, only the regular pf transport stuff.Nick Mathewson
Attempted fix for 19960. Also, fixes a typo.
2016-12-01Stop ignoring hidden service key anonymity when first starting torteor
Instead, refuse to start tor if any hidden service key has been used in a different hidden service anonymity mode. Fixes bug 20638; bugfix on 17178 in 0.2.9.3-alpha; reported by ahf. The original single onion service poisoning code checked poisoning state in options_validate, and poisoned in options_act. This was problematic, because the global array of hidden services had not been populated in options_validate (and there were ordrering issues with hidden service directory creation). This patch fixes this issue in rend_service_check_dir_and_add, which: * creates the directory, or checks permissions on an existing directory, then * checks the poisoning state of the directory, then * poisons the directory. When validating, only the permissions checks and the poisoning state checks are perfomed (the directory is not modified).
2016-11-07Adjust download schedules per teor's #20534 recommendataionsNick Mathewson
2016-10-17Add a logic-consistency test when parsing unix socket configsNick Mathewson
Coverity couldn't tell that 'addrport' was always non-NULL at this point in the function, so I'm adding an explicit check. This closes CID 1374060.
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-30Bug 20261: Disable IsolateClientAddr on AF_LOCAL SocksPorts.Yawning Angel
The client addr is essentially meaningless in this context (yes, it is possible to explicitly `bind()` AF_LOCAL client side sockets to a path, but no one does it, and there are better ways to grant that sort of feature if people want it like using `SO_PASSCRED`).
2016-09-21Merge remote-tracking branch 'isis/bug20201'Nick Mathewson
2016-09-21Update documentation for parse_bridge_line() in src/or/config.c.Isis Lovecruft
* FIXES #20201: https://bugs.torproject.org/20201
2016-09-13Merge branch 'feature-17178-v7-squashed-v2'Nick Mathewson
2016-09-13Replace OnionService* with HiddenService* in option namesteor
And make consequential line-length adjustments.
2016-09-13Refactor Single Onion code to improve consistencyteor
* Check consistency between the two single onion torrc options * Use the more relevant option each time we check for single onion mode * Clarify log messages * Clarify comments * Otherwise, no behaviour change
2016-09-13Refactor UseEntryNodes so the original configured value is preservedteor
Parse the value to UseEntryNodes_option, then set UseEntryNodes before validating options. This way, Authorities, Tor2web, and Single Onion Services don't write spurious "UseEntryNodes 0" lines to their configs. Document the fact that these tor configurations ignore UseEntryNodes in the manual page. Also reorder options validation so we modify UseEntryNodes first, then check its value against EntryNodes. And silence a warning about disabled UseEntryNodes for hidden services when we're actually in non-anonymous single onion service mode.
2016-09-13Fix a typo in the LearnCircuitBuildTimeout disabled log messageteor
2016-09-13When LearnCircuitBuildTimeout is disabled by other options, be quieterteor
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-09-07Merge remote-tracking branch 'dgoulet/ticket18693_029_01'Nick Mathewson
2016-08-31Count unix sockets when counting client listenersteor (Tim Wilson-Brown)
Users can't run an anonymous client and non-anonymous single onion service at the same time. We need to know whether we have any client ports or sockets open to do this check. When determining whether a client port (SOCKS, Trans, NATD, DNS) is set, count unix sockets when counting client listeners. This has no user-visible behaviour change, because these options are set once and never read in the current tor codebase. Don't count sockets when setting ControlPort_set, that's what ControlSocket is for. (This will be reviewed in #19665.) Don't count sockets when counting server listeners, because the code that uses these options expects to count externally-visible ports. (And it would change the behaviour of Tor.)
2016-08-29We no longer need to tag UseNTorHandshake as deprecated, since it is obsoleteNick Mathewson
2016-08-29Merge remote-tracking branch 'teor/reject-tap-v6'Nick Mathewson
2016-08-25Merge remote-tracking branch 'andrea/ticket18640_v3'Nick Mathewson
2016-08-24Parse *Port flags NoDNSRequest, NoOnionTraffic & OnionTrafficOnlyteor (Tim Wilson-Brown)
OnionTrafficOnly is equivalent to NoDNSRequest, NoIPv4Traffic, and NoIPv6Traffic. Add unit tests for parsing and checking option validity. Add documentation for each flag to the man page. Add changes file for all of #18693. Parsing only: the flags do not change client behaviour (yet!)
2016-08-24make check-spaces fixesNick Mathewson
2016-08-24Merge branch 'maint-0.2.8'Nick Mathewson
2016-08-24Merge branch 'maint-0.2.7' into maint-0.2.8Nick Mathewson
2016-08-24Replace Tonga with Bifroest.Isis Lovecruft
* FIXES #19728: https://bugs.torproject.org/19728 * CLOSES #19690: https://bugs.torproject.org/19690
2016-08-24Client & HS ignore UseNTorHandshake, all non-HS handshakes use ntorteor (Tim Wilson-Brown)
Rely on onion_populate_cpath to check that we're only using TAP for the rare hidden service cases. Check and log if handshakes only support TAP when they should support ntor.