commit 2783933bf9935b6a7ab4ce97386887865a45589a Author: David Fifield david@bamsoftware.com Date: Tue Nov 28 02:05:58 2017 +0000
Add David's script for running an external meek client. --- scripts/externalize-pt-client | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/scripts/externalize-pt-client b/scripts/externalize-pt-client new file mode 100755 index 0000000..bbe01c6 --- /dev/null +++ b/scripts/externalize-pt-client @@ -0,0 +1,12 @@ +#!/bin/bash +set -e +CMDLINE="${@:?need a meek-client command line}" +TRANSPORTS=meek +# This could be controlled by a command-line arg. +PORT=10000 +TOR_PT_MANAGED_TRANSPORT_VER=1 \ + TOR_PT_CLIENT_TRANSPORTS="$TRANSPORTS" $CMDLINE \ + | sed -n -u -e '/^CMETHOD /{s/^.*127.0.0.1://;p}' | while read pt_port; do + echo "forwarding port $PORT -> $pt_port" + socat -v -v TCP-LISTEN:$PORT,fork,reuseaddr TCP-CONNECT:127.0.0.1:$pt_port & +done
tor-commits@lists.torproject.org