summaryrefslogtreecommitdiff
path: root/src/feature/hs
AgeCommit message (Collapse)Author
2021-04-21hs: Fix memory leak in client cacheDavid Goulet
Fixes #40356 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-03-24fix some tiny typosRoger Dingledine
2021-03-12Run "make autostyle" in advance of new series.Nick Mathewson
2021-03-12Update copyrights to 2021, using "make update-copyright"Nick Mathewson
2021-03-10Merge branch 'maint-0.4.5'Nick Mathewson
2021-03-10hs: Remove hamrless BUG() that can happenDavid Goulet
When reloading a service, we can re-register a service and thus end up again in the metrics store initialization code path which is fine. No need to BUG() anymore. Fixes #40334 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-19hs-v2: Warn of v2 obsolete if configuredDavid Goulet
For a user using "HiddenServiceVersion 2", a log warning is emitted indicating that v2 is now obsolete instead of a confusing message saying that the version is not supported. Also, if an introduction point gets a legacy (v2) ESTABLISH_INTRO, we'll simply close the circuit without emitting a protocol warning log onto the relay. Related to #40266 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-19hs: Remove last artefact of HSv2 in the codeDavid Goulet
Closes #40266 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-19hs: Remove v2 code from HS circuitmapDavid Goulet
Related to #40266 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-19hs: Remove v2 statsDavid Goulet
We still keep v2 rendezvous stats since we will allow them until the network has entirely phased out. Related to #40266 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-19man: Cleanup of v2 options and configDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-19hs: Remove introduction point v2 supportDavid Goulet
Related to #40266 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-19hs-v2: Removal of service and relay supportDavid Goulet
This is unfortunately massive but both functionalities were extremely intertwined and it would have required us to actually change the HSv2 code in order to be able to split this into multiple commits. After this commit, there are still artefacts of v2 in the code but there is no more support for service, intro point and HSDir. The v2 support for rendezvous circuit is still available since that code is the same for the v3 and we will leave it in so if a client is able to rendezvous on v2 then it can still transfer traffic. Once the entire network has moved away from v2, we can remove v2 rendezvous point support. Related to #40266 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-19hs: Rename service config port objectDavid Goulet
Remove it from rendservice.c and move everything related to hs_common.{c|h}. Related to #40266 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-19hs-v2: Remove client supportDavid Goulet
Related to #40266 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-02-08Merge remote-tracking branch 'tor-gitlab/mr/212'George Kadianakis
2021-01-27Merge remote-tracking branch 'tor-gitlab/mr/247'George Kadianakis
2021-01-12Merge branch 'maint-0.4.5'George Kadianakis
2021-01-12Merge branch 'ticket40237_044_01' into ticket40237_045_01David Goulet
2021-01-12Merge branch 'ticket40237_043_01' into ticket40237_044_01David Goulet
2021-01-12Merge branch 'ticket40237_035_01' into ticket40237_043_01David Goulet
2021-01-12hs-v3: Require reasonably live consensusDavid Goulet
Some days before this commit, the network experienced a DDoS on the directory authorities that prevented them to generate a consensus for more than 5 hours straight. That in turn entirely disabled onion service v3, client and service side, due to the subsystem requiring a live consensus to function properly. We know require a reasonably live consensus which means that the HSv3 subsystem will to its job for using the best consensus tor can find. If the entire network is using an old consensus, than this should be alright. If the service happens to use a live consensus while a client is not, it should still work because the client will use the current SRV it sees which might be the previous SRV for the service for which it still publish descriptors for. If the service is using an old one and somehow can't get a new one while clients are on a new one, then reachability issues might arise. However, this is a situation we already have at the moment since the service will simply not work if it doesn't have a live consensus while a client has one. Fixes #40237 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-12-24Downgrade the severity of a few rendezvous circuit-related warnings.Neel Chauhan
2020-12-08Reinstate add_onion_helper_add_service() test, validate auth clients before ↵Neel Chauhan
adding them
2020-12-08Remove unused NULL check in hs_service_add_ephemeral(), mention we take ↵Neel Chauhan
ownership of auth_clients_v3
2020-12-03More logic correctionsNeel Chauhan
2020-11-24Some test and logic correctionsNeel Chauhan
2020-11-19Add tests for bug #40084Neel Chauhan
2020-11-17Merge branch 'tor-gitlab/mr/182' into masterDavid Goulet
2020-11-15Add support for creating v3 onion services form the control portNeel Chauhan
2020-11-12Fix typos.Samanta Navarro
Typos found with codespell. Please keep in mind that this should have impact on actual code and must be carefully evaluated: src/core/or/lttng_circuit.inc - ctf_enum_value("CONTROLER", CIRCUIT_PURPOSE_CONTROLLER) + ctf_enum_value("CONTROLLER", CIRCUIT_PURPOSE_CONTROLLER)
2020-11-03Implement support for "unique v3 onions" stat.George Kadianakis
2020-11-03Introduce v3_stats_t structure and some of its methods.George Kadianakis
2020-10-27metrics: Add tor_ namespace to all metricsDavid Goulet
Closes #40063 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-10-27hs: Collect introduction circuit metricsDavid Goulet
Tracks the total number of established introduction circuit. Related to #40063 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-10-27hs: Collect rendezvous circuit metricsDavid Goulet
The total number of rendezvous circuit created and the number of established ones which is a gauge that decreases to keep an updated counter. Related to #40063 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-10-27hs: Collect service traffic metricsDavid Goulet
Related to #40063 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-10-27hs: Always note the virtual port in the identDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-10-27hs: New metrics moduleDavid Goulet
At this commit, a new service registers to the module and a store is created. It also remove itself from the metrics module if it goes away. In order to hook into the metrics subsystem, this commit attaches the HS subsystem into the subsystem global list so its get_metrics() call can be accessible. HS initialization is still _not_ done through the subsys module as it is likely require much more testing. Related to #40063 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-10-01fix typosRoger Dingledine
no actual changes
2020-09-17Fix wide linesNick Mathewson
2020-09-17Rename tor_cert_create to tor_cert_create_ed25519Nick Mathewson
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ tor_cert_create tor_cert_create_ed25519 It was generated with --no-verify, so it probably breaks some commit hooks. The commiter should be sure to fix them up in a subsequent commit.
2020-08-25Merge branch 'maint-0.4.4'George Kadianakis
2020-08-25Merge remote-tracking branch 'tor-gitlab/mr/130' into maint-0.4.4George Kadianakis
2020-08-20Merge branch 'maint-0.4.4'George Kadianakis
2020-08-20v3 control: Persist ONION_CLIENT_AUTH_ADD client nameNeel Chauhan
2020-08-19hs: Don't overwrite DoS parameters on circuit with consensus paramsDavid Goulet
Turns out that the HS DoS defenses parameters were overwritten by the consensus parameters everytime a new consensus would arrive. This means that a service operator can still enable the defenses but as soon as the intro point relay would get a new consensus, they would be overwritten. And at this commit, the network is entirely disabling DoS defenses. Fix this by introducing an "explicit" flag that indicate if the ESTABLISH_INTRO cell DoS extension set those parameters or not. If set, avoid using the consenus at once. We are not bumping the protover HSIntro value for this because 0.4.2.x series is EOL in 1 month and thus 0.4.3.x would be the only series with this bug. We are confident that a backport and then upgrade path to the latest 0.4.4.x stable coming up soon is enough to mitigate this problem in the coming months. It avoids the upgrade path on the service side by keeping the requirement for protover HSIntro=5. Fixes #40109 Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-08-11Merge remote-tracking branch 'tor-gitlab/mr/119'Nick Mathewson
2020-08-11Remove a BUG() that could normally trigger in edge-cases.George Kadianakis
2020-08-05Replace several C identifiers for ticket 18106.Nick Mathewson
We used to have a single boolean, "FascistFirewall". Ages ago, in tickets #17840 and #9067, we added an improved "ReachableAddresses" mechanism. It's time to rename related identifiers in the code for consistency. This closes #18106. This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ fascist_firewall_allows_address reachable_addr_allows \ fascist_firewall_use_ipv6 reachable_addr_use_ipv6 \ fascist_firewall_prefer_ipv6_impl reachable_addr_prefer_ipv6_impl \ fascist_firewall_prefer_ipv6_orport reachable_addr_prefer_ipv6_orport \ fascist_firewall_prefer_ipv6_dirport reachable_addr_prefer_ipv6_dirport \ fascist_firewall_allows_address_addr reachable_addr_allows_addr \ fascist_firewall_allows_address_ap reachable_addr_allows_ap \ fascist_firewall_allows_base reachable_addr_allows_base \ fascist_firewall_allows_ri_impl reachable_addr_allows_ri_impl \ fascist_firewall_allows_rs_impl reachable_addr_allows_rs_impl \ fascist_firewall_allows_rs reachable_addr_allows_rs \ fascist_firewall_allows_md_impl reachable_addr_allows_md_impl \ fascist_firewall_allows_node reachable_addr_allows_node \ fascist_firewall_allows_dir_server reachable_addr_allows_dir_server \ fascist_firewall_choose_address_impl reachable_addr_choose_impl \ fascist_firewall_choose_address reachable_addr_choose \ fascist_firewall_choose_address_base reachable_addr_choose_base \ fascist_firewall_choose_address_rs reachable_addr_choose_from_rs \ fascist_firewall_choose_address_ls reachable_addr_choose_from_ls \ fascist_firewall_choose_address_node reachable_addr_choose_from_node \ fascist_firewall_choose_address_dir_server reachable_addr_choose_from_dir_server