version: "3.8"

services:
  wireguard-client:
    image: lscr.io/linuxserver/wireguard:latest
    container_name: wireguard-client
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Asia/Shanghai
    volumes:
      - ./wg0.conf:/config/wg0.conf:ro
    # 删除 sysctls 部分，在宿主机上预先设置
    network_mode: host
    restart: unless-stopped

