地址:https://github.com/vx3r/wg-gen-web
docker-compose安装:
version: '3.6'
services:
wg-gen-web:
image: vx3r/wg-gen-web:latest
container_name: wg-gen-web
restart: unless-stopped
expose:
- "8080/tcp"
ports:
- 8080:8080
environment:
- WG_CONF_DIR=/data
- WG_INTERFACE_NAME=wg0.conf
- SMTP_HOST=smtp.exmail.qq.com
- SMTP_PORT=465
- SMTP_USERNAME=tom@gmail.com
- SMTP_PASSWORD=*************
- SMTP_FROM=tom@gmail.com
- OAUTH2_PROVIDER_NAME=fake
- WG_STATS_API=http://172.17.0.1:8182
#- OAUTH2_PROVIDER=https://github.com
#- OAUTH2_CLIENT_ID=******************
#- OAUTH2_CLIENT_SECRET=******************
#- OAUTH2_REDIRECT_URL=https://wg-gen-web-demo.127-0-0-1.fr
volumes:
- /etc/wireguard:/data
wg-json-api:
image: james/wg-api:latest
container_name: wg-json-api
restart: unless-stopped
cap_add:
- NET_ADMIN
network_mode: "host"
command: wg-api --device wg0 --listen 172.17.0.1:8182
启动:
docker-compose up -d
浏览器访问 http://****:8080
设置服务端相关配置,然后即可生成客户端配置文件,可通过邮件发送生成的配置文件。
客户端导入生成的配置文件即可。
网友评论