Skip to content

Commit

Permalink
Merge branch 'main' into feat-more-ecn
Browse files Browse the repository at this point in the history
  • Loading branch information
larseggert authored Apr 9, 2024
2 parents 1999874 + 166b84c commit 0c8c709
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ resolver = "2"
homepage = "https://github.com/mozilla/neqo/"
repository = "https://github.com/mozilla/neqo/"
authors = ["The Neqo Authors <[email protected]>"]
version = "0.7.3"
version = "0.7.4"
# Keep in sync with `.rustfmt.toml` `edition`.
edition = "2021"
license = "MIT OR Apache-2.0"
Expand Down
41 changes: 41 additions & 0 deletions test/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#! /usr/bin/env bash

# This script builds the client and server binaries and runs them in a tmux
# session side-by-side. The client connects to the server and the server
# responds with a simple HTTP response. The client and server are run with
# verbose logging and the qlog output is stored in a temporary directory. The
# script also runs tcpdump to capture the packets exchanged between the client
# and server. The script uses tmux to create a split terminal window to display
# the qlog output and the packet capture.

set -e

cargo build --bin neqo-client --bin neqo-server

tmp=$(mktemp -d)
addr=127.0.0.1
port=4433
path=/20000
flags="--verbose --qlog-dir $tmp --use-old-http --alpn hq-interop --quic-version 1"
if [ "$(uname -s)" != "Linux" ]; then
iface=lo0
else
iface=lo
fi

client="./target/debug/neqo-client $flags --output-dir $tmp --stats https://$addr:$port$path"
server="SSLKEYLOGFILE=$tmp/test.tlskey ./target/debug/neqo-server $flags $addr:$port"

tcpdump -U -i "$iface" -w "$tmp/test.pcap" host $addr and port $port >/dev/null 2>&1 &
tcpdump_pid=$!

tmux -CC \
set-option -g default-shell "$(which bash)" \; \
new-session "$client && kill -USR2 $tcpdump_pid && touch $tmp/done" \; \
split-window -h "$server" \; \
split-window -v -f "\
until [ -e $tmp/done ]; do sleep 1; done && \
tshark -r $tmp/test.pcap -o tls.keylog_file:$tmp/test.tlskey" \; \
set remain-on-exit on

# rm -rf "$tmp"

0 comments on commit 0c8c709

Please sign in to comment.