Skip to content

ecabuk/docker-deluge-wireguard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deluge + WireGuard

Environment Variables

  • DELUGE_CONFIG_DIR : /config
  • DELUGE_DATA_DIR : /data
  • WG_I_NAME : wg0
  • DELUGE_UMASK : 022
  • DELUGE_WEB_UMASK : 027

Kill Switch

Add these lines to the [Interface] section of your .conf file.

You may need to replace 192.168.1.0/24 with your host's network.

PostUp = iptables -I OUTPUT ! -o %i -m mark ! --mark $(wg show %i fwmark) -m addrtype ! --dst-type LOCAL -j REJECT
PreDown = iptables -D OUTPUT ! -o %i -m mark ! --mark $(wg show %i fwmark) -m addrtype ! --dst-type LOCAL -j REJECT
PostUp = iptables -I OUTPUT -d 192.168.1.0/24 -j ACCEPT
PostDown = iptables -D OUTPUT -d 192.168.1.0/24 -j ACCEPT

Examples

Docker

Docker Compose

version: "3"
services:
  deluge_wg:
    image: ecabuk/deluge-wireguard
    restart: unless-stopped
    privileged: true
    volumes:
      - ./my-wg.conf:/etc/wireguard/wg0.conf
    environment:
      PUID: 1000
      PGID: 1000
    ports:
      - 8112:8112
      - 58846:58846

References