VPN Disconnection Protection Feature

Discuss suggestions and ideas for the forums, site, software.
Jellyfish

VPN Disconnection Protection Feature

Post by Jellyfish »

Hi,

Most qBittorrent users use a VPN to hide their real IP address for security/privacy reasons.  However, should the VPN disconnect unexpectedly, the user's real IP address will be revealed.

How about having an optional feature in qBittorrent to detect if the user's IP address changes whilst a torrent is active (meaning the VPN connection may have been lost), and then immediately pause all torrents?

Thanks.
ciaobaby

Re: VPN Disconnection Protection Feature

Post by ciaobaby »

Most qBittorrent users use a VPN to hide their real IP address for security/privacy reasons.
According to whom?? I have a fixed IP and have absolutely no intentions to use a VPN.
Jellyfish

Re: VPN Disconnection Protection Feature

Post by Jellyfish »

According to whom??
This is an assumption, based upon the consensus of various torrent articles I have read.
ciaobaby

Re: VPN Disconnection Protection Feature

Post by ciaobaby »

Bit of a broad assumption given than many of the "torrent article writers are often affiliates of VPN providers.
User avatar
Peter
Administrator
Administrator
Posts: 2702
Joined: Wed Jul 07, 2010 6:14 pm

Re: VPN Disconnection Protection Feature

Post by Peter »

Most proper VPN clients have a "killswitch" inbuilt.
For example AirVPN comes with such.

But there are many other providers too.
Switch provider, that's the only option.

(The switch works great with qbittorrent and any other apps, I tried it.)
Jellyfish

Re: VPN Disconnection Protection Feature

Post by Jellyfish »

Private Internet Access has a kill switch feature too from what I have read.

There are other programmes that will monitor a VPN connection and take action if the VPN connection is lost, although this requires installing another programme.

However, I was proposing to add this functionality to qBittorrent itself.  Basically, an option "Enable VPN Disconnection Protection" in the settings.  Then if the IP address changes, any active torrents are immediately paused, and the user is notified.

Nice work with qBittorrent anyway.  Really appreciate it.
User avatar
Peter
Administrator
Administrator
Posts: 2702
Joined: Wed Jul 07, 2010 6:14 pm

Re: VPN Disconnection Protection Feature

Post by Peter »

Only Sledge knows if it can be done.
But he aims to make a minimal and swift client.

Especially the code part is tough (well, which other): dunno if Qt can poll efficient for address changes.
Switeck

Re: VPN Disconnection Protection Feature

Post by Switeck »

BitTorrent clients can connect through IPv4, IPv6, and a VPN. Blocking IPv4 might still cause leaks on the IPv6.

A rare few people might even have 2 or more ISPs connected to their computer at once -- such as through Wi-Fi for one and hard wired ethernet for another.
Almost no BitTorrent client is good at fully utilizing multiple ISP connections at once -- it requires either announcing to trackers multiple times (once per ISP per torrent update) or stuffing alternate ip addresses into single announces.

Blocking network interfaces might work for VPNs.
fathermck

Re: VPN Disconnection Protection Feature

Post by fathermck »

[quote="Jellyfish"]
How about having an optional feature in qBittorrent to detect if the user's IP address changes whilst a torrent is active (meaning the VPN connection may have been lost), and then immediately pause all torrents?
[/quote]

I agree.
Something like (for windows OS...):

- At launch, if the VPN check is selected by the user,
Then
    -check if my public IP = the usual public ip/DNS name configured somewhere in qB.
    - If not then the VPN is lauched, we are ok to seed.
          then
          - If the ip adress of the local network card (ie the tap Adapter) binded to QB change then pause all torrents.

Or just : If the tap adapter (or any network card defined in QB) is not connected, do not seed.
(Since in the advanced options there is already a parameter to tell QB the network card to use).
ciaobaby

Re: VPN Disconnection Protection Feature

Post by ciaobaby »

It needs all or any of that to be supported/exposed/implemented in libtorrent before it can even be thought about for use in qBittorrent.

Libtorrent handles all the networking, qBT is just the configuration interface.
cynicist

Re: VPN Disconnection Protection Feature

Post by cynicist »

This feature is already in the client. Anyone using OpenVPN has a virtual network device created when the connection is active. So just go to Options > Advanced > Network Interface and select it there (it's likely called tun0). Once it's set, if there is a disconnection then the network interface goes down and your torrents cease their activity.
ciaobaby

Re: VPN Disconnection Protection Feature

Post by ciaobaby »

Is that working as expected now?

Because there were some problems where libtorrent would ignore the what interface was selected/suggested  by qBT, and use what ever was available should the 'preferred' interface be 'down'. I don't use a VPN or proxy server so haven't tested it myself.
cynicist

Re: VPN Disconnection Protection Feature

Post by cynicist »

[quote="ciaobaby"]
Is that working as expected now?

Because there were some problems where libtorrent would ignore the what interface was selected/suggested  by qBT, and use what ever was available should the 'preferred' interface be 'down'. I don't use a VPN or proxy server so haven't tested it myself.
[/quote]

Interesting. No, I haven't experienced that bug/issue. It has been working perfectly for me in v3.1.x. I remember after setting it I had completely forgotten about the feature until one day I saw no activity and thought my internet was down, only to find my VPN disconnected for some reason.
Jellyfish

Re: VPN Disconnection Protection Feature

Post by Jellyfish »

[quote="cynicist"]
This feature is already in the client. Anyone using OpenVPN has a virtual network device created when the connection is active. So just go to Options > Advanced > Network Interface and select it there (it's likely called tun0). Once it's set, if there is a disconnection then the network interface goes down and your torrents cease their activity.
[/quote]

Thanks - it appears to be just what I was looking for.  :)

Will this method work correctly with a PPTP VPN connection?  (I found my PPTP VPN connection listed in the Network Interface drop down list, which looks promising.)
cynicist

Re: VPN Disconnection Protection Feature

Post by cynicist »

[quote="Jellyfish"]
Thanks - it appears to be just what I was looking for.  :)

Will this method work correctly with a PPTP VPN connection?  (I found my PPTP VPN connection listed in the Network Interface drop down list, which looks promising.)
[/quote]

No problem. :)

(Yes, PPTP functions similarly and you did indeed find it)
Post Reply