It is currently September 20th, 2019, 8:23 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

pugsly » November 27th, 2015, 1:49 am

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

Austempest » January 7th, 2016, 8:41 am

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

edagger » January 21st, 2016, 12:14 am

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

Quad-B » January 30th, 2016, 7:35 pm

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

chefrogi » July 19th, 2018, 5:28 pm

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


[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