wg-api
wg-api copied to clipboard
error: could not create WireGuard client: setsockopt: protocol not available
run command : ./wg-api --device=wg0 --listen=0.0.0.0:8080
return :
error: could not create WireGuard client: setsockopt: protocol not available
Same problem over here but using docker image
Same issue, albeit I run it from docker with the configuration given at https://github.com/vx3r/wg-gen-web.
Docker compose like this is used: (click to expand)
version: '3.6'
services:
wg-gen-web-demo:
image: vx3r/wg-gen-web:latest
container_name: wg-gen-web-demo
restart: unless-stopped
expose:
- "8080/tcp"
environment:
- WG_CONF_DIR=/data
- WG_INTERFACE_NAME=wg0.conf
- SMTP_HOST=smtp.gmail.com
- SMTP_PORT=587
- [email protected]
- SMTP_PASSWORD=******************
- SMTP_FROM=Wg Gen Web <[email protected]>
- OAUTH2_PROVIDER_NAME=github
- OAUTH2_PROVIDER=https://github.com
- OAUTH2_CLIENT_ID=******************
- OAUTH2_CLIENT_SECRET=******************
- OAUTH2_REDIRECT_URL=https://wg-gen-web-demo.127-0-0-1.fr
- WG_STATS_API=http://wg-json-api:8182
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 localhost:8182
go get golang.zx2c4.com/wireguard/wgctrl install the latest wgctrl dependencies will resolve this problem
This is fixed by an upgraded version of wgctrl.
I use wg-gen-web and receive the same error message. How do I upgrade wgctrl?