Compare commits
No commits in common. "c5aadbe632c6cb34cbe6a9e5f2b9ab66f36ff6b9" and "f7bd179bba17731b0a5c15ed93cd85532604f8a1" have entirely different histories.
c5aadbe632
...
f7bd179bba
|
@ -1332,7 +1332,6 @@ dependencies = [
|
||||||
"hyper",
|
"hyper",
|
||||||
"quinn",
|
"quinn",
|
||||||
"rcgen",
|
"rcgen",
|
||||||
"reqwest",
|
|
||||||
"rmp-serde",
|
"rmp-serde",
|
||||||
"structopt",
|
"structopt",
|
||||||
"tokio",
|
"tokio",
|
||||||
|
|
|
@ -15,19 +15,15 @@ export LC_ALL="C"
|
||||||
TEMP_GIBBERISH="ptth_server_build_BIHWLQXQ"
|
TEMP_GIBBERISH="ptth_server_build_BIHWLQXQ"
|
||||||
DEST="$TEMP_GIBBERISH/ptth"
|
DEST="$TEMP_GIBBERISH/ptth"
|
||||||
|
|
||||||
rm -rf "$TEMP_GIBBERISH"
|
|
||||||
|
|
||||||
mkdir "$TEMP_GIBBERISH"
|
mkdir "$TEMP_GIBBERISH"
|
||||||
mkdir "$DEST"
|
mkdir "$DEST"
|
||||||
|
|
||||||
cargo build --release -p ptth_server
|
cargo build --release -p ptth_server
|
||||||
cargo build --release -p quic_demo --bin quic_demo_end_server
|
|
||||||
|
|
||||||
mkdir -p "$DEST/handlebars/server"
|
mkdir -p "$DEST/handlebars/server"
|
||||||
rsync -r handlebars/server/ "$DEST/handlebars/server/"
|
rsync -r handlebars/server/ "$DEST/handlebars/server/"
|
||||||
|
|
||||||
cp target/release/ptth_server "$DEST/"
|
cp target/release/ptth_server "$DEST/ptth_server"
|
||||||
cp target/release/quic_demo_end_server "$DEST/"
|
|
||||||
|
|
||||||
(
|
(
|
||||||
cd "$TEMP_GIBBERISH" || exit
|
cd "$TEMP_GIBBERISH" || exit
|
||||||
|
|
|
@ -15,7 +15,6 @@ futures-util = "0.3.9"
|
||||||
hyper = { version = "0.14.4", features = ["http1", "server", "stream", "tcp"] }
|
hyper = { version = "0.14.4", features = ["http1", "server", "stream", "tcp"] }
|
||||||
quinn = "0.7.2"
|
quinn = "0.7.2"
|
||||||
rcgen = "0.8.11"
|
rcgen = "0.8.11"
|
||||||
reqwest = "0.11.4"
|
|
||||||
rmp-serde = "0.15.5"
|
rmp-serde = "0.15.5"
|
||||||
structopt = "0.3.20"
|
structopt = "0.3.20"
|
||||||
tokio = { version = "1.8.1", features = ["full"] }
|
tokio = { version = "1.8.1", features = ["full"] }
|
||||||
|
|
|
@ -12,8 +12,6 @@ struct Opt {
|
||||||
server_id: Option <PeerId>,
|
server_id: Option <PeerId>,
|
||||||
#[structopt (long)]
|
#[structopt (long)]
|
||||||
debug_echo: bool,
|
debug_echo: bool,
|
||||||
#[structopt (long)]
|
|
||||||
cert_url: Option <String>,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
|
@ -22,10 +20,7 @@ async fn main () -> anyhow::Result <()> {
|
||||||
|
|
||||||
let opt = Arc::new (Opt::from_args ());
|
let opt = Arc::new (Opt::from_args ());
|
||||||
|
|
||||||
let server_cert = match opt.cert_url.as_ref () {
|
let server_cert = tokio::fs::read ("quic_server.crt").await?;
|
||||||
Some (url) => reqwest::get (url).await?.bytes ().await?,
|
|
||||||
None => tokio::fs::read ("quic_server.crt").await?.into (),
|
|
||||||
};
|
|
||||||
let relay_addr = opt.relay_addr.clone ().unwrap_or_else (|| String::from ("127.0.0.1:30380")).parse ()?;
|
let relay_addr = opt.relay_addr.clone ().unwrap_or_else (|| String::from ("127.0.0.1:30380")).parse ()?;
|
||||||
let endpoint = make_client_endpoint ("0.0.0.0:0".parse ()?, &[&server_cert])?;
|
let endpoint = make_client_endpoint ("0.0.0.0:0".parse ()?, &[&server_cert])?;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue