It is currently September 24th, 2020, 3:51 am

PIA VPN Status

Share and get help with Plugins and Addons
pugsly
Posts: 1
Joined: November 27th, 2015, 1:32 am

PIA VPN Status

Post by pugsly »

First project for me - very simple but maybe it will be useful for someone.

I wanted a nice visual indicator for when my VPN connection is active. This is a simple little skin customized with the PIA logo, but should work fine with other VPNs that make use of a virtual network adapter.

If it does not work for you, you may need to change SysInfoData in [MeasureNetwork] to point to the correct network adapter.
PIA VPN status_0.1.rmskin
You do not have the required permissions to view the files attached to this post.
Austempest
Posts: 1
Joined: January 7th, 2016, 8:39 am

Re: PIA VPN Status

Post by Austempest »

Hi,

Your skin works without any modifications on my PC, THANKS!

One question though, is there any way to report the PIA status of another PC on the network?

I've been doing some reading and can't figure out if it's even possible.
edagger
Posts: 1
Joined: January 21st, 2016, 12:13 am

Re: PIA VPN Status

Post by edagger »

I tried using, but it shows up green when I'm not connected and red when I am.
Quad-B
Posts: 1
Joined: January 30th, 2016, 7:18 pm

Re: PIA VPN Status

Post by Quad-B »

Nice work! I'd like to use some of your code, will you share? I created a possible metadata section for you, if you're willing:

[Metadata]
Name=VPN Status
Author=pugsly
Version=1.0.0
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Information=Displays a colored PIA logo and VPN text according to VPN status.
chefrogi
Posts: 1
Joined: July 19th, 2018, 5:04 pm

Re: PIA VPN Status

Post by chefrogi »

I was able to get this working for a specific named VPN network by using ADAPTER_DESCRIPTION

The use case for me is that I used Checkpoint Capsule VPN to connect to work, and just want a reminder on the screen that I'm actually connected.

So I've set up my Checkpoint VPN adapter name to what I want it to be: "NorthAmerica".
Use SysInfoData to point it to NorthAmerica.
Simply use SysInfoType=ADAPTER_DESCRIPTION to get the description of the adapter, which again will just be NorthAmerica. If the VPN isn't connected, essentially NorthAmerica is inactive and the result of [MeasureNetwork] is null.

I chose to use Substitute to swap the "NorthAmerica" output value for "1". I did that because I couldn't figure out how to get the IfCondition to do string comparisons. But it works using "1", so that both the number and string output of [MeasureNetwork] = 1

Finally, I changed [OnlineStatus] to use IfCondition and IfTrueAction instead.

Seems to work

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
BackgroundMode=2
SolidColor=0,0,0,90

[MeasureNetwork]
Measure=Plugin
Plugin=SysInfo
SysInfoData=NorthAmerica
SysInfoType=ADAPTER_DESCRIPTION
Substitute="NorthAmerica":"1"

[OnlineStatus]
Measure=Calc
Formula=[MeasureNetwork]
IfCondition=OnlineStatus = 1
IfTrueAction=[!SetOption MeterNetwork FontColor 0,255,0,155][!SetOption PiaIcon ImageName pia_on.png][!UpdateMeter PiaIcon][!Redraw]
IfCondition2=OnlineStatus <> 1
IfTrueAction2=[!SetOption MeterNetwork FontColor 255,0,0,255][!SetOption PiaIcon ImageName pia_off.png][!UpdateMeter PiaIcon][!Redraw]
DynamicVariables=1

[PiaIcon]
Meter=Image
ImageName=pia_gray.png
W=30
H=30
X=8
Y=7

[MeterNetwork]
Meter=String
MeasureName=OnlineStatus
FontSize=30
FontColor=167,167,167,255
StringStyle=Bold
AntiAlias=1
Text=NA VPN
X=30
y=0
Darv
Posts: 4
Joined: September 27th, 2015, 1:48 am

Re: PIA VPN Status

Post by Darv »

It seems this plugin stopped working with the update to PIA of version 1.8.

I am not much into coding rainmeter skins but did rely on this to confirm I was always connected. Currently PIA version 1.7 is the last working version. Could use help getting it working again.
RushFan
Posts: 1
Joined: May 18th, 2020, 12:02 pm

Re: PIA VPN Status

Post by RushFan »

Has anyone been able to get this working? Or does anyone have a link to a functioning skin that performs a similar action?

Peace.
kenbo01
Posts: 3
Joined: July 15th, 2020, 11:33 pm

Re: PIA VPN Status

Post by kenbo01 »

Something like this?

Code: Select all

[Rainmeter]
Update=1000
DynamicWindowSize=1
BackgroundMode=3
SolidColor=0,0,0,90

[Metadata]
; Contains basic information of the skin.
Name=VPN Status

[MeasureNetwork]
Measure=Plugin
Plugin=SysInfo
SysInfoData=Best
SysInfoType=ADAPTER_DESCRIPTION
Substitute="Private Internet Access Network Adapter":"1","WireGuard Tunnel":"1"

[OnlineStatus]
Measure=Calc
Formula=[MeasureNetwork]
IfCondition=OnlineStatus = 1
IfTrueAction=[!SetOption MeterNetwork FontColor 0,255,0,155][!SetOption PiaIcon ImageName pia_on.png][!UpdateMeter PiaIcon][!Redraw]
IfCondition2=OnlineStatus <> 1
IfTrueAction2=[!SetOption MeterNetwork FontColor 255,0,0,255][!SetOption PiaIcon ImageName pia_off.png][!UpdateMeter PiaIcon][!Redraw]
DynamicVariables=1

[PiaIcon]
Meter=Image
ImageName=pia_gray.png
W=30
H=30
X=8
Y=7

[MeterNetwork]
Meter=String
MeasureName=OnlineStatus
FontSize=30
FontColor=167,167,167,255
StringStyle=Bold
AntiAlias=1
Text=VPN
X=30