fedarovich / qbittorrent-cli

Command line interface for QBittorrent
MIT License
291 stars 16 forks source link

Ability to change network interface #69

Open BatSmacker84 opened 1 year ago

BatSmacker84 commented 1 year ago

I have multiple vpns and would like to be able to switch the network interface of qbt to match the vpn I want to use. The setting is under 'advanced'.

SixGravities commented 1 year ago

+1 for this. I'd love to be able to switch the designated network interface (Settings -> Advanced -> Network Interface) via this tool. Particularly helpful on mac, where some VPN's change the utun interface on occasion.

TheArkive commented 6 months ago

I definitely need this too.

The specific api commands are:

https://github.com/qbittorrent/qBittorrent/wiki/WebUI-API-(qBittorrent-4.1)#get-application-preferences

The specific setting names in the api that would be very helpful for this feature are

current_network_interface
current_interface_address

The posters above seem to be asking for current_network_interface. My request would be for current_interface_address. Hopefully it wouldn't be too much trouble to add both.

Currently, some vpn providers will periodically reset the connection which changes the local interface ip, and qbt won't rebind to the new address automatically, thus all torrents stall.

With this feature, we could script around this and make a clean workaround that doesn't require restarting the program.

Changing this advanced setting manually works in the ui. I would think it should also work as expected in the api.