24 lines
528 B
Bash
24 lines
528 B
Bash
#! /bin/bash
|
|
|
|
addr="${1:-${addr:-"192.168.0.86:8080/vpntor"}}"
|
|
pport="${2:-${pport:-2018}}"
|
|
|
|
if ((pport==2018)); then
|
|
prox="${3:-${prox:-https://localhost}}"
|
|
else
|
|
prox="${3:-${prox:-http://localhost}}"
|
|
fi
|
|
|
|
if [ "$badcert" ]; then
|
|
client="--proxy-key ./badstunclient.key --proxy-cert ./badstunclient.crt"
|
|
elif [ -z "$nocert" ]; then
|
|
client="--proxy-key ./stunclient.key --proxy-cert ./stunclient.crt"
|
|
fi
|
|
|
|
curl \ #-v \
|
|
--proxy-cacert ./stunserver.crt \
|
|
$client \
|
|
-U breel:ok \
|
|
-x $prox:$pport \
|
|
$addr
|