docker版openvpn,支持web管理。
openvpn安全与加密相关配置参考于openvpn-install。
客户端配置文件在web管理客户端里生成支持在线下载,默认启用账号验证可在管理VPN账号选择启用或者关闭。
-
安装docker-compose
curl -SL https://github.com/docker/compose/releases/download/v2.11.2/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose
-
创建docker-compose.yml
version: "3.9" services: openvpn: image: yyxx/openvpn cap_add: - NET_ADMIN ports: - "1194:1194/udp" - "8833:80" volumes: - ./data:/data - /etc/localtime:/etc/localtime:ro
-
初始化生成证书配置文件
docker-compose run --rm openvpn --init
-
运行openvpn
docker-compose up -d