Deluge ignores default network interface and uses all interfaces
Posted: Sun Jul 23, 2023 9:11 pm
The tooltip for "incoming interface" in the preferences menu reads:
> IP address or network interface name to listen for incoming BitTorrent connections. Leave empty to use system default.
In my interpretation the default interface is one which has a default route, but in practice I observe that deluge listens on all available interfaces — apparently one socket bound to each iface. In typical use case, I have a vpn established by wg-quick, which gives a routing policy and default route to send all traffic to the vpn interface, and in general I find that works for every application _except_ for deluge. If it matters, I use the archlinux iso magnet to test, available at https://archlinux.org/download, and I just watch for outgoing traffic to anywhere other than the vpn endpoint in tcpdump and see bt-dht packets on every interface while deluge is open, while everything else (that does not otherwise bind a specific interface, e.g. ping -I) uses only the vpn interface.
Perhaps the tooltip should read "leave empty to use all interfaces"? The "external IP" description in the status bar is also confusing, since apparently deluge is really listening (and receiving) traffic on several interfaces+ips, but it apparently reports only one of the addrs. Is my understanding of deluge's behavior incorrect here? If not, can we update the status bar to show all (external) listen ips? For the record, deluge -L info _does_ report all (3 in my case) external ips correctly in "on_alert_external_ip" messages in my case.
> IP address or network interface name to listen for incoming BitTorrent connections. Leave empty to use system default.
In my interpretation the default interface is one which has a default route, but in practice I observe that deluge listens on all available interfaces — apparently one socket bound to each iface. In typical use case, I have a vpn established by wg-quick, which gives a routing policy and default route to send all traffic to the vpn interface, and in general I find that works for every application _except_ for deluge. If it matters, I use the archlinux iso magnet to test, available at https://archlinux.org/download, and I just watch for outgoing traffic to anywhere other than the vpn endpoint in tcpdump and see bt-dht packets on every interface while deluge is open, while everything else (that does not otherwise bind a specific interface, e.g. ping -I) uses only the vpn interface.
Perhaps the tooltip should read "leave empty to use all interfaces"? The "external IP" description in the status bar is also confusing, since apparently deluge is really listening (and receiving) traffic on several interfaces+ips, but it apparently reports only one of the addrs. Is my understanding of deluge's behavior incorrect here? If not, can we update the status bar to show all (external) listen ips? For the record, deluge -L info _does_ report all (3 in my case) external ips correctly in "on_alert_external_ip" messages in my case.