diff --git a/Cargo.lock b/Cargo.lock index 4466889..c427035 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1351,6 +1351,7 @@ name = "quic_demo" version = "0.1.0" dependencies = [ "anyhow", + "base64", "futures-util", "quinn", "rcgen", diff --git a/prototypes/quic_demo/Cargo.toml b/prototypes/quic_demo/Cargo.toml index 6a47464..87a9e0b 100644 --- a/prototypes/quic_demo/Cargo.toml +++ b/prototypes/quic_demo/Cargo.toml @@ -8,6 +8,7 @@ edition = "2018" [dependencies] anyhow = "1.0.38" +base64 = "0.13.0" futures-util = "0.3.9" quinn = "0.7.2" rcgen = "0.8.11" diff --git a/prototypes/quic_demo/build_app_package.bash b/prototypes/quic_demo/build_app_package.bash index 9322ba2..6260846 100755 --- a/prototypes/quic_demo/build_app_package.bash +++ b/prototypes/quic_demo/build_app_package.bash @@ -12,7 +12,9 @@ pushd ../../ git archive --format=tar "$GIT_COMMIT" | sudo docker build -f prototypes/quic_demo/Dockerfile -t "$DOCKER_TAG" --build-arg "git_version=$GIT_COMMIT" - popd -sudo docker run --rm "$DOCKER_TAG" tar -c \ +sudo docker run --rm "$DOCKER_TAG" \ +tar -c \ +app \ quic_demo_relay_server \ | gzip > "app_packages/ptth_quic_relay_$GIT_COMMIT_SHORT.tar.gz" diff --git a/prototypes/quic_demo/src/bin/quic_demo_relay_server.rs b/prototypes/quic_demo/src/bin/quic_demo_relay_server.rs index 8230553..6ab9876 100644 --- a/prototypes/quic_demo/src/bin/quic_demo_relay_server.rs +++ b/prototypes/quic_demo/src/bin/quic_demo_relay_server.rs @@ -16,6 +16,7 @@ async fn main () -> anyhow::Result <()> { let listen_addr = opt.listen_addr.unwrap_or_else (|| String::from ("0.0.0.0:30380")).parse ()?; let (mut incoming, server_cert) = make_server_endpoint (listen_addr)?; + println! ("Base64 cert: {}", base64::encode (&server_cert)); tokio::fs::write ("quic_server.crt", &server_cert).await?; let relay_state = RelayState::default ();