openvpn-on-client-connect.sh 297 Bytes
Newer Older
1 2 3 4 5 6
#!/usr/bin/env bash

curl 'http://127.0.0.1:3000/api/onConnect/' -X POST \
    --data-urlencode "cn=${common_name}" \
    --data-urlencode "vpnIp=${ifconfig_pool_remote_ip}" \
    --data-urlencode "ip=${trusted_ip}" \
7
    --data-urlencode "token@/run/admin-token" \
8
    --max-time 15 \
9
    --fail