summaryrefslogtreecommitdiff
path: root/crates/tor-dirmgr/src/bridgedesc.rs
Commit message (Collapse)AuthorAgeFilesLines
* Drop two use's that seem no longer to be necessaryIan Jackson2025-11-061-1/+1
|
* all: replace all uses of `futures::task::SpawnExt` with `tor_rtcompat::SpawnExt`Steven Engler2025-11-041-2/+2
|
* Switch Cargo.toml files to edition 2024.Nick Mathewson2025-08-071-3/+3
| | | | | | | | | | | | | | First, run ``` git grep -l "^edition =" | xargs perl -i -pe 's/^edition *=.*/edition = "2024"/;' ``` Second, manually verify that all Cargo.toml files have changed, and nothing else has changed. Third, run cargo fmt again.
* dirmgr: Rename circuit to tunnelDavid Goulet2025-08-051-3/+3
| | | | Signed-off-by: David Goulet <[email protected]>
* squash! Upgrade rand dependency to 0.9.Nick Mathewson2025-03-181-1/+1
| | | | - `rand::thread_rng()` has been deprecated and renamed to `rand::rng()`
* TimerangeBound: Stop using std::ops::Bound.Wesley Aptekar-Cassels2024-11-251-3/+2
| | | | Fixes: #1691
* Fix typos in doc commentsTobias Stoeckmann2024-03-061-1/+1
|
* clippy nightly: For now, locally allow blocks_in_conditionsIan Jackson2024-01-021-0/+1
| | | | | | Filed https://gitlab.torproject.org/tpo/core/arti/-/issues/1176 proposing a final fix.
* tor-dirclient: Rename download() to send_request() (fmt).Gabriela Moldovan2023-08-161-1/+5
|
* tor-dirclient: Rename download() to send_request().Gabriela Moldovan2023-08-161-2/+2
| | | | | | `download()` is actually a general-purpose function for sending HTTP requests on a stream. We will soon repurpose it for `POST`-ing descriptors, so let's rename it to `send_request`.
* Throughout: Use *_report!() macros for reporting Errors.Nick Mathewson2023-07-071-9/+6
| | | | | | | | | | | | | | | I identified the cases to replace by searching for the string `.report()`. There are a few that I didn't change: * A couple of cases that used anyhow::Error, * One case that reported two Errors. * Two cases in `tor_hsclient::err` that just did `error!("Bug: {}")`. I have also not audited the cases in `tor-hsclient` where we're using `tor_error::Report` manually. Nonetheless, closes #949.
* s/BridgeDescManager/BridgeDescMgr/g in codebaseNeel Chauhan2023-04-121-2/+2
|
* Use ErrorReport's .report() for two errors in error! in bridgedesc.rsIan Jackson2023-01-301-3/+3
| | | | No functional change, just using the new idiom.
* "Fix" remaining unchecked-subtraction warnings.Nick Mathewson2023-01-271-1/+3
| | | | | In both cases I think it's fine to panic; but it's best to do so explicitly.
* dirmgr: Spelling fixes and normali[sz]ationsNick Mathewson2022-12-061-11/+11
|
* bridge desc mgr: Add dormancy comment to effective_parallelismIan Jackson2022-11-231-0/+2
| | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/861#note_2856922
* bridge desc mgr: Honour specified dormancyIan Jackson2022-11-231-6/+13
| | | | Fixes #630
* bridge desc mgr: Introduce effective_parallelism helperIan Jackson2022-11-231-5/+12
|
* bridge desc mgr: Move set_dormancy to impl that is for mock tooIan Jackson2022-11-231-6/+6
|
* BridgeConfig: Replace all Arc<BridgeConfig> with BridgeConfigIan Jackson2022-11-221-3/+3
| | | | BridgeConfig is itself an Arc now, so these are redundant.
* dirmgr Store: Introduce DirMgrStore and use for BridgeDescMgr (fmt)Ian Jackson2022-11-141-8/+1
| | | | rustfmt only, broken out to ease review.
* dirmgr Store: Introduce DirMgrStore and use for BridgeDescMgrIan Jackson2022-11-141-6/+8
| | | | We are going to change DirMgr's constructors to also take a DirMgrStore.
* dirmgr Store: Abolish redundant trait implIan Jackson2022-11-141-1/+1
|
* bridge descriptor dormancy: Accept the dormancy valueIan Jackson2022-11-111-1/+10
| | | | But right now, don't do anything with it. That will come in a future MR.
* bridge descriptor dormancy: Add a TODO for this enumIan Jackson2022-11-111-0/+2
|
* bridge descriptor dormancy: Define an enum and semanticsIan Jackson2022-11-101-0/+39
| | | | This is part of #630.
* Merge branch 'bridge-error' into 'main'Nick Mathewson2022-11-101-3/+2
|\ | | | | | | | | Use ErrorKind::TorAccessFailed for misbehaving bridges See merge request tpo/core/arti!842
| * Use ErrorKind::TorAccessFailed for misbehaving bridgesIan Jackson2022-11-081-3/+2
| | | | | | | | (Use semantic linefeed for the doc comment.)
* | Merge branch 'bdm-process-doc-test' into 'main'Nick Mathewson2022-11-101-2/+0
|\ \ | | | | | | | | | | | | bridge descs: Add tests for process_document See merge request tpo/core/arti!841
| * | bridge descs: Add tests for process_documentIan Jackson2022-11-081-2/+0
| |/
* | Merge branch 'bdm-params' into 'main'Nick Mathewson2022-11-101-1/+0
|\ \ | | | | | | | | | | | | Remove TODO re BridgeDescDownloadConfig defaults See merge request tpo/core/arti!839
| * | Remove TODO re BridgeDescDownloadConfig defaultsIan Jackson2022-11-081-1/+0
| |/
* / bridge desc: todo re config: weaken and reference a new ticketIan Jackson2022-11-081-3/+2
|/
* Merge branch 'store' into 'main'Nick Mathewson2022-11-081-29/+172
|\ | | | | | | | | | | | | Persistently cache bridge descriptors Closes #619 See merge request tpo/core/arti!831
| * bridge descs: Rename BridgeDescMgr from BridgeDescManagerIan Jackson2022-11-081-13/+13
| | | | | | | | | | | | This is more consistent with our naming elsewhere. Suggested-by: Nick Mathewson <[email protected]>
| * bridge descs: Apply sensitive() to bridge identity in error log msgIan Jackson2022-11-081-1/+2
| |
| * bridge desc: Make Downloaded be DebugIan Jackson2022-11-041-0/+1
| |
| * bridge desc: Implement cache reuse logic and if-modified-sinceIan Jackson2022-11-041-9/+115
| | | | | | | | | | | | | | | | | | | | | | | | This introduces the new API functions to Store. But currently they are all no-ops. So all this machinery doesn't actually do anything. Also, it changes the API to the mockable downloader, to allow it to support if-modified-since. So this isn't used either. But it is more convenient to do this all at once in BridgeDescManager, since care needs to be taken about the intraction between if-modified-since and the persistent cache.
| * bridge desc: Rename one more variable to textIan Jackson2022-11-041-1/+1
| |
| * bridge desc: Catch panics in the download functionalityIan Jackson2022-11-041-1/+8
| |
| * bridge desc: Provide a Store to the bridge desc managerIan Jackson2022-11-041-9/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We use the one in the dirmgr. That means that our constructor now has to take a dirmgr. And, the dirmgr must have a circmgr. This is all rather odd, TBH. Add .. to the binding of the return values from setup, as future-proofing. The tests now need to provide a Store too. Make the sqlite::new_empty function pub(crate) so we can use it. We must retain the _db_tmp_dir, since when it goes away the tmp directory is deleted and the db goes readonly.
* | Fix typosDimitris Apostolou2022-11-061-1/+1
|/
* bridgedesc: Rename "text" from "output"Ian Jackson2022-11-031-5/+5
| | | | | | This was confusing, because it's the output of the donwload, but nowhere near the output of the whole process. And it's going to become even less so.
* bridgedesc: Make process_document into a free functionIan Jackson2022-11-031-53/+67
| | | | It deserves this treatment, I think.
* bridgedesc: Introduce DownloadedIan Jackson2022-11-031-13/+17
| | | | | This gives names to things and makes things clearer, and this will be even more true in a moemnt.
* bridgedesc: download: Break out process_documentIan Jackson2022-11-031-47/+54
| | | | We're going to want to reuse this for handling cached stuff.
* bridgedesc: Prepare Mockable trait for if-modified-sinceIan Jackson2022-11-031-4/+12
|
* bridge descriptors: logging: Log addition and removal (fmt)Ian Jackson2022-11-031-12/+20
| | | | Worsify formatting as demanded by rustfmt.
* bridge descriptors: logging: Log addition and removalIan Jackson2022-11-031-8/+31
| | | | | This involves breaking the calls to `new_bridges.remove` into a helper that does the logging.
* bridge descriptors: logging: Log download start and outcomeIan Jackson2022-11-031-0/+6
|