aboutsummaryrefslogtreecommitdiff
path: root/src/or/config.c
AgeCommit message (Collapse)Author
2012-01-04Merge remote-tracking branch 'rransom-tor/bug1297b-v2'Nick Mathewson
2011-12-27Add an option to close HS service-side rend circs on timeoutRobert Ransom
2011-12-27Add an option to close 'almost-connected' HS client circs on timeoutRobert Ransom
2011-12-22Fix bug2571: warn on EntryNodes set and UseEntryGuards disabledNick Mathewson
2011-12-22Prepend cwd for relative config file paths.Kamran Riaz Khan
Modifies filenames which do not start with '/' or '.' on non-Windows platforms; uses _fullpath on Windows.
2011-12-18Server transports should be instructed to bind on INADDR_ANY by default.George Kadianakis
2011-12-02Give DirAllowPrivateAddress an explicit defaultNick Mathewson
By convention, we say whether each bool's default is 0 or 1 Fixes 4536; found by "troll_un"
2011-11-30Merge branch 'feature2553-v4-rebased'Nick Mathewson
2011-11-30Add some more documentationArturo Filastò
2011-11-30Turn off LearnCircuitBuildTimeout when tor2web mode is onRobert Ransom
2011-11-30Warn loudly on startup and SIGHUP if Tor is built for a non-anonymous modeRobert Ransom
2011-11-30Add a compile-time #define to control whether Tor runs in 'tor2web mode'Robert Ransom
The Tor2webMode torrc option is still required to run a Tor client in 'tor2web mode', but now it can't be turned on at runtime in a normal build of Tor. (And a tor2web build of Tor can't be used as a normal Tor client, so we don't have to worry as much about someone distributing packages with this particular pistol accessible to normal users.)
2011-11-30Merge branch 'bug933_nm_rebased_v2'Nick Mathewson
Conflicts: src/test/test.c
2011-11-30Forbid remapping of *Nick Mathewson
It might be nice to support this someday, but for now it would fail with an infinite remap cycle. (If I say "remap * *.foo.exit", then example.com -> example.com.foo.exit -> example.com.foo.exit.foo.exit -> example.com.foo.exit.foo.exit.foo.exit -> ...)
2011-11-30Refactor addressmap_match_superdomains and representation of wildcardsNick Mathewson
In this new representation for wildcarded addresses, there are no longer any 'magic addresses': rather, "a.b c.d", "*.a.b c.d" and "*.a.b *.c.d" are all represented by a mapping from "a.b" to "c.d". we now distinguish them by setting bits in the addressmap_entry_t structure, where src_wildcard is set if the source address had a wildcard, and dst_wildcard is set if the target address had a wildcard. This lets the case where "*.a.b *.c.d" or "*.a.b c.d" remap the address "a.b" get handled trivially, and lets us simplify and improve the addressmap_match_superdomains implementation: we can now have it run in O(parts of address) rather than O(entries in addressmap).
2011-11-30Address nickm's comments at ↵Robert Hogan
https://trac.torproject.org/projects/tor/ticket/933#comment:8 1. Only allow '*.' in MapAddress expressions. Ignore '*ample.com' and '.example.com'. This has resulted in a slight refactoring of config_register_addressmaps. 2. Add some more detail to the man page entry for AddressMap. 3. Fix initialization of a pointer to NULL rather than 0. 4. Update the unit tests to cater for the changes in 1 and test more explicitly for recursive mapping.
2011-11-30Address nickm's comments at ↵Robert Hogan
https://trac.torproject.org/projects/tor/ticket/933#comment:4 1. Implement the following mapping rules: MapAddress a.b.c d.e.f # This is what we have now MapAddress .a.b.c d.e.f # Replaces any address ending with .a.b.c with d.e.f MapAddress .a.b.c .d.e.f # Replaces the .a.b.c at the end of any addr with .d.e.f (Note that 'a.b.c .d.e.f' is invalid, and will be rejected.) 2. Add tests for the new rules. 3. Allow proper wildcard annotation, i.e. '*.d.e' '.d.e' will still work. 4. Update addressmap_entry_t with an is_wildcard member.
2011-11-30Fix a memory leak in error path of my default-torrc codeNick Mathewson
Fixes Coverity CID # 500
2011-11-30appease "make check-spaces"Nick Mathewson
2011-11-30Whitespace changes.Linus Nordberg
2011-11-30Turn get_first_advertised_v4_port_by_type() into ↵Linus Nordberg
get_first_advertised_port_by_type_af().
2011-11-30Initial hacking for proposal 186.Nick Mathewson
This code handles the new ORPort options, and incidentally makes all remaining port types use the new port configuration systems. There are some rough edges! It doesn't do well in the case where your Address says one thing but you say to Advertise another ORPort. It doesn't handle AllAddrs. It doesn't actually advertise anything besides the first listed advertised IPv4 ORPort and DirPort. It doesn't do port forwarding to them either. It's not tested either, it needs more documentation, and it probably forgets to put the milk back in the refrigerator.
2011-11-29Merge remote-tracking branch 'rransom-tor/bug4605'Nick Mathewson
2011-11-29Set torrc_fname in load_torrc_from_diskRobert Ransom
Bugfix on commit 230422b955e1708f27f42cdd25e8b21a33fdd3dd, not yet in any release. Fixes bug #4604; reported by koolfy.
2011-11-29Merge remote-tracking branch 'asn-mytor/bug4548_take2'Nick Mathewson
2011-11-29Merge branch 'disable_network'Nick Mathewson
2011-11-28log a notice when disablenetwork is setNick Mathewson
2011-11-28New 'DisableNetwork' option to prevent Tor from using the networkNick Mathewson
Some controllers want this so they can mess with Tor's configuration for a while via the control port before actually letting Tor out of the house. We do this with a new DisableNetwork option, that prevents Tor from making any outbound connections or binding any non-control listeners. Additionally, it shuts down the same functionality as shuts down when we are hibernating, plus the code that launches directory downloads. To make sure I didn't miss anything, I added a clause straight to connection_connect, so that we won't even try to open an outbound socket when the network is disabled. In my testing, I made this an assert, but since I probably missed something, I've turned it into a BUG warning for testing.
2011-11-27Support for a defaults torrc file.Nick Mathewson
This will mainly help distributors by giving a way to set system or package defaults that a user can override, and that a later package can replace. No promises about the particular future location or semantics for this: we will probably want to tweak it some before 0.2.3.x-rc The file is searched for in CONFDIR/torrc-defaults , which can be overridden with the "--defaults-torrc" option on the command line.
2011-11-27Add the ability to append and clear linelist options from cmdlineNick Mathewson
This will be important for getting stuff to work right across zones.
2011-11-27Make linelists always overridden by the command lineNick Mathewson
This starts an effort to refactor torrc handling code to make it easier to live with. It makes it possible to override exit policies from the command line, and possible to override (rather than append to) socksport lists from the command line. It'll be necessary to make a "base" torrc implementation work at all.
2011-11-26Write dynamic DH parameters to a file.George Kadianakis
Instead of only writing the dynamic DH prime modulus to a file, write the whole DH parameters set for forward compatibility. At the moment we only accept '2' as the group generator. The DH parameters gets stored in base64-ed DER format to the 'dynamic_dh_params' file.
2011-11-26Normal relays should generate dynamic DH moduli as well.George Kadianakis
2011-11-25Simply initialize TLS context if DynamicDHGroups change.George Kadianakis
We used to do init_keys() if DynamicDHGroups changed after a HUP, so that the dynamic DH modulus was stored on the disk. Since we are now doing dynamic DH modulus storing in crypto.c, we can simply initialize the TLS context and be good with it. Introduce a new function router_initialize_tls_context() which initializes the TLS context and use it appropriately.
2011-11-25Only bother with dynamic DH moduli if we are a bridge.George Kadianakis
2011-11-24Move disable-debugger-attachment fn to compat where it belongs. Fix whitespaceNick Mathewson
2011-11-24Tweak disable_debugger_attachment a littleNick Mathewson
Don't warn when we have no implementation of this function (since it's on-by-default); reformat the changes entry; fix an overlong line.
2011-11-24Merge remote-tracking branch 'ioerror/DisableDebuggerAttachment'Nick Mathewson
Conflicts: src/or/config.c
2011-11-24Merge remote-tracking branch 'public/feature4516'Nick Mathewson
2011-11-25Rename 'dynamic prime' to 'dynamic DH modulus'.George Kadianakis
2011-11-25s/DynamicPrimes/DynamicDHGroups/gGeorge Kadianakis
2011-11-24Move crypto_get_stored_dynamic_prime() to crypto.cGeorge Kadianakis
2011-11-24Implement dynamic prime reading and storing to disk.George Kadianakis
2011-11-24Make DynamicPrimes SIGHUP-able.George Kadianakis
Instead of passing the DynamicPrimes configuration option to crypto_global_init(), generate and set a new TLS DH prime when we read the torrc.
2011-11-24Introduce the DynamicPrimes configuration option.George Kadianakis
2011-11-24Add Tor2webMode configuration optionRobert Ransom
2011-11-21raise AuthDirFastGuarantee from 20KB to 100KBRoger Dingledine
This patch reverts part of 39ceda7e05d7 (where it used to be 100KB).
2011-11-21Merge branch 'maint-0.2.2'Roger Dingledine
Conflicts: src/or/dirserv.c
2011-11-21parameterize bw cutoffs to guarantee Fast and Guard flagsRoger Dingledine
Now it will be easier for researchers to simulate Tor networks with different values. Resolves ticket 4484.
2011-11-18Merge remote-tracking branch 'origin/maint-0.2.2'Nick Mathewson