Spoof a lox authority for testing
It would be very useful if we could run some fake lox authority with full control to be able to test lox features in Tor Browser. In particular, we would want control over:
- Redeeming an invite.
- Generating an invite.
- Forcing upgrades.
- Forcing blockages.
- Changing bridges.
- Changing variables (encryption tables, pub keys, constants).
Right now, it is very difficult to test these because when you get an invite it usually takes 30 days to gain a level, and you only get invites at level 2, which can also run out.
This would also be useful for automated testing.
In principle we could have a remote service which we use instead, but I'm not sure how viable this would be for each dev to have their own instance and to use this in automated tests. Otherwise we could hijack Lox.#makeRequest
to spoof the server response, maybe it is not that easy to mimic an actual lox authority, but we could just have a selection of hard-coded responses to certain queries.
@cohosh or @onyinyang any ideas on what is feasible?