summaryrefslogtreecommitdiff
path: root/src/or
AgeCommit message (Collapse)Author
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-13Comments: prefer circuit_build_times_disabled() to LearnCircuitBuildTimeoutteor
2016-09-13Ephemeral Single Onion Services must have the NonAnonymous ADD_ONION flagteor
Tor checks that the flag matches the configured onion service anonymity. Tor refuses to create unflagged onion service using ADD_ONION, if they would be non-anonymous. The error is: 512 Tor is in non-anonymous onion mode Similarly, if the NonAnonymous flag is present, and Tor has the default anonymous onion config: 512 Tor is in anonymous onion mode
2016-09-13Refactor the hidden service code to use rend_service_pathteor
And make consequential changes to make it less error-prone. No behaviour change.
2016-09-13Allow the unit tests to pass a service list to rend_service_load_all_keysteor
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-13Use CircuitBuildTimeout whenever circuit_build_times_disabled is trueteor
Previously, we checked LearnCircuitBuildTimeout directly. Fixes bug #20073 in commit 5b0b51ca3 on tor 0.2.4.12-alpha.
2016-09-13Fix a typo in a comment in rend_consider_services_intro_pointsteor
2016-09-13Fix a typo in the LearnCircuitBuildTimeout disabled log messageteor
2016-09-13When LearnCircuitBuildTimeout is disabled by other options, be quieterteor
2016-09-13Remove a duplicate non-anonymous warning log messageteor
We log this message every time we validate tor's options. There's no need to log a duplicate in main() as well. (It is impossible to run main() without validating our options.)
2016-09-13Refactor crypto init to use existing options variableteor (Tim Wilson-Brown)
2016-09-13Make Tor2web work with ReachableAddresses and CRN_DIRECT_CONNteor
The changes in #19973 fixed ReachableAddresses being applied too broadly, but they also broke Tor2web (somewhat unintentional) compatibility with ReachableAddresses. This patch restores that functionality, which makes intro and rend point selection is consistent between Tor2web and Single Onion Services.
2016-09-13Make Single Onion Service intro points respect ReachableAddressesteor
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-13Make rend_service_free available to the unit teststeor (Tim Wilson-Brown)
Also check that the port list exists before freeing it. Patch by asn.
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-26Fix OOS comparator fixAndrea Shepard
2016-08-25Fix duplicated if condition in connection.cDavid Goulet
Furthermore, fix a test that could returned an uninitialized value. Signed-off-by: David Goulet <dgoulet@torproject.org>
2016-08-25Merge remote-tracking branch 'andrea/ticket18640_v3'Nick Mathewson
2016-08-24make check-spaces fixesNick Mathewson
2016-08-24Merge branch 'maint-0.2.8'Nick Mathewson
2016-08-24Fix path selection on firewalled clientsteor
Signed-off-by: teor <teor2345@gmail.com>
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-24Add a stub for rend_service_allow_direct_connectionteor
It always returns 0. It should be replaced with the Single Onion version from #17178 when both are merged.
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.
2016-08-24Improve comments in circuit_get_cpath_*teor (Tim Wilson-Brown)
2016-08-24Client & HS make sure every hop in every non-HS path supports ntorteor (Tim Wilson-Brown)
When a client connects to an intro point not in the client's consensus, or a hidden service connects to a rend point not in the hidden service's consensus, we are stuck with using TAP, because there is no ntor link specifier.
2016-08-23Merge remote-tracking branch 'jigsaw/fix-17758'Nick Mathewson
2016-08-23Merge remote-tracking branch 'jigsaw/fix-15381'Nick Mathewson
2016-08-23Use tor_assert, not assert.Nick Mathewson
2016-08-23Merge branch 'bug13953_squashed'Nick Mathewson
2016-08-23Reword the router_check_descriptor_address_port_consistency log messageteor
The new message covers static and dynamic public IPv4 addresses, and external / internal addresses in NAT setups.
2016-08-22Merge branch 'maint-0.2.8'Nick Mathewson
2016-08-22Do not pass NULL to log(%s) in dir_server_new.Nick Mathewson
This bug had existed since 0.2.4.7-alpha, but now that we have FallbackDirs by default, it actually matters. Fixes bug 19947; bugfix on 0.2.4.7-alpha or maybe 0.2.8.1-alpha. Rubiate wrote the patch; teor wrote the changes file.
2016-08-20Use connection_mark_for_close() rather than connection_mark_on_flush() on OOSAndrea Shepard
2016-08-20Add DisableOOSCheck option, on by default until we have better heuristicsAndrea Shepard
2016-08-20Consider the case that a connection doesn't have a valid socket during OOSAndrea Shepard
2016-08-20Add connection_is_moribund() inlineAndrea Shepard
2016-08-20Use SMARTLIST_FOREACH in connection_count_moribund() per code reviewAndrea Shepard
2016-08-20s/connection_handle_oos/connection_check_oos/g per code reviewAndrea Shepard
2016-08-20Unit test for pick_oos_victims()Andrea Shepard
2016-08-20Unit test for kill_conn_list_for_oos()Andrea Shepard
2016-08-20Unit test for connection_handle_oos()Andrea Shepard
2016-08-20Implement OOS comparatorAndrea Shepard
2016-08-20Implement pick_oos_victims() except for sort stepAndrea Shepard