Commit graph

282 commits

Author SHA1 Message Date
Joakim Frostegård
1e0559f384 udp: rename ConnectionValidator.hmac to .keyed_hasher 2022-04-14 22:51:16 +02:00
Joakim Frostegård
e8cb0c1618 udp: improve ConnectionValidator doc comment 2022-04-14 22:45:29 +02:00
Joakim Frostegård
f58e2a9bdb udp: improve test_connection_validator 2022-04-14 22:40:13 +02:00
Joakim Frostegård
d6e5155acf udp: rename MAX_PACKET_SIZE to BUFFER_SIZE 2022-04-14 22:24:56 +02:00
Joakim Frostegård
07630d2e0c udp: add quickcheck test for ConnectionValidator 2022-04-14 22:21:05 +02:00
Joakim Frostegård
1e5b98bcf6 udp: ConnectionValidator: add documentation 2022-04-14 22:08:57 +02:00
Joakim Frostegård
82e468de35 udp: socket worker: send responses: use previous design
It seems to perform better
2022-04-14 17:49:17 +02:00
Joakim Frostegård
ebe612a560 udp: TorrentMap cleaning: improve code, do less work 2022-04-14 17:44:34 +02:00
Joakim Frostegård
0f6be84576 udp: log with warn level and with more info if send_to fails 2022-04-14 17:40:43 +02:00
Joakim Frostegård
5d227428cc udp: send_response: reduce branching (hopefully) 2022-04-14 17:38:54 +02:00
Joakim Frostegård
dcf6ceaec0 udp socket worker: remove dubious #[inline] hints 2022-04-14 17:34:41 +02:00
Joakim Frostegård
f532ec1875 udp: improve error handling in read_requests 2022-04-14 17:33:32 +02:00
Joakim Frostegård
6cbfa46805 udp: improve code in PendingScrapeResponseSlab.clean 2022-04-14 17:29:56 +02:00
Joakim Frostegård
9479828b4a udp: PendingScrapeResponseSlab: use normal hashmap instead of amortized 2022-04-14 17:24:33 +02:00
Joakim Frostegård
256975a43c udp: check whether to clean scrape response slab less often 2022-04-14 17:14:38 +02:00
Joakim Frostegård
70414ee736 udp: ConnectionValidator: improve error on failure to gen key 2022-04-14 17:12:16 +02:00
Joakim Frostegård
38eecaeef2 udp: remove traits-preview feature from blake3 dependency 2022-04-13 23:46:47 +02:00
Joakim Frostegård
70cabfa89c udp: ConnectionValidator: add anyhow context to getrandom call 2022-04-13 23:45:39 +02:00
Joakim Frostegård
38962eba6b udp: config: make max_connection_age a u32, improve its documentation 2022-04-13 23:42:35 +02:00
Joakim Frostegård
4203e86eca udp: optimize/simplify ConnectionValidator 2022-04-13 23:40:04 +02:00
Joakim Frostegård
059ef495bf udp: config: remove connection_cleaning_interval 2022-04-13 22:36:42 +02:00
Joakim Frostegård
cbcb627772 udp: reorder initializations in lib.rs 2022-04-13 22:32:30 +02:00
Joakim Frostegård
8b70034900 udp: use hmac ConnectionValidator in socket workers 2022-04-13 22:27:45 +02:00
Joakim Frostegård
dc4523ede5 udp: start work on HMAC connection ID generation and validation 2022-04-13 21:27:42 +02:00
Joakim Frostegård
c229872134 Use idiomatic feature names & namespace support from Rust 1.60 2022-04-10 01:25:03 +02:00
Joakim Frostegård
3746fa76ec udp: name statistics worker thread "statistics" 2022-04-06 19:16:50 +02:00
Joakim Frostegård
bd6764afaf Move aquatic_cli_helpers code into aquatic_common and remove crate 2022-04-06 19:02:39 +02:00
Joakim Frostegård
b61b136b0c Add PanicSentinelWatcher
Use to determine if SIGTERM was caused by panic in other thread
2022-04-06 01:33:19 +02:00
Joakim Frostegård
d0eec05d4c udp: use PanicSentinel 2022-04-06 00:42:11 +02:00
Joakim Frostegård
cb2f7483d3 Return anyhow::Result on PrivDropper waiting and socket creation 2022-04-05 23:15:29 +02:00
Joakim Frostegård
c888017072 Improve privilege dropping; run cargo fmt 2022-04-05 01:26:40 +02:00
Joakim Frostegård
908e18360c Merge branch 'master' into cpu-pinning-2022-03-30 2022-04-04 22:49:25 +02:00
Joakim Frostegård
6c149331dc Rewrite CpuPinningConfig implementation to support aquatic_toml_config 2022-04-04 22:38:47 +02:00
Joakim Frostegård
c18a59b0cb Use proper workspace path declarations, remove workspace patch section 2022-04-04 12:46:42 +02:00
Joakim Frostegård
fb607ac0c2 Improve CPU pinning 2022-03-30 22:53:15 +02:00
Joakim Frostegård
d78b0fa31e Bump version to 0.2.0 for all aquatic crates 2022-03-26 11:39:37 +01:00
Joakim Frostegård
90437e23bb Cargo.toml files: add readme keys, remove some exclude keys 2022-03-26 11:39:04 +01:00
Joakim Frostegård
f5b1cd5525 Add command-line option for printing version and commit info 2022-03-24 16:17:17 +01:00
Joakim Frostegård
a9f1aeb70c Add crate keywords, update descriptions 2022-03-20 20:41:56 +01:00
Joakim Frostegård
83987563ec udp: replace dependency "chrono" with "time" 2022-03-20 19:57:44 +01:00
Joakim Frostegård
5176b18ef9 common: rename AHashIndexMap to AmortizedIndexMap 2022-03-20 19:42:46 +01:00
Joakim Frostegård
e938351a9e udp: set default max_scrape_torrents=70, max_response_peers=50 2022-02-20 01:47:03 +01:00
Joakim Frostegård
3785e57513 Sort dependencies in Cargo.toml files 2022-02-20 01:44:34 +01:00
Joakim Frostegård
903010dbe1 udp: use action 1 for IPv6 announce responses; refactor protocol code
According to BEP015, action 1 is to be used.
2022-02-20 01:35:24 +01:00
Joakim Frostegård
8e7f8425f9 udp: default to 120s max_connection_age, since it is in BEP0015 2022-02-20 00:48:58 +01:00
Joakim Frostegård
14a4c10546 s/toml_config/aquatic_toml_config/ 2022-02-19 15:11:00 +01:00
Joakim Frostegård
5e8777d2e2 udp, http: remove unused parking_lot dependency 2022-02-19 14:13:27 +01:00
Joakim Frostegård
29ea935744 udp: request workers: use config.statistics.active() 2022-02-19 14:09:24 +01:00
Joakim Frostegård
91dcd3de4d
Add CanonicalSocketAddr struct (#49)
* Add CanonicalSocketAddr struct to aquatic_common, use in aquatic_udp

* udp_bench: fix build error by using CanonicalSocketAddr
2022-02-02 22:34:54 +01:00
Joakim Frostegård
0d3c6111ca udp: run cargo fmt 2022-01-13 19:21:53 +01:00