📦 fix up stuff and dump cert to stdout as Base64
parent
1a74a792bc
commit
e6e8f9edf8
|
@ -1351,6 +1351,7 @@ name = "quic_demo"
|
|||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"base64",
|
||||
"futures-util",
|
||||
"quinn",
|
||||
"rcgen",
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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 ();
|
||||
|
|
Loading…
Reference in New Issue