WindscribeNet 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package WindscribeNet --version 1.0.0
                    
NuGet\Install-Package WindscribeNet -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="WindscribeNet" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="WindscribeNet" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="WindscribeNet" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add WindscribeNet --version 1.0.0
                    
#r "nuget: WindscribeNet, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package WindscribeNet@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=WindscribeNet&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=WindscribeNet&version=1.0.0
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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.

Version Downloads Last Updated
1.0.2 135 4/19/2025
1.0.1 97 4/19/2025
1.0.0 108 4/19/2025

Initial release