FrpSharp.Client
1.0.0
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package FrpSharp.Client --version 1.0.0
NuGet\Install-Package FrpSharp.Client -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="FrpSharp.Client" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FrpSharp.Client" Version="1.0.0" />
<PackageReference Include="FrpSharp.Client" />
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 FrpSharp.Client --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: FrpSharp.Client, 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 FrpSharp.Client@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=FrpSharp.Client&version=1.0.0
#tool nuget:?package=FrpSharp.Client&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
FrpSharp.Client
FRP client library for .NET — embed FRP tunneling into any ASP.NET Core application via appsettings.json and dependency injection.
✨ Native AOT Ready
FrpSharp.Client is fully compatible with Native AOT compilation:
- Zero trim warnings — all types annotated for trimming safety
- Source-generated JSON — uses
System.Text.Jsonsource generators (FrpSharpJsonContext) for all serialization - No reflection — polymorphic proxy/visitor deserialization via custom
JsonConverterwith source-generated type info - Single-file + AOT — produce tiny, fast-starting native executables with
dotnet publish -p:PublishAot=true
# Publish your ASP.NET Core app + FrpSharp as a single native binary
dotnet publish -r linux-x64 -p:PublishAot=true
# → ~15MB native binary, <100ms startup
Quick Start
dotnet add package FrpSharp.Client
// Program.cs
builder.Services.AddFrpSharp(builder.Configuration.GetSection("FrpSharp"));
// appsettings.json
{
"FrpSharp": {
"serverAddr": "your-frps-server.com",
"serverPort": 7000,
"auth": {
"method": "token",
"token": "your-token"
},
"transport": {
"protocol": "tcp",
"tls": { "enable": true }
},
"proxies": [
{
"type": "tcp",
"name": "web",
"localIP": "127.0.0.1",
"localPort": 8080,
"remotePort": 80
}
]
}
}
That's it! FrpSharp automatically connects to frps on startup and disconnects gracefully on shutdown.
Features
- Native AOT — fully trim-safe, source-generated JSON, zero reflection
- One-line integration —
services.AddFrpSharp(configuration) - appsettings.json — native ASP.NET Core configuration (also supports TOML)
- Multi-target —
net8.0andnet10.0 - Protocol compatible — works with Go frp's
frpsserver (v0.70.x) - TLS support — custom CA, mTLS, or skip verification (matching Go frpc behavior)
TLS Certificate Configuration
FrpSharp's TLS behavior matches Go frpc exactly:
| Scenario | Configuration | Behavior |
|---|---|---|
No trustedCaFile |
"tls": { "enable": true } |
Skip all cert verification (default, matches Go frpc) |
With trustedCaFile |
"tls": { "trustedCaFile": "ca.crt" } |
Verify cert chain against custom CA |
Supported Proxy Types
| Type | Description | Required Fields |
|---|---|---|
tcp |
TCP proxy | remotePort |
udp |
UDP proxy | remotePort |
http |
HTTP proxy | customDomains or subdomain |
https |
HTTPS proxy | customDomains or subdomain |
stcp |
Secret TCP | secretKey |
xtcp |
P2P TCP | secretKey |
sudp |
Secret UDP | secretKey |
License
MIT
| 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 is compatible. 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.
-
net10.0
- FrpSharp.Core (>= 1.0.0)
-
net8.0
- FrpSharp.Core (>= 1.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.