Skip to content

deluge: set incoming port to forwarded port provided by gluetun #197

Description

@0xlua

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions