commit | 34d806cef2f34876142e6b79138fa9b2a45aab88 | [log] [tgz] |
---|---|---|
author | Adrià Vilanova Martínez <me@avm99963.com> | Wed Dec 08 18:37:38 2021 +0100 |
committer | Adrià Vilanova Martínez <me@avm99963.com> | Wed Dec 08 18:37:38 2021 +0100 |
tree | 1d2ccbbd7907f398b9c6860f484e3de1c31c82c9 | |
parent | 559c253da6cdf257afe63d6315ef0ab1d65d8338 [diff] |
syncfeatures: add support for TLS Until now syncfeatures could only connect to insecure endpoints. This CL allows it to connect to gRPC endpoints with server-side TLS authentication. Bug: twpowertools:62 Change-Id: I1d0fd6bcf2aead47c152f66a10be538f6655ca7c
TWPT-server is the code for the TW Power Tools gRPC server and its frontend.
This repository is under active development, and is not ready yet for production.
To serve the frontend for development, follow these instructions:
docker-compose -f docker-compose.dev.yml up
to start the gRPC API, database and Envoy proxy (which will translate gRPC-Web <-> gRPC).docker exec -i twpt-server_db_1 mysql -u root twpt < schema/common.sql
and docker exec -i twpt-server_db_1 mysql -u root twpt < schema/kill-switch.sql
.docker exec -it twpt-server_db_1 mysql -u root twpt
and enter the following SQL sentence with your data to create the first authorized user: INSERT INTO KillSwitchAuthorizedUser (google_uid, email, access_level) VALUES ('', '{YOUR_EMAIL_ADDRESS}', 10);
.docker-compose -f docker-compose.dev.yml restart
.npm install
.make serve
.You can run the backend for development purposes by running go run .
in the //cmd/serve
folder. You may also build its docker image to allow it to interact with the frontend (since it needs Envy (the gRPC-Web proxy) to translate between gRPC and HTTP requests).
Use the docker-compose.yml
file instead of docker-compose.dev.yml
and follow steps 1-4 from the "frontend" section to spin up the backend.
For the frontend, run make deploy
in the //frontend
folder to deploy the frontend to Firebase.