Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add possibility to specify OpenVPN device number when generating container config #7

Merged
merged 2 commits into from
May 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion bin/ovpn_genconfig
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ usage() {
echo " -m Set client MTU"
echo " -N Configure NAT to access external server network"
echo " -t Use TAP device (instead of TUN device)"
echo " -o Set the OpenVPN device number, e.g. pass 1 to create interface tun1. Default: 0"
echo " -T Encrypt packets with the given cipher algorithm instead of the default one (tls-cipher)."
echo " -z Enable comp-lzo compression."
echo " -B Start a network bridge for TAP mode and use \"server-bridge\" directive in OpenVPN server config;"
Expand Down Expand Up @@ -196,7 +197,7 @@ OVPN_BR_DHCP_END=''
[ -r "$OVPN_ENV" ] && source "$OVPN_ENV"

# Parse arguments
PARSED_ARGUMENTS=$(getopt -l "bridge-name:,bridge-eth-if:,bridge-eth-ip:,bridge-eth-subnet:,bridge-eth-broadcast:,bridge-eth-gateway:,bridge-eth-mac:,bridge-dhcp-start:,bridge-dhcp-end:" -o ":a:e:E:C:T:r:s:du:bcp:n:k:DNm:f:tz2B" -- "$@")
PARSED_ARGUMENTS=$(getopt -l "bridge-name:,bridge-eth-if:,bridge-eth-ip:,bridge-eth-subnet:,bridge-eth-broadcast:,bridge-eth-gateway:,bridge-eth-mac:,bridge-dhcp-start:,bridge-dhcp-end:" -o ":a:e:E:C:T:r:s:du:bcp:n:k:DNm:f:o:tz2B" -- "$@")
VALID_ARGUMENTS=$?
if [ "$VALID_ARGUMENTS" != "0" ]; then
usage
Expand Down Expand Up @@ -289,6 +290,10 @@ do
-t)
OVPN_DEVICE="tap"
;;
-o)
shift
OVPN_DEVICEN="$1"
;;
-z)
OVPN_COMP_LZO=1
;;
Expand Down