crazy-max / docker-rtorrent-rutorrent

rTorrent and ruTorrent Docker image
MIT License
503 stars 112 forks source link

Implement the ability to use a dynamic 'incoming port' for rtorrent - to use with Gluetun #314

Closed notDavid closed 7 months ago

notDavid commented 10 months ago

Description

Gluetun has added the ability to use Port Forwarding for VPN providers, documented here

Would be really cool if we could set RT_INC_PORT dynamically, by using this functionality. The (random) opened port number by the VPN provider can be obtained via the Control Server. For example: curl 192.168.1.5:8000/v1/openvpn/portforwarded

stickz commented 10 months ago

It's required to restart rTorrent anyways when changing the port. Is it possible to restart the docker container with that environment variable? There should be a graceful exit, assuming your configuration works properly.

notDavid commented 10 months ago

Hi @stickz , thank you for your reply;

I just noticed this post, but i'm not sure how to implement it. Would this clarify your question / help in finding a solution?

AFAIK the server unfortunately does not provide any way to get the port when using Wireguard, so you can use the temp file instead as a workaround. I currently have this set up with a scheduled cat command in my rtorrent.rc and it works fine :)