SoftEther Tray Monitor V1.5 in Python

Clicking a link to eBay [or other affiliations] may result in a referral commission being paid if a purchase is made.

Disclaimer; This code is generated with ChatGPT after a lot of two steps forward, one step back…
Its giving me an insight into coding
I like to find out how something works roughly before starting fresh….

If you can help make the code better or suggest new ideas, (or it doesn’t seem to work) please comment below or email me.

So, in my new found of quest of writing code with ChatGPT;

SoftEther Tray Monitor V1.5

A Python code to load a small widget into the tray that when clicked on, shows sessions connected to a local Softether VPN Server, based on VPN Hub. (instead of going through the Softether VPN GUI). It will also show a notification pop up through the native windows notification system when a new user connects. (ensure ‘Focus Assist’ is allowing notifications!)

It works by using Softethers ‘vpncmd’ command line program to pull the required info and pass it to the widget.

First run will open a command line window, but ignore it – just minimise it if needs be. The program should prompt you for:

  • VPN Hub Name
  • The server management password* (see note)
  • Refresh interval
  • And the location of ‘vpncmd’ (Should autodetect this) (may need double \\ in path?)

After this, once running clicking on the icon in the tray will toggle the widget showing connected sessions.

If you right click the icon and click ‘Startup Setup’, a batch file will be created in its folder that runs the program with pythonw.exe – This keeps the command line window hidden. It also creates a link to this in your local user Startup folder, so next time, it will load with windows startup.

Requirements;

  • Python 3, installed and associated to run .py files.
  • Windows 10 (probably work with later versions to?)

Recommend that the extracted folder from ZIP download is placed in C Drive (Standard Windows drive letter)

*Note; The server management password is stored in plain text. If this is of concern to you, please do not use this.

Future things to do:

  • encrypt server management password
  • package in a .exe file
  • Anything anyone can suggest

Download

SoftEtherTrayMonitor-V1.5
Download Python | Python.org

Leave a Reply