Commit Graph

8112 Commits

Author SHA1 Message Date
Nick Mathewson 2ad87bfc0c Merge branch 'retry_rend' into 'main'
hss: Retry rendezvous circuit attempts.

Closes #1013

See merge request tpo/core/arti!1547
2023-08-24 19:41:39 +00:00
Nick Mathewson 386d422a1b hss: Retry rendezvous circuit attempts.
Closes #1013.
2023-08-24 15:10:02 -04:00
Nick Mathewson f2d6d7976d linkspec: Derive Clone and Copy for VerbatimLinkSpecCircTarget. 2023-08-24 15:07:03 -04:00
Ian Jackson 6316cf6fe9 Merge branch 'pt-proxy' into 'main'
Add initial support for running a PT in server mode

See merge request tpo/core/arti!1504
2023-08-24 17:03:38 +00:00
Saksham Mittal bbed17ba4a Add initial support for running a PT in server mode 2023-08-24 17:03:38 +00:00
Nick Mathewson 660adb6dc6 Merge branch 'ssh-key-todo' into 'main'
tor-keymgr: Bump ssh-key to 0.6.1 and remove unnecessary dependency.

See merge request tpo/core/arti!1546
2023-08-24 12:23:02 +00:00
Gabriela Moldovan ddacfef45c
tor-keymgr: Bump ssh-key to 0.6.1 and remove unnecessary dependency.
Now that [ssh-key 0.6.1] is out, we no longer need the explicit sec1
dependency in tor-keymgr.

[ssh-key 0.6.1]: https://github.com/RustCrypto/SSH/pull/155
2023-08-24 11:29:49 +01:00
gabi-250 0d513656d0 Merge branch 'nickname' into 'main'
Sort out HsNickname, and improve ArtiPathComponent

See merge request tpo/core/arti!1544
2023-08-24 10:21:01 +00:00
gabi-250 f970ab9090 Merge branch 'import' into 'main'
tor-proto: Make some imports more precise

See merge request tpo/core/arti!1543
2023-08-23 14:36:28 +00:00
Ian Jackson 4cc4734ce2 tor-keymgr, tor-hsservice: Run rustfmt to make derives uglier 2023-08-23 15:35:30 +01:00
Ian Jackson 8596d42372 tor-keymgr, tor-hsservice: deser for ArtiPathComponent and HsNickname 2023-08-23 15:35:30 +01:00
Ian Jackson 89c019e04f tor-hsservice: Use real HsNickname in config 2023-08-23 15:35:30 +01:00
Ian Jackson 89fde9d400 tor-hsservice: Use real HsNickname in ipt_mgr 2023-08-23 15:35:30 +01:00
Ian Jackson 8d83a50846 tor-hsservice: Provide a sensible HsNickname 2023-08-23 15:35:30 +01:00
Ian Jackson 9df82bb948 tor-keymgr: Improve ArtiPathComponent a bit
And add a TODO about the error type.
2023-08-23 15:29:46 +01:00
Ian Jackson d5fce95e1e tor-proto: Make some imports more precise
A warning is getting in my way when I run
  cargo clippy -p tor-hsservice --all-features

See also
  https://gitlab.torproject.org/tpo/core/arti/-/issues/1006#note_2932088
2023-08-23 14:59:02 +01:00
Nick Mathewson 36e424f9e5 Merge branch 'fix' into 'main'
Rerun maint/add_warning

See merge request tpo/core/arti!1542
2023-08-23 13:51:13 +00:00
Ian Jackson bcf0100145 Rerun maint/add_warning
Fixes CI.  There was a semantic conflict between !1535 (which added a
suppression) and !1523 (which added a new module).
2023-08-23 14:28:22 +01:00
Ian Jackson 27bdc97141 Merge branch 'clippy' into 'main'
clippy: Suppress needless_pass_by_value in tests

See merge request tpo/core/arti!1535
2023-08-23 13:24:18 +00:00
Ian Jackson af168c8d4c Merge branch 'hss_send_raw' into 'main'
hss: use send_raw_msg in rend_handshake.

See merge request tpo/core/arti!1536
2023-08-23 12:56:43 +00:00
gabi-250 7fe447cf13 Merge branch 'hsdir-apis' into 'main'
tor-netdoc: Remove redundant `IntroPointDesc` struct.

See merge request tpo/core/arti!1528
2023-08-23 12:38:02 +00:00
Nick Mathewson 7de87eac47 Merge branch 'ipt-e' into 'main'
ipt establisher API: pass a struct to new()

See merge request tpo/core/arti!1540
2023-08-23 12:29:26 +00:00
Gabriela Moldovan 978122622e
tor-netdoc: Remove semver.md
Removing the private `IntroPointDesc` isn't really a breaking change,
and neither is changing the type of `HsDescBuilder::intro_points`'s
argument (because nobody would've been able to this function in the
first place as `IntroPointDesc` was never exported from tor-netdoc), so
let's remove the semver.md.
2023-08-23 13:13:11 +01:00
Gabriela Moldovan 884ed48750
tor-netdoc: Fix clippy lints. 2023-08-23 13:13:07 +01:00
Gabriela Moldovan 7df5f4d4a9
tor-netdoc: Remove redundant `IntroPointDesc` struct.
This commit replaces `tor_netdoc::hsdesc::inner::IntroPointDesc` with
the (almost identical) `tor_netdoc::hsdesc::IntroPointDesc`.

The only difference between the two structs is that
`inner::IntroPointDesc` wraps a `Vec<LinkSpec>` instead of a
`Vec<EncodedLinkSpec>`. Since `EncodedLinkSpec` can be derived from
`LinkSpec` (and vice-versa), and since `hsdesc::inner::IntroPointDesc`
never made it in our public API, this commit also removes
`hsdesc::inner::IntroPointDesc` in favour of `hsdesc::IntroPointDesc`.
2023-08-23 13:13:04 +01:00
Ian Jackson 9a0715c6e8 ipt establisher API: pass a struct to new() (fmt)
One of rustfmt's changes here is wrong.  Whatever.
2023-08-23 12:47:42 +01:00
Ian Jackson 0cf3243260 ipt establisher API: pass a struct to new()
Now new() only has a reasonable number of arguments and removes some
repetition in the mocking arrangements in the IPT Manager.

This is the minimum amount that needs to be done in the commit that
touches both the IPT Establisher and the Manager.
2023-08-23 12:47:05 +01:00
Ian Jackson 7d6f5531ce Merge branch 'hashx-bench' into 'main'
hashx_cachegrind: factor out some common stuff in benchmarks

See merge request tpo/core/arti!1529
2023-08-23 10:05:51 +00:00
Ian Jackson 348ff48361 Merge branch 'ipt-m' into 'main'
About half of an IPT Manager

See merge request tpo/core/arti!1523
2023-08-23 09:39:31 +00:00
Ian Jackson c593b861a7 hashx_cachegrind: Fix black_box location 2023-08-23 10:36:33 +01:00
Ian Jackson f123200d0c hashx_cachegrind: Make mk_c_equix not shuffle the HashX 2023-08-23 10:36:33 +01:00
Ian Jackson 22d2ed9c98 hashx_cachegrind: Make mk_rust not shuffle the HashXBuilder 2023-08-23 10:36:33 +01:00
Ian Jackson 1f31ffd563 hashx_cachegrind: Introduce C_HASHX_OK alias 2023-08-23 10:36:33 +01:00
Ian Jackson ad59bfd28d hashx_cachegrind: Introduce bench_loop helper macro
The macro generates similar but not identical code.
There are new bindings.
2023-08-23 10:36:33 +01:00
Ian Jackson 71124ef351 hashx_cachegrind: Introduce u32be helper function
This is going to be more obviously useful in a moment.
2023-08-23 10:36:33 +01:00
Ian Jackson 7e1d0b7f45 hashx_cachegrind: Introduce mk_c_equix helper macro
The macro generates precisely the existing code.
2023-08-23 10:36:33 +01:00
Ian Jackson e7765ce969 hashx_cachegrind: Introduce mk_rust helper macro
The macro generates precisely the existing code.
2023-08-23 10:36:33 +01:00
Ian Jackson 42df88d6bf Run maint/add_warning to add lint block everywhere 2023-08-23 10:34:00 +01:00
Ian Jackson ce8b0184ec clippy: Suppress needless_pass_by_value in tests
Rationale: same as for useless_vec, as in 01cb7ee0a1.

Prompted by reading a commit where someone did makework to get rid of
an occurrence of this warning.
2023-08-23 10:34:00 +01:00
Ian Jackson 696696857d Merge branch 'hashx_perf' into 'main'
hashx: Performance improvements for program generation

See merge request tpo/core/arti!1524
2023-08-23 09:24:13 +00:00
Ian Jackson 4f558c4413 tor-hsservice: Add a TODO for breaking up the big function
As per
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1523#note_2934367
2023-08-23 10:06:44 +01:00
Ian Jackson 6bdaa733f1 tor-hsservice: timeout_track: Add some TODOs
As per
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1523#note_2934299
2023-08-23 10:06:44 +01:00
Ian Jackson ee4bc33003 tor-hsservice: ipt-m: Add a TODO about code motion
As per
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1523#note_2934300
2023-08-23 10:06:44 +01:00
Ian Jackson 9189d5817b tor-hsservice: ipt-m: tests: Fix wrong comment
As per
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/1523#note_2934298
2023-08-23 10:06:44 +01:00
gabi-250 411a43162f Fix doc formatting. 2023-08-23 10:06:44 +01:00
Ian Jackson a117564140 tor-hsservice: About half of an IPT Manager
There are many TODOs and no tests, but it does compile.
2023-08-23 10:06:44 +01:00
Ian Jackson b39b92b856 tor-hsservice: Expose the ipt_establish and publish modules
I still think putting these in svc/ module doesn't make much sense.
Anyway, we can leave them there for now, but I need to get at them
from crate::ipt_establisher.
2023-08-23 10:04:31 +01:00
Ian Jackson 627708af14 tor-hsservice: Provide timeout tracking utilities - tests 2023-08-23 10:03:44 +01:00
Ian Jackson 11874ac7ec tor-hsservice: Provide timeout tracking utilities
This module is perhaps rather more comprehensive than needed right
now.  But I found I kept wanting to change which bits of it I used.
2023-08-23 10:03:44 +01:00
Ian Jackson 919c955f0f tor-rtmock: Relax Sync bound on spawned tasks in MockExecutor
Sync is actually otiose - and I'm about to have some test cases with
futures that aren't Sync.
2023-08-23 09:59:37 +01:00