1. script to set incoming_ports in deluge
If possible use a curl one-liner using the Deluge JSON-RPC API, which can be invoked in step 2.
proof of concept using hurl:
POST http://ganymede.internal:8112/json
{
"method": "auth.login",
"params": [{{deluge_password}}],
"id": "1"
}
HTTP 200
[Captures]
session: cookie "_session_id"
POST http://ganymede.internal:8112/json
[Cookies]
_session_id: {{session}}
{
"method": "core.get_config",
"params": [],
"id": "2"
}
2. Call script from gluetun
The one-liner from step 1 can then be called using the VPN_PORT_FORWARDING_UP_COMMAND envrionment variable in gluetun. To obtain the forwarded port, I can just use the {{PORT}} placeholder.
1. script to set incoming_ports in deluge
If possible use a curl one-liner using the Deluge JSON-RPC API, which can be invoked in step 2.
proof of concept using hurl:
2. Call script from gluetun
The one-liner from step 1 can then be called using the
VPN_PORT_FORWARDING_UP_COMMANDenvrionment variable in gluetun. To obtain the forwarded port, I can just use the{{PORT}}placeholder.