summaryrefslogtreecommitdiff
path: root/src/feature/hs
AgeCommit message (Collapse)Author
2023-02-16metrics: Add metrics for rendezvous and introduction request failures.Gabriela Moldovan
This introduces a couple of new service side metrics: * `hs_intro_rejected_intro_req_count`, which counts the number of introduction requests rejected by the hidden service * `hs_rdv_error_count`, which counts the number of rendezvous errors as seen by the hidden service (this number includes the number of circuit establishment failures, failed retries, end-to-end circuit setup failures) Closes #40755. This partially addresses #40717. Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-02-13Merge branch 'maint-0.4.7'David Goulet
2023-02-10metrics: Decrement hs_intro_established_count on intro circuit close.Gabriela Moldovan
Closes #40751. Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-02-10Update `find_service` documentation.Gabriela Moldovan
This updates the docs to stop suggesting `pk` can be NULL, as that doesn't seem to be the case anymore (`tor_assert(pk)`). Signed-off-by: Gabriela Moldovan <gabi@torproject.org>
2023-01-19Add more test-vectors for key blinding.Nick Mathewson
These are verified-as-correct against the current C implementation; adding them here gives us something to copy into Arti.
2022-11-01Merge branch 'tor-gitlab/mr/594'David Goulet
2022-10-26Merge remote-tracking branch 'tor-gitlab/mr/638'David Goulet
2022-10-26hs: Retry service rendezvous on circuit closeDavid Goulet
Move the retry from circuit_expire_building() to when the offending circuit is being closed. Fixes #40695 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-26circ: Get rid of hs_circ_has_timed_outDavid Goulet
Logic is too convoluted and we can't efficiently apply a specific timeout depending on the purpose. Remove it and instead rely on the right circuit cutoff instead of keeping this flagged circuit open forever. Part of #40694 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-26Merge branch 'tor-gitlab/mr/637'David Goulet
2022-10-26hs: Retry rdv circuit if repurposedDavid Goulet
This can happen if our measurement subsystem decides to snatch it. Fixes #40696 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-26hs: Change the error for a collapsing client circuitDavid Goulet
Change it to an "unreachable" error so the intro point can be retried and not flagged as a failure and never retried again. Closes #40692 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-24hs: Retry rdv circuit if repurposedDavid Goulet
This can happen if our measurement subsystem decides to snatch it. Fixes #40696 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-19hs: Retry service rendezvous on circuit closeDavid Goulet
Move the retry from circuit_expire_building() to when the offending circuit is being closed. Fixes #40695 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-19circ: Get rid of hs_circ_has_timed_outDavid Goulet
Logic is too convoluted and we can't efficiently apply a specific timeout depending on the purpose. Remove it and instead rely on the right circuit cutoff instead of keeping this flagged circuit open forever. Part of #40694 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-10-19hs: Change the error for a collapsing client circuitDavid Goulet
Change it to an "unreachable" error so the intro point can be retried and not flagged as a failure and never retried again. Closes #40692 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-06-30fix typo in commentRoger Dingledine
2022-06-29typo fix in commentRoger Dingledine
2022-06-23Remove unused RendPostPeriod optionNeel Chauhan
2022-03-16hs: Helper function to setup congestion controlDavid Goulet
We had 3 callsites setting up the circuit congestion control and so this commit consolidates all 3 calls into 1 function. Related to #40586 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-03-16hs: Transfer ccontrol from circuit to cpathDavid Goulet
Once the cpath is finalized, e2e encryption setup, transfer the ccontrol from the rendezvous circuit to the cpath. This allows the congestion control subsystem to properly function for both upload and download side of onion services. Closes #40586 Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-03-11Merge branch 'tor-gitlab/mr/543'David Goulet
2022-03-10Merge branch 'maint-0.4.6'David Goulet
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-09hs: Don't BUG() when setting up RP congestion controlDavid Goulet
It is possible to not have the descriptor anymore by the time the rendezvous circuit opens. Don't BUG() on that. Instead, when sending the INTRODUCE1 cell, make sure the descriptor we have (or have just fetched) matches what we setup in the rendezvous circuit. If not, the circuit is closed and another one is opened for a retry. Fixes #40576 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-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-23Reject intro2 cells that request unadvertized congestion control.Mike Perry
2022-02-23Properly initialize the cc_enabled field in hs intro data.Mike Perry
2022-02-22Use path type hint for Vegas queue parameters.Mike Perry
These parameters will vary depending on path length, especially for onions.
2022-02-22hs: Setup congestion control on service rends using intro dataDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-02-22hs: Decode and cache the INTRODUCE cell congestion control extensionDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-02-22hs: Build INTRODUCE extension in the encrypted sectionDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-02-22hs: Setup congestion control on client rendsDavid Goulet
Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-02-22hs: Republish onion descriptor on sendme_inc changeDavid Goulet
Republishing is necessary to ensure that clients connect using the correct sendme_inc upon any change. Additionally, introduction points must be re-chosen, so that cached descriptors with old values are not usable. We do not expect to change sendme_inc, unless cell size or TLS record size changes, so this should be rare. Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-02-22hs: Decode flow-control lineDavid Goulet
This puts the flow control version (unparsed) in the descriptor. The client doesn't use it yet. Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-02-22hs: Encode flow control value in the descriptorDavid Goulet
This simply adds the "flow-control" line, as detailed in prop324, to the descriptor. No decoding is done at this commit. Part of #40506
2022-02-22trunnel: Make hs/cell_common.trunnel genericDavid Goulet
Move it to extension.trunnel instead so that extension ABI construction can be used in other parts of tor than just HS cells. Specifically, we'll use it in the ntorv3 data payload and make a congestion control parameter extension using that binary structure. Only rename. No code behavior changes. Signed-off-by: David Goulet <dgoulet@torproject.org>
2022-02-22Extend info argument updates for non-ntorv3 casesMike Perry
2022-02-22Convert TODO into TODO-324 for better visibility.Nick Mathewson
2022-02-22Use protover to signal support for ntor3 + congestion control.Nick Mathewson
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-19Merge branch 'maint-0.4.6'David 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-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>