Comment on Question about using gluetun for other containers
lemmyvore@feddit.nl 12 hours ago
You can’t use dependencies cross-stack.
If you know the IP that the gluetun interface is supposed to have you tell the BT client to use that interface as output interface. Usually BT clients have this option, other apps might not.
Another thing you can do is wrap the client in a script that waits for the interface to be up (respond to ping) before it moves one. Something like (in sh):
while ! ping -c 1 -q -W 1 "$IP" &>/dev/null ; do echo "Waiting for ${IP} to come up..." sleep 5 done # run BT client here
Alternatively if the gluetun interface itself doesn’t respond to ping, you can ping something else (like 1.1.1.1) through the interface, and use the -I ${IP} option for ping to bind to it for output.