aboutsummaryrefslogtreecommitdiff
path: root/src/feature/hs
AgeCommit message (Collapse)Author
2022-03-10Merge branch 'maint-0.4.5' into maint-0.4.6David Goulet
2022-03-10hs: Schedule mainloop event on dirinfo changeDavid Goulet
Due to a possible Guard subsystem recursion, when the HS client gets notified that the directory information has changed, it must run it in a seperate mainloop event to avoid such issue. See the ticket for more information on the recursion. This also fixes a fatal assert. Fixes #40579 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-03-09Merge branch 'maint-0.4.5' into maint-0.4.6David Goulet
2022-03-08hs: Fix multiple port label on single metricDavid Goulet
Prometheus needs unique labels and so this bug was causing an onion service with multiple ports to have multiple "port=" label for the metrics requiring a port label. Fixes #40581 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-02-03Merge branch 'maint-0.4.5' into maint-0.4.6David Goulet
2022-02-03hs: Double quote the metrics label valueDavid Goulet
Fixes #40552 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-19hs: Improve warning for bad service versionDavid Goulet
Now that we don't have version 2, it gives us: [warn] HiddenServiceVersion must be between 3 and 3, not 2. This commit changes it to: [warn] HiddenServiceVersion must be 3, not 2. Part of #40476 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-19Merge branch 'ticket40476_045_01' into ticket40476_046_01David Goulet
2021-10-19hs: Improve warning for bad service versionDavid Goulet
Now that we don't have version 2, it gives us: [warn] HiddenServiceVersion must be between 3 and 3, not 2. This commit changes it to: [warn] HiddenServiceVersion must be 3, not 2. Part of #40476 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-19hs-v2: Disable version 2 introduction pointDavid Goulet
Upon receiving a v2 introduction request, the relay will close the circuit and send back a tor protocol error. Part of #40476 Signed-off-by: David Goulet <dgoulet@torproject.org>
2021-10-19hs-v2: Disable version 2 serviceDavid Goulet
The minimum service version is raised from 2 to 3 which effectively disable loading or creating an onion service v2. As for ADD_ONION, for version 2, a 551 error is returned: "551 Failed to add Onion Service" Part of #40476 Signed-off-by: David Goulet <dgoulet@torproject.org>
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-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