ghoscht,
@ghoscht@feddit.de avatar

Someone already has a project for that on GitHub. I haven’t tried it yet tho. The creator is also rewriting it to support other clients such as transmission and qbittorrent (v3 branch).

parim19532,

Thanks man, guess I’ll just wait for v3

Zeku,
@Zeku@feddit.de avatar

If you happen to use gluetun (great project btw) you can use the environment property VPN_PORT_FORWARDING=on and a volume mapping to /tmp/gluetun/forwarded_port to obtain the port number from the container. Then with the bittorrent-port-forward-file container (Link) you can automatically set the port from the file to qbittorrent.
I use this with ProtonVPN and it works like a charm.

Here the relevant parts of my docker compose file:


<span style="color:#323232;">  gluetun:
</span><span style="color:#323232;">    image: qmcgaw/gluetun
</span><span style="color:#323232;">    &lt;...>
</span><span style="color:#323232;">    volumes:
</span><span style="color:#323232;">      &lt;...>
</span><span style="color:#323232;">      - ./port-forwarding/forwarded_port:/tmp/gluetun/forwarded_port:rw
</span><span style="color:#323232;">    environment:
</span><span style="color:#323232;">      # See https://github.com/qdm12/gluetun/wiki
</span><span style="color:#323232;">      &lt;...>
</span><span style="color:#323232;">      - VPN_PORT_FORWARDING=on
</span><span style="color:#323232;">      - VPN_PORT_FORWARDING_PROVIDER=protonvpn
</span><span style="color:#323232;">
</span><span style="color:#323232;">  qbittorrent-port-forward-file:
</span><span style="color:#323232;">    platform: linux/amd64 #needed for raspi
</span><span style="color:#323232;">    image: charlocharlie/qbittorrent-port-forward-file                           
</span><span style="color:#323232;">    container_name: port-forward-file                                            
</span><span style="color:#323232;">    depends_on:
</span><span style="color:#323232;">      - qbittorrent
</span><span style="color:#323232;">      - gluetun
</span><span style="color:#323232;">    restart: unless-stopped
</span><span style="color:#323232;">    volumes:
</span><span style="color:#323232;">      - ./port-forwarding:/config:ro
</span><span style="color:#323232;">    environment:
</span><span style="color:#323232;">      - QBT_USERNAME=
</span><span style="color:#323232;">      - QBT_PASSWORD=
</span><span style="color:#323232;">      - QBT_ADDR=gluetun:9092
</span><span style="color:#323232;">      - PORT_FILE=/config/forwarded_port
</span>

The file containing the port number sits at ./port-forwarding/forwarded_port on the host (you may need to create the empty file before first usage).

See gluetun wiki here: Link

parim19532,

Hey, thanks for replying. I do use gluetun :). Unfortunately I use windscribe, and there I can’t have a permanent port… I have to generate a port manually every 7 days. So I don’t think this method will work with windscribe. Thanks for the help though

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • aaaaaaacccccccce
  • [email protected]
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • Socialism
  • KbinCafe
  • TheResearchGuardian
  • Ask_kbincafe
  • oklahoma
  • feritale
  • SuperSentai
  • KamenRider
  • All magazines