summaryrefslogtreecommitdiff
path: root/crates
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge branch 'clap-v3' into 'main'Ian Jackson2022-11-086-142/+160
|\ \ | |/ |/| | | | | | | | | Upgrade to clap 3 Closes #616 See merge request tpo/core/arti!830
| * Upgrade to clap 3: replace deprecated functionsGabriel de Perthuis2022-11-046-121/+146
| | | | | | | | | | | | | | | | | | | | | | Also replace Arg::takes_value with Arg::action to configure flags that don't take parameters vs options that do. This makes it easy to upgrade to clap 4. Tested deprecations with: cargo check --workspace --all-features --features clap/deprecated
| * Upgrade to clap 3 with minimal changesGabriel de Perthuis2022-11-046-28/+21
| | | | | | | | | | | | | | | | This removes the last cargo audit override (for the unmaintained ansi_term). Don't mark options as required when they have default values: see <https://github.com/clap-rs/clap/pull/3793>.
* | Merge branch 'misc-todo-ptclient' into 'main'Ian Jackson2022-11-083-8/+4
|\ \ | | | | | | | | | | | | Downgrade and/or remove a few misc "TODO pt-client" comments See merge request tpo/core/arti!838
| * | circmgr: downgrade TODO pt-client commentsNick Mathewson2022-11-081-3/+3
| | | | | | | | | | | | These are structure-internal things we can solve later, if ever.
| * | ChanMgr: downgrade and remove a few TODO-ptclient commentsNick Mathewson2022-11-082-5/+1
| | | | | | | | | | | | renamings are now #623. Code movement can happen later.
* | | Merge branch 'store' into 'main'Nick Mathewson2022-11-086-43/+468
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Persistently cache bridge descriptors Closes #619 See merge request tpo/core/arti!831
| * | | bridge descs: Rename BridgeDescMgr from BridgeDescManagerIan Jackson2022-11-083-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | 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-082-1/+3
| | | |
| * | | sqlite cache: Document reasoning about timestampsIan Jackson2022-11-081-2/+9
| | | | | | | | | | | | | | | | | | | | As per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/831#note_2851764
| * | | bridge desc tests: Test caching and if-modified-sinceIan Jackson2022-11-041-2/+121
| | | |
| * | | bridge desc tests: Break out queues_are_empty helperIan Jackson2022-11-041-2/+6
| | | |
| * | | bridge desc tests: Provide a sqlite connectionIan Jackson2022-11-041-2/+5
| | | | | | | | | | | | | | | | The current test case doesn't use this.
| * | | bridge desc: Implement storage functions at the DB layerIan Jackson2022-11-041-8/+67
| | | |
| * | | bridge desc: Make Downloaded be DebugIan Jackson2022-11-041-0/+1
| | | |
| * | | bridge desc: Implement cache reuse logic and if-modified-sinceIan Jackson2022-11-044-9/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-043-16/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | bridge desc tests: Apply tracing_test::traced_testIan Jackson2022-11-042-0/+3
| | | | | | | | | | | | | | | | This lets us see the log messages. They look fine, as it happens.
* | | | Merge branch 'todo-ptclient-linkspec-1' into 'main'Ian Jackson2022-11-082-35/+50
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Resolve `TODO pt-client` entries in linkspec See merge request tpo/core/arti!836
| * | | | linkspec: Rename "maybe rename this?" TODOs in favor of #623Nick Mathewson2022-11-072-5/+0
| | | | |
| * | | | PtTargetSettings: Enforce correctness at lower level.Nick Mathewson2022-11-071-19/+49
| | | | | | | | | | | | | | | | | | | | This resolves a number of TODOs.
| * | | | Remove a blank lineNick Mathewson2022-11-071-1/+0
| | | | |
| * | | | Downgrade TODO on chan_methodNick Mathewson2022-11-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | This is not something we need to solve for 1.1.0 (and it might not need to be solved ever).
| * | | | Remove TODO about third ChannelMethod variant.Nick Mathewson2022-11-071-2/+0
| | | | | | | | | | | | | | | | | | | | We didn't find a use for this.
| * | | | Remove TODO about inlining PtTargetSettings.Nick Mathewson2022-11-071-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Since there are (or soon will be) parsing restrictions on this type, we don't want to inline it as a simple Vec.
* | | | | Merge branch 'store-yak-misc' into 'main'eta2022-11-084-11/+39
|\ \ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | Small misc yaks for bridge descriptor persistence See merge request tpo/core/arti!828
| * | | | tor-dirmgr: impl AsRef<dyn Error> for ErrorIan Jackson2022-11-041-0/+7
| | | | | | | | | | | | | | | | | | | | This allows use with tor_error::Report.
| * | | | tor-netdoc: RouterDesc: Add published accessorIan Jackson2022-11-041-0/+5
| | | | | | | | | | | | | | | | | | | | The bridge descriptor manager is going to want this.
| * | | | dirmgr: Make store be in an ArcIan Jackson2022-11-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | This will let us share it with the bridge descriptor manager. (As discussed with Nick.)
| * | | | dirmgr sqlite store: Improve schema updatesIan Jackson2022-11-041-9/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Centralise applying the schema updates, in a closure * Make the schema update SQL texts be in an array so we can loop * Make the version update statement generic, not cloned-and-hacked This will make it possible to add another schema version without error-prone conditions etc.
* | | | | Merge branch 'guards_as_bridges_part4' into 'main'Nick Mathewson2022-11-0817-233/+584
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | GuardMgr: Almost finish wiring Bridges in as a guard substitute See merge request tpo/core/arti!832
| * | | | Try to explain exactly what lookup_bridge_circ_target doesNick Mathewson2022-11-081-0/+11
| | | | |
| * | | | GuardMgr: Try to explain what is going on with update()Nick Mathewson2022-11-081-10/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This explanation is slightly complicated by the fact that I think that one of the calls to update_guardset_internal() is possibly unnecessary, and that one of the calls that it makes is potentially ill-advised. I'm not going to make those changes right now, however, because they are potentially a little destabilizing.
| * | | | Refactor configured_bridgesNick Mathewson2022-11-081-30/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now it is an Option, and is set to None if bridges aren't enabled. This simplifies `replace_bridge_config` a bit, and forces us to check for `None` in a few more places.
| * | | | GuardMgr: Document that providers should only be installed once.Nick Mathewson2022-11-081-0/+14
| | | | | | | | | | | | | | | | | | | | Enforce this with assert!() and a documented panics section.
| * | | | GuardMgr: Fix build with bridge-client disabled.Nick Mathewson2022-11-082-1/+4
| | | | |
| * | | | GuardMgr: Remove no-longer-relevant `TODO pt-client` commentsNick Mathewson2022-11-084-21/+0
| | | | | | | | | | | | | | | | | | | | | | | | | Also remove a bunch of now-unnecessary `allow(dead_code)` annotations.
| * | | | GuardMgr: Rename an error variantNick Mathewson2022-11-082-3/+3
| | | | |
| * | | | GuardMgr: Spelling fixes and normalizations.Nick Mathewson2022-11-084-7/+8
| | | | |
| * | | | GuardMgr: do not use fallbacks when in bridge mode.Nick Mathewson2022-11-081-5/+5
| | | | |
| * | | | GuardMgr: When possible, return a FirstHop that can be a CircTargetNick Mathewson2022-11-083-5/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do this by checking the FirstHops we're about to return, and when they correspond to bridges, looking up an appropriate BridgeRelay in the current BridgeSet (if we can).
| * | | | GuardMgr: Refactor UniverseRef to contains Arcs.Nick Mathewson2022-11-083-27/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We already _have_ these Arc<>s whenever we construct a UniverseRef, so there's no real point in using &refs and making these so hard to construct.
| * | | | GuardMgr: Remove an outdated "Limitations" comment.Nick Mathewson2022-11-081-10/+0
| | | | | | | | | | | | | | | | | | | | Found while grepping for NetDir.
| * | | | GuardMgr: do not block netdir if we are using bridgesNick Mathewson2022-11-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `GuardMgr` code has functionality to tell the DirMgr "Hey, don't switch to the new NetDir yet: we still need more guard information!" But we never want to do that if we're selecting bridges, since they don't come from the NetDir.
| * | | | GuardMgr: Add UniverseType to make code more explicit.Nick Mathewson2022-11-081-7/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of duplicating the logic about which guard sample uses which universe, we explicitly ask it, and then use that universe. This will avoid trouble if/when we introduce more samples.
| * | | | GuardMgr: Launch a background task to keep the list of bridgeNick Mathewson2022-11-082-1/+38
| | | | | | | | | | | | | | | | | | | | descriptors updated as appropriate.
| * | | | GuardMgr: Exit keep-netdir-updated task early if GuardMgr disappears.Nick Mathewson2022-11-081-0/+2
| | | | |
| * | | | GuardMgr: Pass correct universe to "Bridges" `GuardSet`.Nick Mathewson2022-11-084-15/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can probably be done in a simpler way, but for the moment I would prefer to try to minimize the amount of code I'm changing here.