aboutsummaryrefslogtreecommitdiff
path: root/src/or/or.h
AgeCommit message (Collapse)Author
2015-05-28Implement proposal 228: cross-certification with onion keysNick Mathewson
Routers now use TAP and ntor onion keys to sign their identity keys, and put these signatures in their descriptors. That allows other parties to be confident that the onion keys are indeed controlled by the router that generated the descriptor.
2015-05-28Implement ed25519-signed descriptorsNick Mathewson
Now that we have ed25519 keys, we can sign descriptors with them and check those signatures as documented in proposal 220.
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-02-24Mechanical rename: tor_cert_t -> tor_x509_cert_tNick Mathewson
2015-02-18Merge branch 'bug9321_rerebase'Nick Mathewson
Conflicts: src/or/dirvote.h src/test/include.am src/test/test_entrynodes.c
2015-02-18Parse GuardFraction info from consensuses and votes.George Kadianakis
Also introduce the UseGuardFraction torrc option which decides whether clients should use guardfraction information found in the consensus.
2015-02-18Parse Guardfraction file and apply results to routerstatuses.George Kadianakis
Parse the file just before voting and apply its information to the provided vote_routerstatus_t. This follows the same logic as when dirauths parse bwauth files.
2015-02-17Merge remote-tracking branch 'public/feature_13822'Nick Mathewson
2015-02-11Merge branch 'bug12844'Nick Mathewson
Conflicts: src/or/circuituse.c src/test/include.am src/test/test_entrynodes.c
2015-02-09Add some comments to or_circuit_t.workqueue_entrySebastian Hahn
These were suggested by dgoulet, thanks!
2015-02-07Split ROUTER_REQUIRED_MIN_BANDWIDTH into RELAY_ and BRIDGE_ variantsNick Mathewson
Also raise those minima from 20 to 75 and 50 respectively. Closes ticket 13822.
2015-01-30Merge remote-tracking branch 'public/prop227_v2'Nick Mathewson
Conflicts: src/test/test_dir.c
2015-01-29Remove SocksSocket; it's now spelled differently thanks to 14451Nick Mathewson
Also, revise bug12585 changes file to mention new syntax
2015-01-27Fixes on prop227 comments, based on comments by mcs on #10395Nick Mathewson
2015-01-23Merge remote-tracking branch 'public/ticket9969'Nick Mathewson
Conflicts: src/or/directory.c src/or/routerlist.c src/or/routerlist.h src/test/include.am src/test/test.c
2015-01-21Merge branch 'better_workqueue_v3_squashed'Nick Mathewson
2015-01-18Remove the unused rend_cache_entry_t->received field.Roger Dingledine
(Patch from arma, commit message from nick.) Closes #14222.
2015-01-16Merge branch 'bug8546_squashed'Nick Mathewson
Conflicts: src/or/connection.c src/or/or.h src/or/relay.c
2015-01-16Move entry_port_cfg_t fields in entry_connection_tNick Mathewson
Also rename some options for uniformity, and apply this script: @@ entry_connection_t *conn; @@ conn-> +entry_cfg. \( isolation_flags \| session_group \| socks_prefer_no_auth \| ipv4_traffic \| ipv6_traffic \| prefer_ipv6 \| cache_ipv4_answers \| cache_ipv6_answers \| use_cached_ipv4_answers \| use_cached_ipv6_answers \| prefer_ipv6_virtaddr \)
2015-01-16Combine entry_port_cfg_t fields in listener_connection_tNick Mathewson
Also, revise the code using these options with this cocci script: @@ listener_connection_t *conn; @@ conn-> +entry_cfg. \( isolation_flags \| session_group \| socks_prefer_no_auth \| ipv4_traffic \| ipv6_traffic \| prefer_ipv6 \| cache_ipv4_answers \| cache_ipv6_answers \| use_cached_ipv4_answers \| use_cached_ipv6_answers \| prefer_ipv6_virtaddr \)
2015-01-16Split client-specific and server-specific parts of port_cfg_tNick Mathewson
Also, apply this cocci script to transform accesses. (Plus manual migration for accesses inside smartlist_foreach loops.) @@ port_cfg_t *cfgx; @@ cfgx-> +server_cfg. \( no_advertise \| no_listen \| all_addrs \| bind_ipv4_only \| bind_ipv6_only \) @@ port_cfg_t *cfgx; @@ cfgx-> +entry_cfg. \( isolation_flags \| session_group \| socks_prefer_no_auth \| ipv4_traffic \| ipv6_traffic \| prefer_ipv6 \| cache_ipv4_answers \| cache_ipv6_answers \| use_cached_ipv4_answers \| use_cached_ipv6_answers \| prefer_ipv6_virtaddr \)
2015-01-14Avoid chan/circ linear lookups for requestsNick Mathewson
The solution I took is to not free a circuit with a pending uncancellable work item, but rather to set its magic number to a sentinel value. When we get a work item, we check whether the circuit has that magic sentinel, and if so, we free it rather than processing the reply.
2015-01-14Refactor cpuworker to use workqueue/threadpool code.Nick Mathewson
2015-01-13Merge remote-tracking branch 'andrea/ticket12585_v3'Nick Mathewson
2015-01-12Merge branch 'bug13806_squashed'Nick Mathewson
Conflicts: src/or/relay.c
2015-01-12When OOM, free cached hidden service descriptors too.Nick Mathewson
2015-01-10Implement proposal 227-vote-on-package-fingerprints.txtNick Mathewson
This implementation includes tests and a little documentation.
2015-01-10Create TestingDirAuthVoteHSDir like TestingDirAuthVoteExit/Guardteor
TestingDirAuthVoteHSDir ensures that authorities vote the HSDir flag for the listed relays regardless of uptime or ORPort connectivity. Respects the value of VoteOnHidServDirectoriesV2. Partial fix for bug 14067.
2015-01-07Commit second draft of Jake's SOCKS5-over-AF_UNIX patch. See ticket #12585.Jacob Appelbaum
Signed-off-by: Andrea Shepard <andrea@torproject.org>
2015-01-06Merge branch 'exitnode_10067_squashed'Nick Mathewson
Conflicts: src/or/or.h
2015-01-06Add an ExitRelay option to override ExitPolicyNick Mathewson
If we're not a relay, we ignore it. If it's set to 1, we obey ExitPolicy. If it's set to 0, we force ExitPolicy to 'reject *:*' And if it's set to auto, then we warn the user if they're running an exit, and tell them how they can stop running an exit if they didn't mean to do that. Fixes ticket 10067
2015-01-06Merge remote-tracking branch 'public/bug12509_025'Nick Mathewson
2015-01-06Merge remote-tracking branch 'public/feature11791'Nick Mathewson
2015-01-04Prevent changes to other options from removing . from AutomapHostsSuffixesNick Mathewson
This happened because we changed AutomapHostsSuffixes to replace "." with "", since a suffix of "" means "match everything." But our option handling code for CSV options likes to remove empty entries when it re-parses stuff. Instead, let "." remain ".", and treat it specially when we're checking for a match. Fixes bug 12509; bugfix on 0.2.0.1-alpha.
2015-01-02Bump copyright dates to 2015, in case someday this matters.Nick Mathewson
2014-12-19Add two hidden-service related statistics.George Kadianakis
The two statistics are: 1. number of RELAY cells observed on successfully established rendezvous circuits; and 2. number of .onion addresses observed as hidden-service directory. Both statistics are accumulated over 24 hours, obfuscated by rounding up to the next multiple of a given number and adding random noise, and written to local file stats/hidserv-stats. Notably, no statistics will be gathered on clients or services, but only on relays.
2014-11-27Fix some issues with the scheduler configuration optionsNick Mathewson
1) Set them to the values that (according to Rob) avoided performance regressions. This means that the scheduler won't get much exercise until we implement KIST or something like it. 2) Rename the options to end with a __, since I think they might be going away, and nobody should mess with them. 3) Use the correct types for the option variables. MEMUNIT needs to be a uint64_t; UINT needs to be (I know, I know!) an int. 4) Validate the values in options_validate(); do the switch in options_act(). This way, setting the option to an invalid value on a running Tor will get backed out.
2014-11-27Merge remote-tracking branch 'andrea/cmux_refactor_configurable_threshold'Nick Mathewson
Conflicts: src/or/or.h src/test/Makefile.nmake
2014-11-26Merge remote-tracking branch 'public/bug13126'Nick Mathewson
Conflicts: src/or/or.h
2014-11-25Merge branch 'feature9503_squashed'Nick Mathewson
2014-11-25Adding 'SIGNAL HEARTBEAT' message that causes unscheduled heartbeat.rl1987
2014-11-17Remove Support022HiddenServicesNick Mathewson
This has been already disabled in the directory consensus for a while; it didn't seem to break anything. Finally closes #7803.
2014-11-17Use smaller zlib objects when under memory pressureNick Mathewson
We add a compression level argument to tor_zlib_new, and use it to determine how much memory to allocate for the zlib object. We use the existing level by default, but shift to smaller levels for small requests when we have been over 3/4 of our memory usage in the past half-hour. Closes ticket 11791.
2014-11-12Merge remote-tracking branch 'rl1987/bug13644'Nick Mathewson
2014-11-12Merge remote-tracking branch 'public/bug13698_024_v1'Nick Mathewson
2014-11-11Renaming ROUTER_WAS_NOT_NEW to ROUTER_IS_ALREADY_KNOWN.rl1987
2014-11-11Comment possible values of was_router_added_t.rl1987
2014-11-10Fix: don't report timeout when closing parallel intro pointsDavid Goulet
When closing parallel introduction points, the given reason (timeout) was actually changed to "no reason" thus when the circuit purpose was CIRCUIT_PURPOSE_C_INTRODUCE_ACK_WAIT, we were reporting an introduction point failure and flagging it "unreachable". After three times, that intro point gets removed from the rend cache object. In the case of CIRCUIT_PURPOSE_C_INTRODUCING, the intro point was flagged has "timed out" and thus not used until the connection to the HS is closed where that flag gets reset. This commit adds an internal circuit reason called END_CIRC_REASON_IP_NOW_REDUNDANT which tells the closing circuit mechanism to not report any intro point failure. This has been observed while opening hundreds of connections to an HS on different circuit for each connection. This fix makes this use case to work like a charm. Fixes #13698. Signed-off-by: David Goulet <dgoulet@ev0ke.net>
2014-11-05Merge remote-tracking branch 'meejah/ticket-11291-extra-utests'Nick Mathewson
Conflicts: src/or/config.c
2014-11-03Remove smartlist_choose_node_by_bandwidth()Nick Mathewson
We were only using it when smartlist_choose_node_by_bandwidth_weights failed. But that function could only fail in the presence of buggy/ancient authorities or in the absence of a consensus. Either way, it's better to use sensible defaults and a nicer algorithm.