Commit Graph

376 Commits

Author SHA1 Message Date
Cecylia Bocovich 3136a8ba85
Remove unsafe blocks that aren't needed 2023-06-16 15:59:11 -04:00
onyinyang 84d7691ab8
Separate out tests to improve readability 2023-06-16 12:45:27 -04:00
onyinyang 9c959486be
Add better error handling for bad requests 2023-06-16 12:02:05 -04:00
onyinyang e1f7cda652
Add checkblockage test with changes to lox_context 2023-06-16 12:02:04 -04:00
onyinyang e7db9e7151
Add more tests for lox-distributor handle 2023-06-16 12:01:56 -04:00
onyinyang 54c5a837ad
Add more common functions to lox_utils, clean up lox_wasm 2023-06-09 18:31:35 -04:00
onyinyang 003d9c886b Add pipeline 2023-06-08 16:58:22 +00:00
onyinyang c7c5f57864
Move validate function to lox_utils 2023-06-08 12:26:37 -04:00
onyinyang b016bc9742
Move credential helpers out of lox-wasm 2023-06-07 16:10:37 -04:00
onyinyang 5ac0fc7bef
Fixup cargo imports to address stdweb issue 2023-06-07 16:02:02 -04:00
onyinyang 16ced3c5e0
Add other cargo fmt changes 2023-06-06 19:58:35 -04:00
onyinyang dc8774f5b8
Add Test for lox-distributor 2023-06-06 19:58:34 -04:00
onyinyang af9fc6dfd1
Add Lox-utils 2023-06-05 15:24:06 -04:00
onyinyang e65c16ab0b
Merge branch 'lox-wasm' 2023-06-05 15:16:06 -04:00
onyinyang 21ff749e4f
Update lox-wasm Cargo.toml for workspace 2023-06-05 15:14:43 -04:00
onyinyang aac0e52e43
Merge branch 'rdsys-backend' 2023-06-05 15:08:36 -04:00
onyinyang 4595cc9f8d
Merge branch 'lox-library' 2023-06-05 15:07:22 -04:00
onyinyang ed0cfbebf5
Update rdsys-backend Cargo.toml for workspace 2023-06-05 15:00:30 -04:00
onyinyang de5e7a0428
Merge 'rdsys-backend/main' into lox-workspace 2023-06-05 14:56:41 -04:00
onyinyang 231a1ed9f4
Update lox-distributor Cargo.toml for workspace 2023-06-05 14:51:01 -04:00
onyinyang 5b994de577
Merge 'lox-distributor/main' into lox-workspace 2023-06-05 14:46:28 -04:00
onyinyang 5ac8e703cf
Update lox-library Cargo.toml for workspace 2023-06-05 14:39:10 -04:00
onyinyang 6372e894ae
Adjust replace_with_new to fit with updates to Lox library 2023-05-17 12:46:09 -04:00
onyinyang 3e3f50c215
Refactors lox-distributor to make division of tasks clearer 2023-05-17 12:19:28 -04:00
onyinyang 607e1a425d
Remove performance statistics tests for pipeline 2023-05-15 20:18:20 -04:00
onyinyang a9d5f31870
Add test pipeline 2023-05-15 20:17:53 -04:00
onyinyang 8d0f570627
Adds test and fixes for allocate bridges 2023-05-15 18:57:23 -04:00
onyinyang 45bb5756df
Minor fixes 2023-05-15 12:53:32 -04:00
onyinyang 6bff64f283
Adds replace_bridge test and fixes bugs in the function 2023-05-15 12:32:22 -04:00
onyinyang 0d317cea8c
Fix replace bridge to align with changes to lox-distributor 2023-05-11 17:02:33 -04:00
onyinyang da4d7c962f
Add fix for failure to replace bridges
- Change text for disabled functionality for blocked bridges
2023-05-11 16:00:09 -04:00
onyinyang 508eaf3bdd
Add functions to recycle and allocate extra bridges 2023-05-09 13:00:40 -04:00
onyinyang 13d1bc8b1d
Add leftover bridges to bridgedb 2023-05-08 20:30:30 -04:00
onyinyang 292827fa63
Add handling of gone, not blocked, resources 2023-05-08 12:52:34 -04:00
onyinyang 83c7916805
Added bridge replacement 2023-05-08 12:31:36 -04:00
onyinyang 1adf145671
Make bucket size match constant in Lox library for all functions 2023-04-10 12:16:19 -04:00
onyinyang ba7116aa16
Removing test function 2023-04-10 11:24:53 -04:00
onyinyang 4695a11702
Ensure that left over bridges (not grouped into a bucket) are properly handled 2023-04-05 16:26:23 -04:00
onyinyang d2bd91e0fe
Update bridgeline sizes to match lox library 2023-04-04 19:34:35 -04:00
onyinyang 11d4678be8
Update fingerprint to match UID from rdsys 2023-04-04 18:39:28 -04:00
onyinyang dafe1b0a1d
Add get_uid function for API resource 2023-04-04 16:10:16 -04:00
onyinyang a3a693d45a
Revise bridge bytes size to 300 2023-04-03 12:06:20 -04:00
onyinyang 362996c4f7
Add fingerprint field to Bridgeline 2023-04-03 11:47:11 -04:00
onyinyang a206917e92
Add update bridge function 2023-03-27 12:36:57 -04:00
onyinyang 562b74c274
Clean up code and improve readability 2023-03-24 13:16:26 -04:00
onyinyang b0038720e0
Make all requests POST requests to match server and browser handling 2023-03-24 13:02:42 -04:00
onyinyang 22ef5d157d
Updating bridges to make sense 2023-03-24 11:31:01 -04:00
onyinyang e257a05c99
Add bridge update 2023-03-23 13:21:04 -04:00
onyinyang f08520de84
Update function definition for bridge update 2023-03-23 11:00:10 -04:00
onyinyang 3f5d497573
Incorporate impl Stream for ResourceStream changes from rdsys-api-backend 2023-03-22 19:14:56 -04:00
Cecylia Bocovich eb43414574 Only return Poll::Pending if the inner future returns it
The waker stored in the future will only wake up and re-poll the stream
if the call to future returned Poll::Pending. Because of this, if we
didn't receive enough data to reconstruct the ResourceDiff, we need to
loop and poll the inner future again rather than return Poll::Pending
ourselves.
2023-03-22 17:41:08 -04:00
Cecylia Bocovich e1e5e798b6 Use a ReusableBoxFuture to store ReceiverStream 2023-03-22 15:05:05 -04:00
Cecylia Bocovich 0b0324c487 Change ResourceStream from an Iterator into a Stream 2023-03-21 17:37:15 -04:00
onyinyang 490ce2f19c
Add distributor logic for bridge updates from rdsys, handling for unsuccessful removals/updates 2023-03-20 12:42:40 -04:00
onyinyang 366111e28f
Add bridge_update stub 2023-03-20 12:33:26 -04:00
onyinyang 0476a88419
Add comments 2023-03-20 11:53:10 -04:00
onyinyang 9e78a90541
Adds graceful shutdown for all tasks, rdsys stream inconsistent shutdown 2023-03-17 10:41:32 -04:00
onyinyang 9616b95b5d
Update README 2023-03-15 15:42:04 -04:00
onyinyang c74da3a078
Server responds to requests and processes bridgelines from rdsys 2023-03-15 15:21:03 -04:00
onyinyang 3b0c8ab5b6
Implements server functionality, next get thread working 2023-03-15 12:38:38 -04:00
onyinyang 34f1d0399f
Refactoring to add a channel to pass messages to client 2023-03-13 18:05:52 -04:00
onyinyang c715d80632
[WIP] Progress on bridgedb update through channel update 2023-03-10 16:54:31 -05:00
onyinyang b2642d353c
Add add_invitation_bucket for new bridgelines and remove gone bridgelines 2023-03-10 15:21:27 -05:00
onyinyang 42f5c0e764
Increase bridge info size 2023-03-10 12:02:45 -05:00
onyinyang be861baf36
Add parsing resource into Lox BridgeLine 2023-03-09 19:01:01 -05:00
onyinyang 00aa9b0ab1
Revert "Add fields to BridgeLine"
This reverts commit 4a014725cdae582401f5d166a722317ed45b8bfe.
2023-03-09 18:18:02 -05:00
onyinyang a76fdc98b9
Add fields to BridgeLine 2023-03-09 16:59:20 -05:00
onyinyang a7cf09f812
Read json config from commandline file, progress on channels 2023-03-03 17:25:43 -05:00
onyinyang 1018dd827f
Add resourcediff stream stub for rdsys integration 2023-03-03 14:09:13 -05:00
Cecylia Bocovich 9e2d341751 Allow POST requests for invite tokens 2023-03-01 20:05:51 -05:00
onyinyang a9de52a266
Blockage Migration tested and fixed up 2023-02-28 12:57:57 -05:00
onyinyang fd4f715ad9
REVERT BEFORE USING: make BA today function, bridge_table public for testing 2023-02-28 12:01:00 -05:00
onyinyang dd00f99958
Add blockage migration (untested) 2023-02-27 16:58:06 -05:00
onyinyang 1bac11f1d0
Refactor Lox Credential, Add check blockage 2023-02-27 16:46:01 -05:00
onyinyang 8faf4fc273
Add redeem invite 2023-02-27 14:17:26 -05:00
onyinyang 7bf91edbaa
Add redeem invite 2023-02-27 14:17:07 -05:00
onyinyang 944cbb77e4
Add issue invitation 2023-02-24 19:11:44 -05:00
onyinyang fdaa75f43d
Add issue invitation 2023-02-24 19:10:38 -05:00
onyinyang 66f7ae4c0d
Add up to level up 4 2023-02-23 22:16:45 -05:00
onyinyang 01a6cb37e1
Add working reachability cred, test credential aging needs work 2023-02-23 13:18:11 -05:00
onyinyang a5b6ec8b93
Add request handling for encrypted bridge table and level up 2023-02-23 01:00:53 -05:00
onyinyang d8cdf3ccab
Logic for level up, reachability credential unimplemented 2023-02-14 17:08:09 -05:00
onyinyang f44ac0ae9f
Refactor js to remove duplicate code 2023-02-14 14:45:52 -05:00
onyinyang 984bbe9370
Add trust migration server handling 2023-02-13 23:58:38 -05:00
onyinyang 944c3634ca
Add Trust migration protocol 2023-02-13 23:58:07 -05:00
onyinyang 56bc148db1
Update date to 1 past threshold for upgrade 2023-02-13 16:29:34 -05:00
onyinyang 11071756d4
Add advance days for testing purposes 2023-02-13 16:28:24 -05:00
onyinyang 0a29265c1f
Solve time issue, add time for testing 2023-02-10 16:18:54 -05:00
onyinyang 080d5879b1
Adds trust promo logic, time issue 2023-02-07 00:45:54 -05:00
onyinyang 0e960d9156
Make all states serializable 2023-02-06 19:47:04 -05:00
onyinyang f4e34c06b1
Add server side for trust promo requests 2023-02-06 17:41:26 -05:00
onyinyang 745b6673cb
Clean up messages, full first credential handling 2023-02-06 13:58:24 -05:00
onyinyang 9f0d0203a0
Fix issue with public key request 2023-02-06 13:57:23 -05:00
onyinyang 04b4d50ef9
Change keys to string to be handled properly in index.js 2023-02-01 00:44:18 -05:00
onyinyang 8cc9d3d5d3
Change pubkey passing, handling credentials still broken 2023-02-01 00:42:49 -05:00
onyinyang 77d4f8b164
Handle POST requests and open invite credential request 2023-01-30 18:14:22 -05:00
onyinyang dfa2ae4c6f
Handle open invite credential 2023-01-30 18:13:17 -05:00
Cecylia Bocovich 1da6e245cc Formatting and documentation fixes 2023-01-30 17:05:38 -05:00
onyinyang 832a252318
Fix serialization of request/state 2023-01-30 16:03:12 -05:00
Cecylia Bocovich 46d51315b6 Use rust listing in markdown 2023-01-30 15:25:41 -05:00
Cecylia Bocovich 6eb8f575ca Add proto.rs after module refactor 2023-01-30 15:24:58 -05:00
Cecylia Bocovich 0f60fabae6 Add README 2023-01-30 15:24:47 -05:00
Cecylia Bocovich 685541176b Add documentation 2023-01-30 15:23:01 -05:00
Cecylia Bocovich 04e7caef31 Refactor modules 2023-01-30 15:08:30 -05:00
Cecylia Bocovich 9d448b00b4 Return an iterator over ResourceDiff items
Rather than returning a Receiver<Bytes>, instead return a ResourceStream
struct that implements the Iterator trait so callers can simply iterate
over the ResourceDiff items received.
2023-01-30 15:03:14 -05:00
Cecylia Bocovich c89aa4a9f9 Add function to start a resource-stream connection
At the moment the start_stream function very simply prints out each
response as it arrives.
2023-01-29 14:18:39 -05:00
onyinyang 03008449fa
Handle request and state more reasonably 2023-01-26 14:16:41 -05:00
onyinyang dd1b971914
Fix javascript to handle values properly 2023-01-26 00:17:14 -05:00
onyinyang 61940bdfe3
Sends pubkeys on request 2023-01-25 15:49:40 -05:00
onyinyang 0f0f13df0d
Tentative structure for request handler 2023-01-25 15:49:40 -05:00
onyinyang f80a6c80eb
Adds bridge authority and placeholder buckets 2023-01-25 15:41:34 -05:00
onyinyang 235eb90d6e
Change calls to match server 2023-01-25 15:02:53 -05:00
onyinyang d473b53745
Add wasm_bindgen for handling new lox credential 2023-01-25 15:02:39 -05:00
onyinyang 5d60807a42
Updates open_invite to return request and state 2023-01-25 15:02:23 -05:00
Cecylia Bocovich 64247c1ceb Add more tests for resource serialization 2023-01-23 12:58:41 -05:00
Cecylia Bocovich d5c98510db Run `cargo fmt` 2023-01-20 16:12:29 -05:00
Cecylia Bocovich c837a13121 Initial commit 2023-01-20 16:01:03 -05:00
onyinyang 9ce2a81fe7
Make credentials serializable for Tor JS bindings
Author:    onyinyang <onyinyang@users.noreply.github.com>
2023-01-18 15:02:28 -05:00
onyinyang f7002632f7
Make state serializable for Tor JS bindings
Author:    onyinyang <onyinyang@users.noreply.github.com>
2023-01-18 15:02:28 -05:00
Cecylia Bocovich e117dc5540 Refactor the xhr so other requests can reuse the code 2023-01-13 14:23:35 -05:00
Cecylia Bocovich 21a29a09eb Put lox test script into its own file 2023-01-13 14:16:37 -05:00
Vecna 3945ed5b60 Make BridgeAuth (de)serializable 2022-11-22 19:15:09 -05:00
Cecylia Bocovich bb5bdac588 Added README 2022-11-15 22:05:02 -05:00
Cecylia Bocovich b97310c35b Add Access-Control-Allow-Origin header 2022-11-15 22:04:04 -05:00
Cecylia Bocovich 9de53da203 Instructions and a simple test of the bindings 2022-11-15 22:03:30 -05:00
Cecylia Bocovich ebae7fb600 Improve error handling and add rand dependency
This makes panics more visible in the console and fixes a weird bug
where the rand package was throwing an error.
2022-11-15 21:57:49 -05:00
Cecylia Bocovich 9992e3c73c Simple lox server
Right now only issues open invite tokens
2022-11-15 19:11:16 -05:00
Vecna 2cd4d96b73 Make BridgeDb (de)serializable 2022-11-14 13:56:13 -05:00
Vecna b607f3bc37 Make Issuer Keys (de)serializable. 2022-11-13 11:33:57 -05:00
Cecylia Bocovich 6e3525ac4c Add .gitignore 2022-11-10 11:05:46 -05:00
Cecylia Bocovich 48b8a986ef Avoid use of * with use 2022-11-10 11:04:20 -05:00
Cecylia Bocovich fcabba5e6e Update Cargo.toml 2022-11-10 11:00:28 -05:00
Cecylia Bocovich ff905db53a First attempt at binding the open invite function 2022-11-09 14:40:53 -05:00
Cecylia Bocovich 1b285cff42 Update README 2022-11-09 13:39:24 -05:00
Cecylia Bocovich a0d6d8a2c4 Add LICENSE 2022-11-09 18:38:42 +00:00
Cecylia Bocovich dd34616d88 Initial commit 2022-11-09 18:37:10 +00:00
Ian Goldberg ae3fc8f1a2 Update README 2022-10-20 17:33:51 -04:00
Ian Goldberg 4eca032745 cargo fmt 2022-10-20 11:34:39 -04:00
Ian Goldberg efc175b45b Don't crash if we get 0 data points for small experiments 2022-10-20 11:25:48 -04:00
onyinyang 2818ce67f4
Added some fixes and requested touchups from artifact review 2022-10-20 01:18:04 -04:00
onyinyang 9f0fb0bbe1
Docker works as expected, README updated 2022-10-18 00:52:10 -04:00
Ian Goldberg abc8acd079
Add MIT licence 2022-10-18 00:51:30 -04:00
onyinyang 993d01b712
Added results of cargo clippy --fix 2022-10-18 00:51:17 -04:00
onyinyang 9778f9cd25
Proposed changes for artifact, run_tests_fast feature runs with 100 users 2022-10-18 00:43:30 -04:00
Ian Goldberg 92fb283bcd Touch up the docker environment 2022-08-17 10:20:12 -04:00
onyinyang cef13f9b07
Updated run script to name container 2022-08-17 01:53:10 -04:00
onyinyang 3dde20d845
Added Dockerfile and build scripts for PETS2023 2022-08-14 20:31:09 -04:00
onyinyang 203e17f9fa
Changed format of TESTNAME 2022-04-06 22:37:21 -04:00
onyinyang 45b53590f7
Removed table 2022-04-06 22:33:36 -04:00
onyinyang 90d19b9846
Added times to readme 2022-04-06 18:29:11 -04:00
onyinyang 666cfd4582
Fixed testing instructions and another substring issue 2022-04-04 13:22:51 -04:00
onyinyang 1fe1c147ab
Moved README and fixed substring issue 2022-04-04 00:45:11 -04:00
onyinyang a7be6d3bfd
Added Updated tests file and readme 2022-04-04 00:45:10 -04:00
onyinyang 7f7522faf2
Added timing 2022-04-04 00:45:10 -04:00
onyinyang 0ce3d68d79
Changed printout statements and reverted to multithreaded testing 2022-04-04 00:45:10 -04:00
onyinyang 3bb50aa9ab
Added tests for different sized bridges 2022-04-04 00:45:10 -04:00
onyinyang 82272ea933
Added perfstat time outputs for each test 2022-04-04 00:45:10 -04:00
onyinyang 3d8f1e799e
Remove open invitation buckets from blockages, add test for 75% 2022-04-04 00:45:10 -04:00
onyinyang 20511632e8
Fixed bug that still blocked spares 2022-04-04 00:45:10 -04:00
onyinyang 4769c5db94
Changed blockage test to only block non-spare buckets 2022-04-04 00:45:10 -04:00
onyinyang bc5a1e5c0d
Add more bridges for consistency, printout units
Committer: ltulloch <ltulloch@uwaterloo.ca>
2022-04-04 00:45:10 -04:00
onyinyang a00d97dfe9
Corrected error causing response handling stdev anomaly, adjusted test size for blockages 2022-04-04 00:45:09 -04:00
onyinyang c69e740366
Add tests for varying percentages of blocked bridge 2022-04-04 00:45:09 -04:00
onyinyang 7dedf2ab47
Updated print statements and number of users 2022-04-04 00:45:09 -04:00
onyinyang ea8ac7eb9c
Add blockage migration stats test 2022-04-04 00:45:09 -04:00
onyinyang c9afa18795
Added all tests but details of blockage migration 2022-04-04 00:45:09 -04:00
onyinyang 95615cf3ee
Modularized duplicate code and added more tests 2022-04-04 00:45:09 -04:00
onyinyang 695421f265
Fixed issues identified during live code review 2022-04-04 00:45:09 -04:00
onyinyang 6217252813
Added statistics for open invite 1000 users 2022-04-04 00:45:09 -04:00
onyinyang 727a6e11a3
Added timing and measurements to all methods, TODO printout tests 2022-04-04 00:45:09 -04:00
onyinyang 8a16f95263
Removed types for deserialized objects 2022-04-04 00:45:09 -04:00
onyinyang a76d3922fc
Added timing and perfstat struct for open invite 2022-04-04 00:45:08 -04:00
onyinyang 8496c63b14
Added serialized sizes for request and response in open invite 2022-04-04 00:45:08 -04:00
onyinyang d9d349d0f7
Replace big_array with serde_as, cargo fmt likes things to be alphabetical 2022-04-04 00:45:08 -04:00
onyinyang f6ffdd77bb
Added serialization/deserialization for check_blockage and trust_promotion 2022-04-04 00:45:08 -04:00
onyinyang 179fea5e23
Added serialization and deserialization for all but check blockage and trust promotion 2022-04-04 00:45:08 -04:00
onyinyang fd05dce77d
Fixed comments from code review 2022-04-04 00:45:08 -04:00
onyinyang c73230e937
Added Bridgeline to open-entry 2022-04-04 00:45:08 -04:00
Ian Goldberg a56ac87868 Change IssuerPubKey constructor to be more functional 2021-06-05 16:25:39 -04:00
Ian Goldberg 596cf10ea5 The complete blockage migration protocol 2021-05-05 18:22:32 -04:00
Ian Goldberg 4bb77d16e4 Be consistent about the ordering of the parameters in the ZKPs
Particularly D
2021-05-05 16:34:12 -04:00
Ian Goldberg 74bae2cf8e The complete check blockage protocol 2021-05-05 16:29:25 -04:00
Ian Goldberg 27773123a3 Add a migration type attribute to the Migration credential 2021-05-05 15:25:56 -04:00
Ian Goldberg 0664dd7b45 API for adding bridges and marking them as unreachable 2021-05-05 14:00:07 -04:00
Ian Goldberg cf19bf80ee Make an easier to use test harness 2021-05-04 18:27:26 -04:00
Ian Goldberg b0290f5480 Complete the redeem invitation protocol 2021-05-04 17:48:40 -04:00
Ian Goldberg dd505ccfd7 The request message of the redeem invitation protocol 2021-05-04 15:48:11 -04:00
Ian Goldberg 8b517aa4c8 Complete the issue invitation protocol 2021-05-04 14:22:51 -04:00
Ian Goldberg a6d98dde73 The response message of the issue invitation protocol 2021-05-04 12:03:22 -04:00
Ian Goldberg d924b98060 The request message of the issue invitation protocol 2021-05-03 19:06:05 -04:00
Ian Goldberg 654208769f Up the max level to 4 and add the ZKP for the max number of blockages allowed in the level up protocol 2021-05-03 15:00:54 -04:00
Ian Goldberg 088071571a Change the invites_issued attribute of the Lox credential to just count blockages instead 2021-05-03 14:27:11 -04:00
Ian Goldberg 86cd2f54d7 More Rust cleanups 2021-05-03 14:14:31 -04:00
Ian Goldberg 15e9a1a72a Remove noop migration credentials 2021-05-03 14:13:13 -04:00
Ian Goldberg ecef59392b Fix the rust in a couple of places 2021-05-03 11:44:42 -04:00
Ian Goldberg fd73286e78 Complete the level upgrade protocol 2021-05-02 21:45:15 -04:00
Ian Goldberg aa097dc447 Change the policy for invites_remaining in the level up protocol
Before, the number of invitations at the new level were _added_ to a
user's credential.  Now, it _replaces_ the old value.
2021-05-02 18:10:59 -04:00
Ian Goldberg f7b3d242bb The request message of the level upgrade protocol 2021-05-01 22:26:13 -04:00
Ian Goldberg 5bfbccf193 Check the MACs on the Bucket Reachability credentials in the tests 2021-05-01 17:19:34 -04:00
Ian Goldberg ba13545b3c Create Bucket Reachability credentials and put them in buckets as appropriate 2021-05-01 17:13:40 -04:00