Skip to content

Commit

Permalink
openvpn.sh tweak the config generator options
Browse files Browse the repository at this point in the history
  • Loading branch information
David Personette committed Jan 30, 2018
1 parent f4d629f commit ce28002
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions openvpn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,10 @@ vpn() { local server="$1" user="$2" pass="$3" port="${4:-1194}" i \
done
[[ $server =~ : ]] && echo "remote-random" >>$conf
echo "resolv-retry infinite" >>$conf
echo "keepalive 10 30" >>$conf
echo "keepalive 10 60" >>$conf
echo "nobind" >>$conf
echo "persist-key" >>$conf
echo "persist-tun" >>$conf
[[ "${CIPHER:-""}" ]] && echo "cipher $CIPHER" >>$conf
[[ "${AUTH:-""}" ]] && echo "auth $AUTH" >>$conf
echo "tls-client" >>$conf
Expand All @@ -137,9 +138,11 @@ vpn() { local server="$1" user="$2" pass="$3" port="${4:-1194}" i \
echo "comp-lzo" >>$conf
echo "verb 1" >>$conf
echo "reneg-sec 0" >>$conf
echo "redirect-gateway def1" >>$conf
echo "disable-occ" >>$conf
echo "fast-io" >>$conf
echo "ca $cert" >>$conf
[[ $(wc -w <<< $pem) -eq 1 ]] && echo "crl-verify $pem" >>$conf
echo "redirect-gateway def1" >>$conf

echo "$user" >$auth
echo "$pass" >>$auth
Expand Down

0 comments on commit ce28002

Please sign in to comment.