OutlineClient 1.0.2

dotnet add package OutlineClient --version 1.0.2                
NuGet\Install-Package OutlineClient -Version 1.0.2                
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="OutlineClient" Version="1.0.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add OutlineClient --version 1.0.2                
#r "nuget: OutlineClient, 1.0.2"                
#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.
// Install OutlineClient as a Cake Addin
#addin nuget:?package=OutlineClient&version=1.0.2

// Install OutlineClient as a Cake Tool
#tool nuget:?package=OutlineClient&version=1.0.2                

Unofficial API client for managing Outline server

.net API wrapper for Outline VPN https://getoutline.org/

Install

Build the project yourself and connect it to the project as a .dll or install the nuget package OutlineClient

Configuring

using TDV.OutlineClient;

var _client = new OutlineClient(apiUrl, certSha256)

where apiUrl - server url, like https://127.0.0.1:51083/xlUG4F5BBft4rSrIvDSWuw/. Should be ended on the / char certSha256 - certificate hash, like A7B693EF6582E719F578764D7CE407930DF177B4433ECDD22402FB12162CA7BF

Server

Returns information about the server

var info = await _client.Server.Info();

Renames the server

await _client.Server.Rename("New server name");

Set port for new access keys

int newPort = 12332;
await _client.Server.SetPortForNewAccessKeys(newPort);

Set data limit for all access keys

long bytesLimit = 500000;
await _client.Server.SetDataLimit(bytesLimit);

Delete data limit for all access keys

await _client.Server.DeleteDataLimit();

Access keys

List all

List<AccessKey> keys = await _client.AccessKeys.List();

Get key by id

string keyId = "2";
AccessKey key = await _client.AccessKeys.Get(keyId);

Create a key

AccessKey key1 = await _client.AccessKeys.New();
// or
AccessKey key2 = await _client.AccessKeys.New(method, id, name, password, port, limit);

mehtod - aes-192-gcm or chacha20-ietf-poly1305. aes-192-gcm by default

Remove key

await _client.AccessKeys.Delete("2");

Rename key

string keyId = "2";
await _client.AccessKeys.Rename(keyId, "New key name");

Set key data limit

string keyId = "2";
long bytesLimit = 500000;
await _client.AccessKeys.SetDataLimit(keyId, bytesLimit);

Remove key data limit

string keyId = "2";
await _client.AccessKeys.DeleteDataLimit(keyId);

Metrics

Receive data usage by users for last 30 days

List<MetricsTransfer> sut = await _client.Metrics.List();

Tests

To run tests, set the apiUrl and certSha256 enviromen variables for OutlineClient.Test project

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 107 10/11/2024
1.0.1 102 10/9/2024
1.0.0 105 10/9/2024 1.0.0 is deprecated because it is no longer maintained.