2015-09-17, 01:16
Hi all, Sir. nightflyer,
while acknowledging the excellent work done so far, I would like to ask if it is possible to connect to a VPN while launching this add-on.
Flow of events (to place somewhere in the add-on code) shall be the following:
1. Check if a VPN with Italian ip is already connected
2. If not, connect to VPN using openVPN
3. Continue with the add-on
Note: I suppose that the VPN is configured and working, such that a
works without issues.
More in details, I imagine the following flow of events:
1.1 check the existence of tun0
1.2 if not, VPN does not exist, then ask the user if he wants to connect to the VPN
1.3 if tun 0 exists, then extract the 'country' using the following
which gives
1.4 if Country is not IT, ask the user if he wants to disconnect and connect to VPN with italian ip, otherwise continue with the add-on (might be unnecessary to connect to VPN).
Thank you for illuminating me with your knowledge.
Have a nice day!
while acknowledging the excellent work done so far, I would like to ask if it is possible to connect to a VPN while launching this add-on.
Flow of events (to place somewhere in the add-on code) shall be the following:
1. Check if a VPN with Italian ip is already connected
2. If not, connect to VPN using openVPN
3. Continue with the add-on
Note: I suppose that the VPN is configured and working, such that a
Code:
sudo openvpn <openvpnITALY.ovpn>
More in details, I imagine the following flow of events:
1.1 check the existence of tun0
1.2 if not, VPN does not exist, then ask the user if he wants to connect to the VPN
1.3 if tun 0 exists, then extract the 'country' using the following
Code:
curl ipinfo.io/<ACTUAL IP OF tun0>
which gives
Code:
{
...
"country": "[b]IT[/b]",
...
}
1.4 if Country is not IT, ask the user if he wants to disconnect and connect to VPN with italian ip, otherwise continue with the add-on (might be unnecessary to connect to VPN).
Thank you for illuminating me with your knowledge.
Have a nice day!