summaryrefslogtreecommitdiff
path: root/crates/tor-netdir
Commit message (Collapse)AuthorAgeFilesLines
...
* netdir: Add Relay::is_flagged_{fast,stable} methods.Nick Mathewson2024-02-122-0/+15
|
* Merge branch 'delete-semvers' into 'main'Ian Jackson2024-02-051-6/+0
|\ | | | | | | | | Remove all semver.md files to start a fresh release round See merge request tpo/core/arti!1957
| * Remove all semver.md files to start a fresh release roundIan Jackson2024-02-051-6/+0
| |
* | Bump minor versionsIan Jackson2024-02-051-8/+8
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bump the minor version of these crates, and update the in-tree dependencies. Recently published as fresh crates, let's just assume there are breaking changes: fslock-guard test-temp-dir Breaking API change affecting many many downstream crates: tor-rtcompat Downstream crates which we're (conservatively) assuming have tor-rtcompat types in their APIs: tor-rtmock tor-log-ratelim tor-rpcbase tor-llcrypto tor-protover tor-bytes tor-hscrypto tor-hspow tor-socksproto tor-checkable tor-cert tor-linkspec tor-cell tor-proto tor-netdoc tor-consdiff tor-netdir tor-congestion tor-persist tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy arti-client arti-rpcserver arti-config arti-hyper arti-bench arti-testing
* Merge branch 'ipt_parameters' into 'main'Nick Mathewson2024-01-312-4/+5
|\ | | | | | | | | | | | | Clean up, tune, and correct various parameters related to introduction points. Closes #1210 See merge request tpo/core/arti!1924
| * Rename parameters for intro-point lifetime to match the spec.Nick Mathewson2024-01-311-4/+4
| | | | | | | | | | | | | | | | | | | | (Also, correct the comments that describe them.) We may as well match the spec names when they aren't completely bogus. We are already renaming these parameters for this release, so it isn't an additional breaking change.
| * Rename our aliases for hs_intro_*_lifetime.Nick Mathewson2024-01-252-2/+3
| | | | | | | | | | | | The old names were somewhat inaccurate. (I would have considered keeping and deprecating the old names, but we already have breaking changes in tor-netdir.)
* | Upgrade to strum 0.26Nick Mathewson2024-01-301-1/+1
|/
* tor-netdir: Add a unit test for HsDirParams::offset_within_srv_period.Gabriela Moldovan2024-01-241-0/+37
|
* tor-hsservice: Make offset_within_srv_period() work with timestamps from ↵Gabriela Moldovan2024-01-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | newer periods. This fixes a bug where `offset_within_srv_period()` returns `None`, instead of the offset of `when` from the start of the SRV of the previous time period: ``` 2024-01-24T15:24:46Z ERROR tor_hsservice::svc::publish::reactor: descriptor upload failed for HS service allium-cepa2 and time period TimePeriod { interval_num: 19745, length: IntegerMinutes { value: 1440 }, epoch_offset_in_sec: 43200 }: error: Programming error: internal error (bug) at /../arti/crates/tor-hsservice/src/svc/publish/reactor.rs:218:13: current wallclock time not within SRV range?! (now=SystemTime { tv_sec: 1706109886, tv_nsec: 246572852 }, SRV_start=SystemTime { tv_sec: 1705968000, tv_nsec: 0 }) ``` We need to be able to calculate this offset even if `now` is not within the SRV range (because we upload the descriptor to the HsDirs of the *previous* time period too). Note a similar bug exited in `offset_within_period()` (which no longer exists) too! That one was fixed in !1744: ``` Hidden services can have multiple "active" time periods for which they generate descriptors. We need to be able to compute the offset of a timestamp from the start of a given time period, even if that timestamp falls within the "next" time period (for example, when publishing descriptors for the "previous" time period, the `when` timestamp will fall outside the `(start, end)` range of the "previous" time period). ```
* tor-netdir: Make hs_dirs_{upload, download} take separate args instead of tuple.Gabriela Moldovan2024-01-242-2/+6
| | | | Prompted by https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1904#note_2987777
* tor-netdir, tor-hscrypto: Add function for computing SRV period offset.Gabriela Moldovan2024-01-243-4/+24
| | | | Part of #1166
* tor-netdir: Simplify `hs_dirs_upload` by only returning the `Relay`.Gabriela Moldovan2024-01-242-21/+16
| | | | | | | | The publisher is the only user of `hs_dirs_upload`. It turns out it never actually uses the first element of the yielded `Item`s, so we can simplify `hs_dir_upload` to only return the HsDir `Relay`s. Part of #1166
* tor-netdir: Make hs_all_time_periods return HsDirParams.Gabriela Moldovan2024-01-242-3/+4
| | | | | | | | | The descriptor publisher uses this function to obtain the list of relevant time periods. It will soon also need to know the `srv_lifespan` associated with each time period, so we change this function to return `HsDirParams`. Part of #1166
* Mark lower-level hs-service features non-experimentalNick Mathewson2024-01-231-2/+3
|
* netdir: Make hs_dirs_upload() yield &HsDirParams.Nick Mathewson2024-01-232-2/+4
| | | | Closes #1254.
* Expose HsDirParams, and give it accessors.Nick Mathewson2024-01-232-2/+24
|
* hsservice: Make HsDirParams include the SRV lifespan.Nick Mathewson2024-01-232-11/+16
| | | | This is part of #1254.
* netdir: Only choose Stable relays as introduction points.Nick Mathewson2024-01-161-3/+1
| | | | | | This implements Relay::is_hs_intro_point. Close #1240.
* netdir: flag every testnet relay as Fast and StableNick Mathewson2024-01-161-1/+5
| | | | | As we enforce these flags in more places, it will be handy for our default network to have them for its relays.
* netdir: Downgrade a TODO in a deprecated, unused function.Nick Mathewson2024-01-141-1/+5
|
* netdir: Make TODOs on is_hs_intro_point refer to #1240Nick Mathewson2024-01-141-3/+3
|
* netdir: Downgrade or remove several "TODO HSS" comments.Nick Mathewson2024-01-141-7/+5
| | | | These are not release-blockers.
* netdir: Explain why there is no HsRend WeightRule.Nick Mathewson2024-01-141-1/+5
|
* Followup patchlevel bumpsNick Mathewson2024-01-091-1/+1
|
* Followup minor version bumps.Nick Mathewson2024-01-091-1/+1
| | | | | | | | These crates had no changes previously, but they depend on crates that had breaking changes themselves. tor-linkspec tor-hspow
* Patchlevel version bumps in preparation for 1.1.12.Nick Mathewson2024-01-091-1/+1
| | | | | | | | | | | | | This crate doesn't have a meaningful public API, so it just gets a patchlevel bump: arti These crates had nonbreaking changes, and get a patchlevel bump: tor-rtcompat fs-mistrust tor-llcrypto tor-cert
* Breaking version bumps in preparation for 1.1.12.Nick Mathewson2024-01-091-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These crates have breaking changes on their own: tor-error tor-netdoc tor-dirmgr tor-keymgr Because of the breaking change in tor-error, and the fact that basically every crate publicly depends on tor-error (by implementing ErrorKind), we need to call this a breaking change on all of the following: tor-config tor-geoip tor-rtmock tor-log-ratelim tor-rpcbase tor-bytes tor-hscrypto tor-socksproto tor-cell tor-proto tor-netdoc tor-netdir tor-persist tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy arti-client arti-rpcserver arti-config arti-hyper arti-testing
* clippy: Add an allow to work around a clippy bugIan Jackson2024-01-021-0/+3
| | | | | | | | | | clippy in current stable thinks |(a, b)| (a, b) is always the identity function, but due to match ergonomics, it might be an implicit copy. This is fixed in nightly by https://github.com/rust-lang/rust-clippy/pull/11792
* Two more patchlevel bumpsNick Mathewson2023-12-041-1/+1
| | | | | | | | | These crates both depend on tor-error. Since tor-error got a patchlevel bump, they now depend on the new version, which means by our rules that _they_ get a patchlevel bump themselves. tor-geoip tor-rpcbase
* Bump minor versions in preparation for releaseNick Mathewson2023-12-041-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This crate is new, and gets a bump to 0.1.0. tor-log-ratelim This crate had a breaking change: tor-persist tor-llcrypto had a breaking change. These crates _are_ tor-llcrypto, or (transitively) depend on it. I am assuming that they all re-expose something from it in a way that matters: tor-llcrypto tor-bytes tor-hscrypto tor-socksproto tor-checkable tor-cert tor-linkspec tor-cell tor-proto tor-netdoc tor-consdiff tor-netdir tor-chanmgr tor-ptmgr tor-guardmgr tor-circmgr tor-dirclient tor-dirmgr tor-keymgr tor-hsclient tor-hsservice tor-hsrproxy arti-client arti-rpcserver arti-hyper
* Bump patchlevel versions in preparation for releaseNick Mathewson2023-12-041-2/+2
| | | | | | | | | | | | | | | These crates had backward-compatible changes, and get a patchlevel bump only: fs-mistrust tor-error tor-config tor-rtcompat tor-rtmock This crate exposes no non-CLI APIs, and gets a patchlevel bump only: arti
* In every crate, change rust-version to 1.70.Nick Mathewson2023-11-281-1/+1
|
* Improve documentation in/around DosParams extensionNick Mathewson2023-11-201-6/+13
| | | | | | It does not help that C tor has a set of parameters and a set of configuration options with exactly the same names which configure the same thing in two slightly different ways.
* Upgrade to itertools 0.12.0Nick Mathewson2023-11-151-1/+1
|
* Patch version bumps in crates without breaking changesNick Mathewson2023-10-311-5/+5
| | | | | | | | | | | | | | | | | | ``` These crates have new APIs: tor-async-utils ADDED tor-config ADDED tor-hscrypto ADDED tor-netdoc ADDED, plus BREAKING-experimental. These crates have patch-level changes only: tor-netdir (bugfix only). (re-exposes netdoc) arti-rpcserver (tweaks only, uses nothing that broke.) arti 1.1.10, no stable public APIs. ```
* Minor version bumps in crates with breaking changes.Nick Mathewson2023-10-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | ``` tor-basic-utils BREAKING tor-rtmock BREAKING. tor-cert BREAKING tor-cell BREAKING tor-proto BREAKING: re-exposes cell. (Also BREAKING-experimental) tor-chanmgr BREAKING: Re-exposes proto. tor-ptmgr BREAKING: re-exposes tor-chanmgr tor-guardmgr BREAKING: re-exposes proto. (Only for ClockSkew I think?) tor-circmgr BREAKING: re-exposes proto tor-dirclient BREAKING tor-hsclient BREAKING, re-exposes proto. tor-hsservice BREAKING, re-exposes proto. tor-hsrproxy BREAKING arti-client BREAKING: re-exposes proto. arti-hyper: BREAKING, re-exposes arti-client. tor-dirmgr Let's assume BREAKING, very high-level. tor-keymgr BREAKING, but experimental. ```
* tor-hsservice: Rewrite map() as a for-loop (fmt).Gabriela Moldovan2023-10-031-1/+2
|
* tor-netdir: Fix broken condition.Gabriela Moldovan2023-10-031-4/+5
| | | | | | | | | | | | | The statement ``` if hsids.all(|(_hsid, period)| rings.any(|(_, _, tp)| tp == period)) { ``` had 2 bugs: * the condition is reversed (it should be negated: we need to bail if one of the specified `hsids` cannot be found on any of our rings) * `rings.any()` mutates the `rings` iterator, causing `hs_dirs_upload` to return fewer HSDirs than expected
* Patchlevel bumps to crates whose dependencies just changed.Nick Mathewson2023-10-021-1/+1
| | | | (The only change in these crates is that their dependencies changed.)
* Minor-version bumps, for crates with breaking changes.Nick Mathewson2023-10-021-2/+2
|
* Patchlevel bumps, with dependents affected.Nick Mathewson2023-10-021-3/+3
|
* Trivial version bumps: patchlevel only.Nick Mathewson2023-10-021-1/+1
| | | | | These crates have had changes that do not require their dependents to require a later version.
* arti-client: add exit selection with GeoIP country codeseta2023-09-181-0/+2
| | | | | | | | | | | | | | | | | | | | This threads the country codes work through the rest of the codebase: - `tor-dirmgr` will now enable GeoIP with the embedded database when the `geoip` future is enabled - This can be extended later using the `DirMgrConfig` to allow specifying a custom database; this is not done here, though - `tor-circmgr`'s `SupportedCircUsage` and `TargetCircUsage` fields gain new `country_code` members to allow filtering circuits by country - These are `()` in builds where the `geoip` feature is not enabled -- doing it this way means we don't have to copy and paste huge swathes of code, since we can't use `#[cfg]` in patterns - `ExitPathBuilder` gains (hacked-in) support for choosing a relay with the correct country code - Due to the lack of conjuction, we just copy and paste a small bit, pending further refactoring - `StreamPrefs` now lets you specify a country code, letting embedders make use of the feature
* Remove semver.md now that 1.1.8 is out.Nick Mathewson2023-09-051-2/+0
|
* Update patchlevel for crates with nontrivial changes.Nick Mathewson2023-09-051-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These are: ``` hashx equix tor-async-utils tor-error tor-config tor-rtmock tor-llcrypto tor-bytes tor-hscrypto tor-hspow tor-cert tor-linkspec tor-cell tor-proto tor-netdoc tor-netdir tor-chanmgr tor-guardmgr tor-dirmgr tor-keymgr tor-hsclient tor-hsservice arti-client arti ```
* Upgrade to visibility 0.1.0Nick Mathewson2023-09-051-1/+1
|
* hs: Intro point selection: TODO re checking the stable flag (fmt)Ian Jackson2023-08-291-1/+1
| | | | Apply erroneous formatting as demanded by rustfmt.
* hs: Intro point selection: TODO re checking the stable flagIan Jackson2023-08-291-0/+1
|
* hs: Intro point selection: Actually call is_hs_intro_point()Ian Jackson2023-08-291-2/+6
| | | | | | | | Call site as per https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1550#note_2936401 Plus a TODO comment with an opinion from me about this API. (Note not a TODO HSS so this is on the back burner.)