It is currently March 28th, 2024, 9:45 pm

network (Wired and Wireless) getting IP from VPN

General topics related to Rainmeter.
StealthNet
Posts: 3
Joined: October 23rd, 2019, 4:24 am

network (Wired and Wireless) getting IP from VPN

Post by StealthNet »

Hi there!

Just start using rainmeter with the gadgets skin. Tbh it is a lot like an utility that I used more than 10 years ago... That feels good :)

Currently using on a notebook with the ExpressVPN installed. Like almost all VPN clients, i installs a VPN TAP.

Fact is, although the wired and wireless network meters find the proper interfaces, the local ip address is from the vpn adapter.

Is there a quick way of fixing it?

Thanks in advance!
You do not have the required permissions to view the files attached to this post.
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm

Re: network (Wired and Wireless) getting IP from VPN

Post by SilverAzide »

The way these Gadgets work (and the old Sidebar Gadgets too I think) is that the IP address that is shown is that of the "active" adapter (or in Rainmeter terminology, the "best" adapter). In your screenshot, the Gadgets are both showing your active IP address (the one Rainmeter says is being used). If your active adapter changes, then you will see these values change in BOTH gadgets.

You might want to experiment with configuring a gadget to specifically watch your VPN adapter only (the IPs shown will still be that of the active adapter, which many or may not be the VPN). Open the Settings and follow the link "How do I monitor a VPN?"

Hope this helps.
Gadgets Wiki GitHub More Gadgets...
StealthNet
Posts: 3
Joined: October 23rd, 2019, 4:24 am

Re: network (Wired and Wireless) getting IP from VPN

Post by StealthNet »

Thank you for the clarification!

Is it possible to force the adapter from where it gets the ip address?
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm

Re: network (Wired and Wireless) getting IP from VPN

Post by SilverAzide »

StealthNet wrote: October 23rd, 2019, 7:51 pm Thank you for the clarification!

Is it possible to force the adapter from where it gets the ip address?
Yes, it is, but be aware that the adapter might not actually be active, and your machine might not actually be using it at all. If that is OK with you, try the following:

1. Right-click the Network Meter skin and select Edit.
2. Find the following section of code:

Code: Select all

[MeasureIPLan]
Measure=Plugin
Plugin=SysInfo
SysInfoType=IP_ADDRESS
SysInfoData=Best
DynamicVariables=1
OnChangeAction=[!Log "Internal IP address change, refreshing external IP address" Notice][!CommandMeasure MeasureIPWeb "Reset"][!CommandMeasure MeasureIPWeb "Update"][!SetOptionGroup MeasureActiveNet Reload 0][!UpdateMeasure "CalcActiveInterface"]
3. Replace this entire section with this:

Code: Select all

[MeasureIPLan]
Measure=Plugin
Plugin=SysInfo
SysInfoType=IP_ADDRESS
SysInfoData=#InterfaceEthernet#
OnChangeAction=[!Log "Internal IP address change, refreshing external IP address" Notice][!CommandMeasure MeasureIPWeb "Reset"][!CommandMeasure MeasureIPWeb "Update"][!SetOptionGroup MeasureActiveNet Reload 0][!UpdateMeasure "CalcActiveInterface"]
4. Refresh the skin.

This will always show the IP address returned by your Ethernet adapter. If your wireless adapter is active, your address will likely show as blank.
Last edited by SilverAzide on October 23rd, 2019, 10:53 pm, edited 1 time in total.
Gadgets Wiki GitHub More Gadgets...
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm

Re: network (Wired and Wireless) getting IP from VPN

Post by SilverAzide »

Also, if you want to "pin" the Wireless Meter's IP Address display to your wireless adapter, then edit the Wireless Meter and follow all the instructions above. Then change the line SysInfoData=#InterfaceEthernet# to SysInfoData=#InterfaceWireless#. Refresh the skin and your adapter will always show the IP address used by your wireless adapter (it will be blank if your adapter is inactive).
Gadgets Wiki GitHub More Gadgets...
StealthNet
Posts: 3
Joined: October 23rd, 2019, 4:24 am

Re: network (Wired and Wireless) getting IP from VPN

Post by StealthNet »

Fantastic!

Working like a charm! THANK YOU!
User avatar
Second
Posts: 2
Joined: January 23rd, 2021, 12:37 pm

Re: network (Wired and Wireless) getting IP from VPN

Post by Second »

SilverAzide wrote: October 23rd, 2019, 12:34 pm The way these Gadgets work (and the old Sidebar Gadgets too I think) is that the IP address that is shown is that of the "active" adapter (or in Rainmeter terminology, the "best" adapter). In your screenshot, the Gadgets are both showing your active IP address (the one Rainmeter says is being used). If your active adapter changes, then you will see these values change in BOTH gadgets.

You might want to experiment with configuring a gadget to specifically watch your VPN adapter only (the IPs shown will still be that of the active adapter, which many or may not be the VPN). Open the Settings and follow the link "How do I monitor a VPN?"

Hope this helps.
Hi SilverAzide

I tried to click the "How do i monitor a VPN" but the link seems dead at DeviantArt.

Well, the only problem i have is that one of my computers have "Red monitors" (top left corner of Wireless Meter) and on the other computer they are Green/Blue. Both computers using ExpressVPN.
Beside that it works fine, so its just a minor thing but anyway :)
User avatar
SilverAzide
Rainmeter Sage
Posts: 2588
Joined: March 23rd, 2015, 5:26 pm

Re: network (Wired and Wireless) getting IP from VPN

Post by SilverAzide »

Second wrote: January 23rd, 2021, 12:52 pm Hi SilverAzide

I tried to click the "How do i monitor a VPN" but the link seems dead at DeviantArt.

Well, the only problem i have is that one of my computers have "Red monitors" (top left corner of Wireless Meter) and on the other computer they are Green/Blue. Both computers using ExpressVPN.
Beside that it works fine, so its just a minor thing but anyway :)
You must be using an old version of the Gadgets. The newer releases no longer reference DA, they all point to the Gadget wiki articles on GitHub.
(The content is pretty much the same, tho.) The "red monitors" mean the adapter is reporting no connectivity (i.e., no network), so you might want to check to see if the configuration is OK ("blue" is idle, "green" is "transmitting/receiving").
Gadgets Wiki GitHub More Gadgets...
User avatar
Second
Posts: 2
Joined: January 23rd, 2021, 12:37 pm

Re: network (Wired and Wireless) getting IP from VPN

Post by Second »

Thank you so much. You are so right, i was using an older version on the machine that had the red monitors.. And the link works as you said now :D

Great job on those Gadgets, i can't do without them :great:

Thanks again..
sad_story
Posts: 7
Joined: April 19th, 2022, 5:26 pm

Re: network (Wired and Wireless) getting IP from VPN

Post by sad_story »

I wasn't sure if it was starting a new thread...

I am only using the IP part of the meter. Can anyone help a newb with how to make clicking over the IP refreshes the IP? I think using a mouse click to refresh the skin would also work. Just not sure how to implement it.

This is what I have so far

Code: Select all

[measureIP]

Measure=Plugin
Plugin=WebParser
URL=https://checkip.amazonaws.com/
UpdateRate=14400
RegExp=(?siU)^(.*)$
StringIndex=1
Substitute="":"N/A"

[meterIPValue]

FontFace=Calibri
FontColor=#Color4#
FontSize=12
StringCase=Upper
InlineSetting=CharacterSpacing | 2 | 2
AntiAlias=1
Meter=String
MeterStyle=styleRightText
MeasureName=measureIP
X=1160
Y=0
W=215
H=20
Text=IP %1

[Refresh]
Meter=Image
X=1160
Y=0
W=215
H=20
SolidColor=0,0,0,1
LeftMouseDownAction=[?]  <---- what goes in here?
Last edited by balala on April 19th, 2022, 7:13 pm, edited 1 time in total.
Reason: Please use <code> tags whenever are posting codes. It's the </> button.