# Install needed tools
RUN apt-get update && apt-get install -y \
git make gcc perl cmake build-essential \
- autoconf libtool pkg-config libpsl-dev
+ autoconf libtool pkg-config libpsl-dev && \
+ apt-get clean
WORKDIR /
make -j 4 && make install && cp test/quic-openssl-docker/hq-interop/quic-hq-interop /usr/local/bin && \
cp test/quic-openssl-docker/hq-interop/quic-hq-interop-server /usr/local/bin && \
cp demos/http3/ossl-nghttp3-demo-server /usr/local/bin && \
+ cp demos/http3/ossl-nghttp3-demo /usr/local/bin && \
rm -rf /openssl
-# Build curl
-# Note we have to build from commit 5a4cd758634d194ed280112a53e5ce5dc258b77a
-# or earlier here, as curl has dropped quic support with openssl
-RUN git clone https://github.com/curl/curl.git && \
- cd curl && \
- git checkout 5a4cd758634d194ed280112a53e5ce5dc258b77a && \
- autoreconf -fi && ./configure --with-openssl-quic --with-openssl --with-nghttp3 --prefix=/usr && \
- make -j 4 && \
- make install && \
- rm -rf /curl
-
# copy run script and run it
COPY run_endpoint.sh .
RUN chmod +x run_endpoint.sh
-RUN apt-get clean
ENTRYPOINT [ "./run_endpoint.sh" ]
# - SERVER_PARAMS contains user-supplied command line parameters
# - CLIENT_PARAMS contains user-supplied command line parameters
-generate_outputs_http3() {
- for i in $REQUESTS
- do
- OUTFILE=$(basename $i)
- echo -e "--http3-only\n-o /downloads/$OUTFILE\n--url $i" >> $CURLRC
- echo "--next" >> $CURLRC
- done
- # Remove the last --next
- head -n -1 $CURLRC > $CURLRC.tmp
- mv $CURLRC.tmp $CURLRC
-}
-
-dump_curlrc() {
- echo "Using curlrc:"
- cat $CURLRC
-}
-
if [ "$ROLE" == "client" ]; then
# Wait for the simulator to start up.
echo "Waiting for simulator"
case "$TESTCASE" in
"http3")
- echo -e "--verbose\n--parallel" >> $CURLRC
- generate_outputs_http3
- dump_curlrc
- SSL_CERT_FILE=/certs/ca.pem curl --config $CURLRC || exit 1
+ HOSTNAME=none
+ for req in $REQUESTS
+ do
+ OUTFILE=$(basename $req)
+ if [ "$HOSTNAME" == "none" ]
+ then
+ HOSTNAME=$(printf "%s\n" "$req" | sed -ne 's,^https://\([^/:]*\).*,\1,p')
+ HOSTPORT=$(printf "%s\n" "$req" | sed -ne 's,^https://[^:/]*:\([^/]*\).*,\1,p')
+ fi
+ echo "/$OUTFILE" >> ./reqfile.txt
+ done
+ cat ./reqfile.txt
+ SSL_CERT_FILE=/certs/ca.pem ossl-nghttp3-demo $HOSTNAME:$HOSTPORT ./reqfile.txt /downloads || exit 1
exit 0
;;
"handshake"|"transfer"|"retry"|"ipv6")