Commit Graph

501 Commits

Author SHA1 Message Date
Vecna 13bf94ec17 Add date to proof of bridge knowledge in negative reports 2024-04-04 22:56:10 -04:00
Vecna eb1b4939be from_lox_credential() now returns a Result 2024-03-29 16:18:34 -04:00
Vecna 2bbc0e8705 Merge remote-tracking branch 'upstream/main' 2024-03-19 17:29:08 -04:00
Renovate Bot c7aa2d2ee2
Update Rust crate thiserror to 1.0.58
Signed-off-by: Cecylia Bocovich <cohosh@torproject.org>
2024-03-19 10:48:57 -04:00
Vecna 94dc1c063c Endpoint for TP system to report bridges are blocked 2024-03-15 19:31:18 -04:00
Vecna 07f0e38a40 Merge upstream changes 2024-03-15 16:48:51 -04:00
Vecna 64ada23f21 Generate tp_bridge_infos initially and whenever syncing with rdsys 2024-03-15 16:44:32 -04:00
Vecna daeeb3fdea Add function to lox_context to create fingerprint maps for TP verification 2024-03-15 16:22:43 -04:00
Vecna 4eba9df7db Add tests for positive reports 2024-03-15 13:25:13 -04:00
Vecna 684ba0a575 Add tests for invalid negative reports 2024-03-15 12:08:18 -04:00
Vecna fae8a9a74f TP renamed bridge_info::BridgeInfo 2024-03-15 11:32:51 -04:00
Vecna 6a0ff0d8a2 Begin implementing Troll Patrol handler 2024-03-15 02:30:57 -04:00
Renovate Bot f4af7b5e71 Update Rust crate tokio-stream to 0.1.15 2024-03-14 21:12:17 +00:00
Cecylia Bocovich c92a14d612
Use more descriptive error for lox proto functions
Request functions for protocols in the Lox library previously returned a
ProofError error type, which is not verbose enough to allow for accurate
debugging.

This commit introduces a new error enum, CredentialError, with several
types that allow for descriptive error messages.
2024-03-12 16:16:04 -04:00
Renovate Bot bd58409762 Update Rust crate serde_with to 3.7.0 2024-03-11 22:09:04 +00:00
Vecna 503c026964 Move (unhashed) fingerprint to field in BridgeLine 2024-03-11 15:58:31 -04:00
Cecylia Bocovich 12deeddeb0
Further condense search for replacement spares 2024-03-09 20:55:40 -05:00
Cecylia Bocovich 762fef432f
Remove unecessary res variable 2024-03-09 20:55:40 -05:00
Cecylia Bocovich a6c98b8f43
De-duplicate bridge replacement code 2024-03-09 20:55:40 -05:00
Cecylia Bocovich e6b0cf842a
Pass available_bridge by value rather than reference
Allows us to pop() from extra_bridges, which is less prone to errors than
calling both last() and then remove().
2024-03-09 20:55:40 -05:00
Cecylia Bocovich 2c396f63fa
Factor out a dissolve_spare_bucket fn
This function takes a spare bucket, specified by the given key, and
repurposes the bridges as unallocated.
2024-03-09 20:15:03 -05:00
Cecylia Bocovich 41402209f5
Delay recycling bridge table keys until we're done with them 2024-03-09 20:14:34 -05:00
Cecylia Bocovich 6462027b7f
Simplify selection of spare replacement bucket 2024-03-09 20:14:29 -05:00
Cecylia Bocovich 203b949d43
Use let-else to return early and reduce indentation 2024-03-09 16:25:41 -05:00
Renovate Bot bbfdd08ca1
Update Rust crate serde to 1.0.197
Signed-off-by: Cecylia Bocovich <cohosh@torproject.org>
2024-03-08 13:13:20 -05:00
Renovate Bot bf01251edf Update Rust crate clap to 4.5.2 2024-03-07 17:07:16 +00:00
Renovate Bot 74d7cab83d Update Rust crate prometheus-client to 0.22.2 2024-03-07 10:37:29 +00:00
onyinyang 3f4f79c5b7 Removed to_be_replaced vector 2024-03-06 15:00:34 +00:00
onyinyang 11c09efed4 Update ACCEPTED_HOURS_OF_FAILURE to account for rdsys expiry time 2024-03-06 15:00:34 +00:00
Renovate Bot bad2457973 Update Rust crate js-sys to 0.3.69 2024-03-04 20:07:16 +00:00
Vecna e1bed84e27 cargo-fmt 2024-02-28 11:49:47 -05:00
Vecna 88a0990243 Don't have LA recompute H every time to verify positive reports 2024-02-28 11:47:49 -05:00
Vecna 2ca58d8b5a Use const for generating H 2024-02-26 17:50:37 -05:00
Vecna af68c8818d Have LA recompute H rather than accepting it from user 2024-02-26 17:37:56 -05:00
Vecna e2e59e50a6 Make H, BH public so knowledge of bucket can be verified 2024-02-20 16:46:38 -05:00
Vecna 65e763724b Merge changes from upstream 2024-02-20 16:45:56 -05:00
Renovate Bot 8fcac42790 Update Rust crate clap to 4.5.1 2024-02-16 13:40:26 +00:00
onyinyang 420d3be4bd Fixes last open invite bucket distribution 2024-02-12 23:11:55 +00:00
Renovate Bot 906577f6a8
Update Rust crate time to 0.3.34
Signed-off-by: Cecylia Bocovich <cohosh@torproject.org>
2024-02-12 17:17:30 -05:00
Renovate Bot 9175f636d5
Update Rust crate serde to 1.0.196
Signed-off-by: Cecylia Bocovich <cohosh@torproject.org>
2024-02-12 17:15:08 -05:00
Renovate Bot 5cda1d33e8
Update Rust crate chrono to 0.4.34
Signed-off-by: Cecylia Bocovich <cohosh@torproject.org>
2024-02-12 17:14:13 -05:00
Renovate Bot 227fd1ce33
Update Rust crate js-sys to 0.3.68
Signed-off-by: Cecylia Bocovich <cohosh@torproject.org>
2024-02-12 17:10:26 -05:00
Renovate Bot f70c602f8e
Update Rust crate clap to 4.5.0
Signed-off-by: Cecylia Bocovich <cohosh@torproject.org>
2024-02-12 17:09:30 -05:00
Renovate Bot 5399c1f72a
Update Rust crate base64 to 0.21.7
Signed-off-by: Cecylia Bocovich <cohosh@torproject.org>
2024-02-12 17:07:55 -05:00
Renovate Bot b2fadaeca9
Update Rust crate serde_json to 1.0.113
Signed-off-by: Cecylia Bocovich <cohosh@torproject.org>
2024-02-12 17:06:58 -05:00
Renovate Bot baa7616629
Update Rust crate futures to 0.3.30
Signed-off-by: Cecylia Bocovich <cohosh@torproject.org>
2024-02-12 17:05:32 -05:00
Renovate Bot 10067f6be6 Update Rust crate thiserror to 1.0.57 2024-02-11 19:40:16 +00:00
Renovate Bot f72c7ed4fa Update Rust crate serde_with to 3.6.1 2024-02-09 00:36:36 +00:00
Renovate Bot 4e64c8b144 Update Rust crate serde_with to 3.6.0 2024-01-31 23:42:01 +00:00
Renovate Bot 52e81b5dd5 Update Rust crate prometheus-client to 0.22.1 2024-01-30 13:10:23 +00:00
Renovate Bot 6a10e4e748 Update Rust crate serde_with to 3.5.1 2024-01-23 20:53:03 +00:00
onyinyang ae1420a5ea
Fix bug in blockage migration date, variable naming 2024-01-23 09:59:43 -05:00
onyinyang a8be1a8043
Ensure calculations return correct unlock times 2024-01-22 13:30:58 -05:00
onyinyang 3b1de79309
Return reasonable values for unlock function 2024-01-22 13:30:58 -05:00
onyinyang 849fcb3541
Added part of next unlock function 2024-01-22 13:30:58 -05:00
Renovate Bot 60a47c962f Update Rust crate serde_with to 3.5.0 2024-01-22 16:23:32 +00:00
onyinyang 050e628ae7
Add endpoint to return server constants 2024-01-22 11:09:31 -05:00
onyinyang 2ad2f2e211 Make lox-distributor listening port configurable 2024-01-22 15:08:39 +00:00
onyinyang 33e24ef5b6 Fix bug in bridge_replace fn, test 2024-01-18 03:34:22 +00:00
Vecna 3f309c9da3 Ensure H is not identity 2024-01-17 18:12:27 -05:00
Cecylia Bocovich 5ead4c4d9d Attempt to deserialize open invitation as lox_utls::Invite 2024-01-17 22:49:36 +00:00
Vecna 1dbc14d5f1 Uncomment level and bucket checks 2024-01-17 17:41:53 -05:00
Vecna a20300ab62 Fix error causing proof verification failure 2024-01-17 17:37:15 -05:00
Vecna 4240fa3377 Comment out level, bucket proofs to help debug 2024-01-17 16:59:33 -05:00
onyinyang 596901b174 Fixes bug in parse_into_buckets that skips adding every 4th bridgeline 2024-01-17 16:51:53 +00:00
onyinyang 6afc557ad5 Fix length of bridge bytes and rdsys request interval 2024-01-17 16:43:39 +00:00
Vecna 9cd9e3fab7 Add proof of level 3 or 4, bucket. (Still needs to be debugged.) 2024-01-16 20:22:56 -05:00
Cecylia Bocovich 1702027cb9
Export invitation_is_trusted for wasm_bindgen 2024-01-16 14:26:29 -05:00
Vecna a6c5d789e7 Begin work on LV3+ proof for Troll patrol positive reports 2024-01-15 19:22:59 -05:00
Vecna 0041116e65 Merge remote-tracking branch 'upstream/main' 2024-01-14 17:50:52 -05:00
onyinyang ed7c94b912
Send Response as json, errors with OK Status Code 2024-01-09 12:25:03 -05:00
Renovate Bot c2a40658e3 Update Rust crate clap to 4.4.14 2024-01-08 17:18:37 +00:00
Renovate Bot ffedd7f2c9 Update Rust crate base64 to 0.21.6 2024-01-08 16:21:59 +00:00
Renovate Bot fb8a5e89a2 Update Rust crate serde to 1.0.195 2024-01-08 16:12:22 +00:00
Renovate Bot 46ba68e1b5 Update Rust crate thiserror to 1.0.56 2024-01-08 16:04:30 +00:00
Renovate Bot 771db10cd1 Update Rust crate clap to 4.4.13 2024-01-04 19:39:11 +00:00
onyinyang 075d51b088 Add better serde error handling to wasm functions 2023-12-21 17:00:49 +00:00
onyinyang c1f6ab0b77
Gracefully recovers from rdsys shutdown or lack of resources 2023-12-20 19:04:44 -05:00
onyinyang 9d4a293ee9 Add invitation_is_trusted function, fixup error handling 2023-12-20 20:19:51 +00:00
Cecylia Bocovich 39449cabe8
Respond with error when open invitation buckets are empty
Expand the error type returns by invite() to include a new error for
when there are no available bridges for open invitation users. This
fixes a bug that previously caused a panic when we have no bridges to
distribute.

See https://gitlab.torproject.org/tpo/anti-censorship/lox/-/issues/43
2023-12-20 13:52:42 -05:00
onyinyang 364b55dc4c Make wasm getter functions return Result 2023-12-19 20:02:12 +00:00
onyinyang c8b6bb9fdd Formatting and clippy changes 2023-12-19 20:02:12 +00:00
onyinyang 711a34cc2d Add bridgeline getters to wasm and Lox system info 2023-12-19 20:02:12 +00:00
Renovate Bot 918a5555b8 Update Rust crate time to 0.3.31 2023-12-19 10:06:55 +00:00
Cecylia Bocovich 7d94b3c861
Add LoxDBError and refactor to return Result
Add a new error type to capture multiple possible database reading
errors and refactor both read_lox_context_from_db and use_last_context
to return a Result.
2023-12-18 14:20:17 -05:00
Cecylia Bocovich 5ed62d239d
Check whether lox_db is empty after recovering 2023-12-18 14:20:17 -05:00
Renovate Bot d8e40b53c4 Update Rust crate hyper to 0.14.28 2023-12-18 15:06:53 +00:00
onyinyang aeddbb5d71
Add error handling and Invitation expiry getter for wasm 2023-12-17 23:43:16 -05:00
onyinyang 6757702662
Add getter functions for wasm Lox credential attributes 2023-12-15 11:27:33 -05:00
Renovate Bot d7613eb514 Update Rust crate clap to 4.4.11 2023-12-04 18:21:13 +00:00
Renovate Bot 49aa3f57ed Update Rust crate clap to 4.4.10 2023-11-28 03:37:14 +00:00
Renovate Bot 089b481c67 Update Rust crate js-sys to 0.3.66 2023-11-27 15:37:39 +00:00
onyinyang 2a2708c5b5
Add license to lox-util Cargo.toml 2023-11-23 12:24:20 -05:00
onyinyang 9294fb9fd1
Fixup keywords in all Cargo.toml files 2023-11-23 12:04:00 -05:00
onyinyang 472445a9a5
Add README for rdsys-backend-api, lox-utils and switch to lox-zkp crate 2023-11-23 11:44:05 -05:00
onyinyang a27df0b6c6
Update Cargo.tomls to point to correct README location 2023-11-22 14:49:09 -05:00
onyinyang 88a865d04c
Remove time manipulation and other fmt fixes 2023-11-21 18:41:53 -05:00
onyinyang fdde186c92
Add lox-wasm and lox-utils READMEs and other fmt fixes 2023-11-21 12:57:00 -05:00
Renovate Bot 02df29a249 Update Rust crate serde to 1.0.193 2023-11-21 02:07:04 +00:00
Renovate Bot ec15d0f229 Update Rust crate thiserror to 1.0.50 2023-11-20 16:06:32 +00:00