Add advanced configuration (raw openvpn conf edition)

This commit is contained in:
Julien VAUBOURG
2014-11-20 20:02:43 +01:00
parent a7eac12c27
commit 3aae0029cb
10 changed files with 70 additions and 27 deletions

View File

@@ -292,8 +292,12 @@ case "${1}" in
status)
exitcode=0
echo "[INFO] Autodetected internet interface: ${new_wired_device} (last start: ${old_wired_device})"
echo "[INFO] Autodetected IPv6 address for the VPN server: ${new_server_ip6} (last start: ${old_server_ip6})"
if has_ip6delegatedprefix; then
echo "[INFO] IPv6 delegated prefix found"
echo "[INFO] IPv6 address computed from the delegated prefix: ${ynh_ip6_addr}"
if ! has_hotspot_app; then
echo "[INFO] No Hotspot app detected"
@@ -314,6 +318,7 @@ case "${1}" in
if has_nativeip6; then
echo "[INFO] Native IPv6 detected"
echo "[INFO] Autodetected native IPv6 gateway: ${new_ip6_gw} (last start: ${old_ip6_gw})"
if is_serverip6route_set "${new_server_ip6}"; then
echo "[OK] IPv6 server route correctly set"

View File

@@ -1,7 +1,12 @@
remote <TPL:SERVER_NAME>
# [WARN] Edit this raw configuration ONLY IF YOU KNOW what
# you do!
# [WARN] Continue to use the placeholders <TPL:*> and keep
# update their value on the web admin (they are not
# only used for this file).
# proto [ udp6 | udp | tcp6-client | tcp-client ]
remote <TPL:SERVER_NAME>
proto <TPL:PROTO>
port <TPL:SERVER_PORT>
pull
nobind
@@ -9,9 +14,8 @@ dev tun
tun-ipv6
keepalive 10 30
comp-lzo adaptive
port <TPL:SERVER_PORT>
# Auth by credentials
# Authentication by login
<TPL:LOGIN_COMMENT>auth-user-pass /etc/openvpn/keys/credentials
# UDP only
@@ -20,9 +24,9 @@ port <TPL:SERVER_PORT>
# TLS
tls-client
remote-cert-tls server
ca /etc/openvpn/keys/ca-server.crt
<TPL:CERT_COMMENT>cert /etc/openvpn/keys/user.crt
<TPL:CERT_COMMENT>key /etc/openvpn/keys/user.key
ca /etc/openvpn/keys/ca-server.crt
# Logs
verb 3