Skip to content

Commit

Permalink
Integrate proxy v2 into SDK
Browse files Browse the repository at this point in the history
The SDK will now unconditionally use proxy v2: in development mode,
it'll shell out directly, while production mode will invoke it over
qrexec. The dev `./run.sh` script will compile the proxy so it's ready
for use before the client starts up.

New typed dataclasses represent the two types of responses that can be
returned. No user-facting changes are happening at this stage, but this
will enable future client features.

The union return of send_json_request() means that we need instanceof
assertions to make mypy happy.

One minor logic bug in API.get_submission() was fixed in the case that
no request is made (an undefined exception would've been raised previously).
  • Loading branch information
legoktm authored and micahflee committed May 16, 2024
1 parent 65cba4c commit 7da359e
Show file tree
Hide file tree
Showing 3 changed files with 214 additions and 264 deletions.
5 changes: 4 additions & 1 deletion client/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ echo ""

cleanup

gpg --allow-secret-key-import --import tests/files/securedrop.gpg.asc &
gpg --allow-secret-key-import --import tests/files/securedrop.gpg.asc

echo "Building proxy..."
(cd ../proxy && cargo build)

# create the database and config for local testing
poetry run python create_dev_data.py "$SDC_HOME" &
Expand Down
Loading

0 comments on commit 7da359e

Please sign in to comment.