summaryrefslogtreecommitdiff
path: root/src/feature/hs
AgeCommit message (Collapse)Author
2021-06-28If TestingTorNetwork, skip perm check on the hs directorySteven Engler
2021-06-10Merge branch 'maint-0.4.6'Nick Mathewson
2021-06-10Merge branch 'maint-0.4.5' into maint-0.4.6Nick Mathewson
2021-06-10Merge branch 'maint-0.4.4' into maint-0.4.5Nick Mathewson
2021-06-10Merge branch 'maint-0.3.5' into maint-0.4.4Nick Mathewson
2021-06-10Fix TROVE-2021-006: Out-of-bounds read on v3 desc parsingGeorge Kadianakis
2021-05-12metrics: Move helper function to lib/metricsDavid Goulet
It is a common function that a lot of subsystem can use which is to format a label so move it out of the HS subsystem into the more generic metrics library. Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-05-04hs: Fix ADD_ONION with client authorizationDavid Goulet
Turns out that passing client authorization keys to ADD_ONION for v3 was not working because we were not setting the "is_client_auth_enabled" flag to true once the clients were configured. This lead to the descriptor being encoded without the clients. This patch removes that flag and instead adds an inline function that can be used to check if a given service has client authorization enabled. This will be much less error prone of needing to keep in sync the client list and a flag instead. Fixes #40378 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-04-23Merge branch 'maint-0.4.5' into maint-0.4.6George Kadianakis
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