Skip to content

Commit bdeaff2

Browse files
authored
Merge pull request #161 from slamont/master
Add doc for extra config use and fixed unlikely unbound variable
2 parents 97f8677 + 3f3a4ea commit bdeaff2

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

bin/ovpn_genconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ done
226226
[ ${#TMP_DNS_SERVERS[@]} -gt 0 ] && OVPN_DNS_SERVERS=("${TMP_DNS_SERVERS[@]}")
227227

228228
# Server name is in the form "udp://vpn.example.com:1194"
229-
if [[ "$OVPN_SERVER_URL" =~ ^((udp|tcp)://)?([0-9a-zA-Z\.\-]+)(:([0-9]+))?$ ]]; then
229+
if [[ "${OVPN_SERVER_URL:-}" =~ ^((udp|tcp)://)?([0-9a-zA-Z\.\-]+)(:([0-9]+))?$ ]]; then
230230
OVPN_PROTO=${BASH_REMATCH[2]};
231231
OVPN_CN=${BASH_REMATCH[3]};
232232
OVPN_PORT=${BASH_REMATCH[5]};

docs/faqs.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@ If it was all in one container, an upgrade would require a few steps to extract
1515

1616
## How do I set up a split tunnel?
1717

18-
Split tunnels are configurations where only some of the traffic from a client goes to the VPN, with the remainder routed through the normal non-VPN interfaces. You'll want to disable a default route (-d) when you generate the configuration, but still use NAT (-N) to keep network address translation enabled.
18+
Split tunnels are configurations where only some of the traffic from a client goes to the VPN, with the remainder routed through the normal non-VPN interfaces. You'll want to disable a default route (-d) when you generate the configuration, but still use NAT (-N) to keep network address translation enabled.
1919

2020
ovpn_genconfig -N -d ...
21+
22+
## I need to add some extra configurations to openvpn.conf, How can I do that ?
23+
24+
You can pass multiple (**-e**) options to `ovpn_genconfig`. For example, if you need to add _'duplicate-cn'_ and _'topology subnet'_ to the server configuration you could do something like this:
25+
26+
ovpn_genconfig -e 'duplicate-cn' -e 'topology subnet' -u udp://VPN.SERVERNAME.COM

0 commit comments

Comments
 (0)