diff --git a/docker/Dockerfile b/docker/Dockerfile index 2929c4feb176772c51f67001f8dfe4f931cce03e..71f5a6c9cd097c93d4ec658ee245a7564c5396aa 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -35,4 +35,4 @@ FROM gcr.io/distroless/cc-debian10 COPY --from=build /usr/local/bin/client /usr/local/bin/server /usr/local/bin/ COPY --from=build /etc/mime.types /etc/ -CMD ["/usr/local/bin/client"] +ENTRYPOINT [ "./run_endpoint.sh" ] diff --git a/interop/Dockerfile b/interop/Dockerfile index 6d7ce34fbab707dd916228c836f4980e29208edd..d5030caa704b944446ef45493ff8269bb8044f03 100644 --- a/interop/Dockerfile +++ b/interop/Dockerfile @@ -27,5 +27,7 @@ RUN apt-get update && \ COPY run_endpoint.sh . COPY server.key server.crt /etc/ngtcp2/ +RUN mkdir /logs +RUN mkdir /www RUN chmod +x run_endpoint.sh ENTRYPOINT [ "./run_endpoint.sh" ] diff --git a/interop/run_endpoint.sh b/interop/run_endpoint.sh index 3a8a19fb6abe9aea92fb5e4589322e288326a5e2..b44ae8a09c1f67c809ea843f72b25043a3126644 100644 --- a/interop/run_endpoint.sh +++ b/interop/run_endpoint.sh @@ -1,70 +1,71 @@ #!/bin/bash # Set up the routing needed for the simulation -/setup.sh +#/setup.sh # The following variables are available for use: # - ROLE contains the role of this execution context, client or server # - SERVER_PARAMS contains user-supplied command line parameters # - CLIENT_PARAMS contains user-supplied command line parameters -case $TESTCASE in - versionnegotiation|handshake|transfer|retry|resumption|http3|multiconnect|zerortt|chacha20) - : - ;; - *) - exit 127 - ;; -esac +#case $TESTCASE in +# versionnegotiation|handshake|transfer|retry|resumption|http3|multiconnect|zerortt|chacha20) +# : +# ;; +# *) +# exit 127 +# ;; +#esac -LOG=/logs/log.txt - -if [ "$ROLE" == "client" ]; then - # Wait for the simulator to start up. - /wait-for-it.sh sim:57832 -s -t 30 - if [ "$TESTCASE" == "http3" ]; then - CLIENT_BIN="/usr/local/bin/client" - else - CLIENT_BIN="/usr/local/bin/h09client" - fi - CLIENT_ARGS="server 443 --download /downloads -s --no-quic-dump --no-http-dump --exit-on-all-streams-close --qlog-dir $QLOGDIR" - if [ "$TESTCASE" == "versionnegotiation" ]; then - CLIENT_ARGS="$CLIENT_ARGS -v 0xaaaaaaaa" - fi - if [ "$TESTCASE" == "chacha20" ]; then - CLIENT_ARGS="$CLIENT_ARGS --ciphers=TLS_CHACHA20_POLY1305_SHA256" - fi - if [ "$TESTCASE" == "resumption" ] || [ "$TESTCASE" == "zerortt" ]; then - CLIENT_ARGS="$CLIENT_ARGS --session-file session.txt --tp-file tp.txt" - if [ "$TESTCASE" == "resumption" ]; then - CLIENT_ARGS="$CLIENT_ARGS --disable-early-data" - fi - REQS=($REQUESTS) - REQUESTS=${REQS[0]} - $CLIENT_BIN $CLIENT_ARGS $REQUESTS $CLIENT_PARAMS &> $LOG - REQUESTS=${REQS[@]:1} - $CLIENT_BIN $CLIENT_ARGS $REQUESTS $CLIENT_PARAMS &>> $LOG - elif [ "$TESTCASE" == "multiconnect" ]; then - CLIENT_ARGS="$CLIENT_ARGS --timeout=180s" - for REQ in $REQUESTS; do - echo "multiconnect REQ: $REQ" >> $LOG - $CLIENT_BIN $CLIENT_ARGS $REQ $CLIENT_PARAMS &>> $LOG - done - else - $CLIENT_BIN $CLIENT_ARGS $REQUESTS $CLIENT_PARAMS &> $LOG - fi -elif [ "$ROLE" == "server" ]; then - if [ "$TESTCASE" == "http3" ]; then - SERVER_BIN="/usr/local/bin/server" - else - SERVER_BIN="/usr/local/bin/h09server" - fi - SERVER_ARGS="0.0.0.0 443 /etc/ngtcp2/server.key /etc/ngtcp2/server.crt -s -d /www --qlog-dir $QLOGDIR" - if [ "$TESTCASE" == "retry" ]; then - SERVER_ARGS="$SERVER_ARGS -V" - elif [ "$TESTCASE" == "multiconnect" ]; then - SERVER_ARGS="$SERVER_ARGS --timeout=180s" - fi - - $SERVER_BIN $SERVER_ARGS $SERVER_PARAMS &> $LOG -fi +#if [ "$ROLE" == "client" ]; then +# # Wait for the simulator to start up. +# /wait-for-it.sh sim:57832 -s -t 30 +# if [ "$TESTCASE" == "http3" ]; then +# CLIENT_BIN="/usr/local/bin/client" +# else +# CLIENT_BIN="/usr/local/bin/h09client" +# fi +# CLIENT_ARGS="server 443 --download /downloads -s --no-quic-dump --no-http-dump --exit-on-all-streams-close --qlog-dir $QLOGDIR" +# if [ "$TESTCASE" == "versionnegotiation" ]; then +# CLIENT_ARGS="$CLIENT_ARGS -v 0xaaaaaaaa" +# fi +# if [ "$TESTCASE" == "chacha20" ]; then +# CLIENT_ARGS="$CLIENT_ARGS --ciphers=TLS_CHACHA20_POLY1305_SHA256" +# fi +# if [ "$TESTCASE" == "resumption" ] || [ "$TESTCASE" == "zerortt" ]; then +# CLIENT_ARGS="$CLIENT_ARGS --session-file session.txt --tp-file tp.txt" +# if [ "$TESTCASE" == "resumption" ]; then +# CLIENT_ARGS="$CLIENT_ARGS --disable-early-data" +# fi +# REQS=($REQUESTS) +# REQUESTS=${REQS[0]} +# $CLIENT_BIN $CLIENT_ARGS $REQUESTS $CLIENT_PARAMS &> $LOG +# REQUESTS=${REQS[@]:1} +# $CLIENT_BIN $CLIENT_ARGS $REQUESTS $CLIENT_PARAMS &>> $LOG +# elif [ "$TESTCASE" == "multiconnect" ]; then +# CLIENT_ARGS="$CLIENT_ARGS --timeout=180s" +# for REQ in $REQUESTS; do +# echo "multiconnect REQ: $REQ" >> $LOG +# $CLIENT_BIN $CLIENT_ARGS $REQ $CLIENT_PARAMS &>> $LOG +# done +# else +# $CLIENT_BIN $CLIENT_ARGS $REQUESTS $CLIENT_PARAMS &> $LOG +# fi +#elif [ "$ROLE" == "server" ]; then +# if [ "$TESTCASE" == "http3" ]; then +# SERVER_BIN="/usr/local/bin/server" +# else +# SERVER_BIN="/usr/local/bin/h09server" +# fi +# SERVER_ARGS="0.0.0.0 443 /etc/ngtcp2/server.key /etc/ngtcp2/server.crt -s -d /www --qlog-dir $QLOGDIR" +# if [ "$TESTCASE" == "retry" ]; then +# SERVER_ARGS="$SERVER_ARGS -V" +# elif [ "$TESTCASE" == "multiconnect" ]; then +# SERVER_ARGS="$SERVER_ARGS --timeout=180s" +# fi +# +# $SERVER_BIN $SERVER_ARGS $SERVER_PARAMS &> $LOG +#fi +SERVER_BIN="/usr/local/bin/server" +SERVER_ARGS="0.0.0.0 4433 /etc/ngtcp2/server.key /etc/ngtcp2/server.crt -s -d /www --qlog-dir /logs" +$SERVER_BIN $SERVER_ARGS > /tmp/server.out