linuxserver / docker-transmission

GNU General Public License v3.0
577 stars 179 forks source link

[FEAT] Add natpmpc to enable Proton VPN port forwarding #248

Closed sebdanielsson closed 1 year ago

sebdanielsson commented 1 year ago

Is this a new feature request?

Wanted change

Add natpmpc to image.

Reason for change

natpmpc is needed for port forwarding with Proton VPN. https://protonvpn.com/support/port-forwarding-manual-setup/ https://www.reddit.com/r/ProtonVPN/comments/10owypt/successful_port_forward_on_debian_wdietpi_using/

Proposed code change

No response

github-actions[bot] commented 1 year ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

Roxedus commented 1 year ago

You can install this yourself. https://github.com/linuxserver/docker-mods/tree/universal-package-install

The functionality you want is outside of the scope of this repository.

jordanpotter commented 1 year ago

Hey @sebdanielsson (and whomever else reads this in the future), I made a Docker mod for you ๐Ÿ˜„

Just add the jordanpotter/docker-mods:transmission-nat-pmp Docker mod. For example:

docker run -d \
  --name=transmission \
  -e DOCKER_MODS="jordanpotter/docker-mods:transmission-nat-pmp"
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Etc/UTC \
  -p 9091:9091 \
  -p 51413:51413 \
  -p 51413:51413/udp \
  -v /path/to/data:/config \
  -v /path/to/downloads:/downloads \
  -v /path/to/watch/folder:/watch \
  --restart unless-stopped \
  lscr.io/linuxserver/transmission:latest

You can read the source code here. It relies on a Go application I made to start a NAT-PMP client and update Transmission's peer port when the NAT port changes (here).

I haven't gotten around to writing documentation yet. But if you have any issues, feel free to file a bug in the jordanpotter/docker-mods repo.

sebdanielsson commented 1 year ago

Wow thank you! Canโ€™t wait to try this out!๐Ÿ˜ƒ

PHLAK commented 1 year ago

Jut added the jordanpotter/docker-mods:transmission-nat-pmp docker mod and it appears to be working great! Thank you @jordanpotter!

alexg-k commented 1 year ago

Hi @jordanpotter, your docker mod looks like just what I need. However, I cannot get it to overwrite the default listening port. I added your mod to the environment variables, but it is does not seem to have any effect (nothings seems to be pulled?). It is my first time using a docker mod, so any help is appreciated. This is an excerpt of my docker-compose.yaml:

[...]
transmission:
    image:  linuxserver/transmission
    network_mode: "service:wireguard"
    depends_on:
      - wireguard
    environment:
      - DOCKER_MODS=jordanpotter/docker-mods:transmission-nat-pmp
      - PUID=1000
      - PGID=1000
      - TZ=Europe/Berlin
    env_file:
      - ./transmission.env
    volumes:
      - ./transmission-config:/config
      - /storage/downloads:/downloads
      - watch:/watch
    restart: unless-stopped
[...]

docker compose up:

[...]
compose-transmission-wireguard-transmission-1  | [mod-init] jordanpotter/docker-mods:transmission-nat-pmp:latest could not be found on registry-1.docker.io
[...]

EDIT: Solved the issue by commenting the marked line:

[...]
services:
  wireguard:
    image: linuxserver/wireguard
    cap_add:
      - NET_ADMIN
      - SYS_MODULE
    sysctls:
      - net.ipv6.conf.all.disable_ipv6=0
        #- net.ipv4.conf.all.src_valid_mark=1  <-------------------------------
[...]

in my compose.yaml.