Commit a07ac987 authored by Girish Ramakrishnan's avatar Girish Ramakrishnan

Add UDP support

parent 1a32155e
......@@ -33,8 +33,13 @@
"tcpPorts": {
"VPN_TCP_PORT": {
"title": "VPN TCP port",
"description": "Port over which OpenVPN server listens",
"description": "TCP Port over which OpenVPN server listens",
"defaultValue": 7494
},
"VPN_UDP_PORT": {
"title": "VPN UDP port",
"description": "UDP Port over which OpenVPN server listens",
"defaultValue": 7194
}
},
"mediaLinks": [
......
#!/bin/bash
echo "# Server TCP/${VPN_TCP_PORT:?}
proto="tcp"
proto_port="${VPN_TCP_PORT:?}"
if [[ -n "${VPN_UDP_PORT:-}" ]]; then
proto="udp"
proto_port="${VPN_UDP_PORT:?}"
fi
echo "# Server TCP/${VPN_TCP_PORT:?} UDP/${VPN_UDP_PORT:?}
mode server
tls-server
proto tcp
port ${VPN_TCP_PORT:?}
proto ${proto}
port ${proto_port}
dev tun
dev-node /app/code/net-tun
# Keys and certificates
......
......@@ -54,8 +54,8 @@ const clientConfFile = ({ca, cert, key, tlsAuth} = {}) => `# Client
client
tls-client
dev tun
proto tcp-client
remote ${process.env.APP_DOMAIN} ${process.env.VPN_TCP_PORT}
proto ${process.env.VPN_UDP_PORT ? 'udp-client' : 'tcp-client'}
remote ${process.env.APP_DOMAIN} ${process.env.VPN_UDP_PORT || process.env.VPN_TCP_PORT}
resolv-retry infinite
cipher AES-256-CBC
auth SHA256
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment