onyinyang
0e28602812
Update wasm for base64 encoded invite
2024-04-17 17:38:38 -04:00
onyinyang
0a12b0fc52
Serialize, Deserialize invite as base64 string
...
`loxinvite` is concatenated with an underscore
to try to prevent copy errors from telegram
2024-04-17 17:35:49 -04:00
onyinyang
d0407e9e5d
Update lox-context to handle Removed bridges, add test for spare removals
2024-04-16 16:47:14 -04:00
onyinyang
d881cf2fec
Remove spare and unallocated bridges rather than replacing them
2024-04-16 16:45:07 -04:00
onyinyang
b771a40a3d
Fix deadlock error
2024-04-16 16:45:07 -04:00
onyinyang
dae68efaae
Clear extra_bridges in distributor after sync, tidy up print statements
2024-04-16 16:45:07 -04:00
onyinyang
76bb8757f5
Add basic tests for bridgetable sync with rdsys
2024-04-16 16:45:03 -04:00
onyinyang
5f34f49d17
Formatting changes from cargo fmt
2024-04-16 16:05:49 -04:00
onyinyang
5127762c2b
Add fake_resource_state crate for lox-context unit testing
2024-04-16 16:04:57 -04:00
onyinyang
cee2510324
Move random Bridgeline generator function to lox_utils
2024-04-15 18:52:01 -04: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
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
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
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
onyinyang
ed7c94b912
Send Response as json, errors with OK Status Code
2024-01-09 12:25:03 -05: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
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
c8b6bb9fdd
Formatting and clippy changes
2023-12-19 20:02:12 +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
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
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
onyinyang
1ed629e233
Add more sensible process for db write_context testing
2023-11-14 17:30:45 +00:00
onyinyang
66f560eb08
Remove unneeded fields from bridgeline and reduce BRIDGE_BYTES
2023-11-14 17:30:45 +00:00
onyinyang
cb159405a3
Add watched_blockages to config file and improve naming
2023-11-14 17:30:45 +00:00
onyinyang
ec7ba4e343
Add test and bug fix
2023-11-14 17:30:45 +00:00
onyinyang
5d7122b555
Add preliminary blockage handling functionality
2023-11-14 17:30:45 +00:00
onyinyang
73b04b9a19
Fixed up inline comments and README for Lox Distributor
2023-11-07 00:15:26 -05:00
onyinyang
f7fc44cbb1
Fix up metrics for invites distributed
2023-10-31 11:15:47 -04:00
onyinyang
9ac2df642a
Add new bridges when first populated
2023-10-30 15:21:43 -04:00
onyinyang
b1d8ce7d8f
Update metrics to count bridges
2023-10-30 15:21:40 -04:00
onyinyang
2597cb53f7
Add prometheus http server
2023-10-30 15:20:23 -04:00
onyinyang
0edc2a3ac3
Add metrics setup
2023-10-30 15:20:20 -04:00
onyinyang
ba70b1b4d4
Add a MAX_DAILY_BRIDGES to limit invites per day
2023-10-30 15:17:08 -04:00
onyinyang
5e1a2d8c6d
Fix lox-wasm dependencies
2023-10-23 14:04:00 -04:00
onyinyang
794f80ab11
Fix bug in DupFilter that breaks serialize/deserialize
2023-10-23 13:55:19 -04:00
onyinyang
4f7b96a603
Fix up some minor issues + fix bug in context sync
2023-10-18 12:09:46 -04:00
onyinyang
89fb0fbf4b
Add handling for unaccounted for bridges
2023-10-18 12:08:15 -04:00
onyinyang
b6ff0c60e2
Update rdsys-api-backend and lox-distributor to match rdsys
2023-10-18 12:08:15 -04:00
onyinyang
8ebc4abc19
Minor formatting changes and last context read fix
2023-10-18 12:08:15 -04:00
onyinyang
a31ed0a4e5
Update output msg
2023-10-18 12:08:15 -04:00
onyinyang
25add69c4d
Add syncing functionality
2023-10-18 12:08:15 -04:00
onyinyang
6cc8033051
Reconfiguring lox distributor handling of rdsys resources
2023-10-18 12:08:15 -04:00
onyinyang
be0d026fe8
Cleanup and add syncing of resources
2023-10-18 12:08:15 -04:00
onyinyang
d4c54e969c
Reconfigure distributor to handle static rdsys req
2023-10-18 12:08:14 -04:00