wg-api icon indicating copy to clipboard operation
wg-api copied to clipboard

error: could not create WireGuard client: setsockopt: protocol not available

Open davidtall opened this issue 2 years ago • 3 comments

run command : ./wg-api --device=wg0 --listen=0.0.0.0:8080

return :

error: could not create WireGuard client: setsockopt: protocol not available

davidtall avatar Mar 29 '22 06:03 davidtall

Same problem over here but using docker image

jorgemtzh avatar Apr 10 '22 13:04 jorgemtzh

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

cameo69 avatar Apr 29 '22 08:04 cameo69

go get golang.zx2c4.com/wireguard/wgctrl install the latest wgctrl dependencies will resolve this problem

njdragonfly avatar Jun 21 '22 08:06 njdragonfly

This is fixed by an upgraded version of wgctrl.

jamescun avatar Oct 07 '22 10:10 jamescun

I use wg-gen-web and receive the same error message. How do I upgrade wgctrl?

dvett01 avatar Nov 25 '23 17:11 dvett01