WindscribeNet 1.0.0
See the version list below for details.
dotnet add package WindscribeNet --version 1.0.0
NuGet\Install-Package WindscribeNet -Version 1.0.0
<PackageReference Include="WindscribeNet" Version="1.0.0" />
<PackageVersion Include="WindscribeNet" Version="1.0.0" />
<PackageReference Include="WindscribeNet" />
paket add WindscribeNet --version 1.0.0
#r "nuget: WindscribeNet, 1.0.0"
#:package WindscribeNet@1.0.0
#addin nuget:?package=WindscribeNet&version=1.0.0
#tool nuget:?package=WindscribeNet&version=1.0.0
WindscribeNet
WindscribeNet is an (unofficial) .NET 8 library for controlling Windscribe via C#. It provides clean, typed access to VPN operations like getting status, connecting and disconnecting, firewall control, and IP checking.
(IP checking is not really a part of Windscribe and is done with https://api.ipify.org)
✅ Features
- Connect/disconnect to VPN
- Toggle firewall on/off
- Get connection status
- Wait until connected/disconnected
- Wait until a provided status is obtained
- Get current public IP
⚙️ Requirements
- .NET 8.0
- Windscribe CLI installed and available in
PATH
or a known default location (this is installed when Windscribe is installed, see: https://windscribe.com/download/) - Tested on Windows 10. Linux support is currently untested but likely compatible
📦 Installation
Just click install on the nuget package.
💻 Usage examples
Check current status
using WindscribeNet;
StatusCommandResponse status = await Windscribe.GetStatusAsync();
Console.WriteLine(status.ConnectState.State); // Connected / Disconnected
Connect and wait
await Windscribe.ConnectAsync();
await Windscribe.WaitUntilConnectedAsync();
(Note: The ConnectAsync()
only returns when Windscribe does so because it's done connecting but adding the WaitUntilConnectedAsync()
afterwards just makes sure that it definitely is connected by checking the status too.)
Disconnect and wait
await Windscribe.DisconnectAsync();
await Windscribe.WaitUntilDisconnectedAsync();
(Note: see the note on the connection example above, the same goes for this.)
Toggle firewall
using WindscribeNet.Enums;
await Windscribe.SetFirewallAsync(ActiveState.Off);
await Windscribe.SetFirewallAsync(ActiveState.On);
Get current public IP
string ip = await IpAddressHelper.GetCurrentAsync();
Console.WriteLine($"IP address: {ip}");
📖 License
MIT (do whatever you want with it, you're welcome to contribute to the repository if you have any improvements.)
🙏 Acknowledgements
Thanks to the creators of Windscribe for building a solid VPN product and for making parts of their code available as open source.
This library would not have been possible without the insights gained from their CLI implementation.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Initial release