4

I have one situation where my electron application needs to check if the user is connected to any VPN network or not. I have check NPM middlewares and electron features but unable to find anything helpful. Is there any way to get the following information from electron application:

1> Is device (windows/mac) is connected to VPN?

(My comment: I have already tried Window.navigator, it only shows a status of the connection, online: offline ? I have also tried ipcMain and ipcRenderer 'online-status-changed')

2> If the user is connected to a VPN network, I need network information.

If you have any information, how to collect this data within electron app, Please share it.

Community
  • 1
  • 1
Anand Vaidya
  • 609
  • 2
  • 16
  • 41

1 Answers1

0

What you are trying to do is impossible to complete accurately, any address could be from a VPN and they could change anytime. Popular ways to combat this is checking their IP address against a database of known IPs used by popular VPNs. I will list some popular ones below, though they can be abused by the client and possibly cause some charges to your account. For a more detailed answer, you should check out https://stackoverflow.com/a/33446886/9189336.