3 CMDLINE
="${@:?need a meek-client command line}"
5 # This could be controlled by a command-line arg.
7 TOR_PT_MANAGED_TRANSPORT_VER
=1 \
8 TOR_PT_CLIENT_TRANSPORTS
="$TRANSPORTS" $CMDLINE \
9 |
sed -n -u -e '/^CMETHOD /{s/^.*127\.0\.0\.1://;p}' |
while read pt_port
; do
10 echo "forwarding port $PORT -> $pt_port"
11 socat
-v -v TCP-LISTEN
:$PORT,fork
,reuseaddr TCP-CONNECT
:127.0.0.1:$pt_port &