-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrun_endpoint.sh
executable file
·45 lines (36 loc) · 1 KB
/
run_endpoint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
set -eu
# set up the routing needed for the simulation
/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|keyupdate|v2)
:
;;
*)
exit 127
;;
esac
LOG=/logs/log.txt
if [ "$ROLE" == "client" ]; then
exit 127
elif [ "$ROLE" == "server" ]; then
echo "starting lighttpd server"
lighttpd -f /lighttpd.cfg
cp /certs/cert.pem /tmp/
cp /certs/priv.key /tmp/cert.pem.key
export LD_LIBRARY_PATH=/usr/local/lib
echo "haproxy version $(haproxy -v)"
echo "starting haproxy..."
case $TESTCASE in
retry)
HAP_EXTRA_ARGS="quic-force-retry" /usr/local/sbin/haproxy -d -dM -f /quic.cfg &> $LOG
;;
*)
HAP_EXTRA_ARGS="" /usr/local/sbin/haproxy -d -dM -f /quic.cfg &> $LOG
;;
esac
fi