CommunityToolkit.Aspire.Hosting.Ngrok
9.2.2-beta.230
Prefix Reserved
See the version list below for details.
dotnet add package CommunityToolkit.Aspire.Hosting.Ngrok --version 9.2.2-beta.230
NuGet\Install-Package CommunityToolkit.Aspire.Hosting.Ngrok -Version 9.2.2-beta.230
<PackageReference Include="CommunityToolkit.Aspire.Hosting.Ngrok" Version="9.2.2-beta.230" />
<PackageVersion Include="CommunityToolkit.Aspire.Hosting.Ngrok" Version="9.2.2-beta.230" />
<PackageReference Include="CommunityToolkit.Aspire.Hosting.Ngrok" />
paket add CommunityToolkit.Aspire.Hosting.Ngrok --version 9.2.2-beta.230
#r "nuget: CommunityToolkit.Aspire.Hosting.Ngrok, 9.2.2-beta.230"
#addin nuget:?package=CommunityToolkit.Aspire.Hosting.Ngrok&version=9.2.2-beta.230&prerelease
#tool nuget:?package=CommunityToolkit.Aspire.Hosting.Ngrok&version=9.2.2-beta.230&prerelease
CommunityToolkit.Aspire.Hosting.Ngrok library
Provides extension methods and resource definitions for a .NET Aspire AppHost to configure a ngrok container.
Getting Started
Install the package
In your AppHost project, install the package using the following command:
dotnet add package CommunityToolkit.Aspire.Hosting.Ngrok
Example usage
Then, in the Program.cs file of app host, add a ngrok resource and add endpoints to be tunneled following methods:
var myService = builder.AddProject<Projects.MyService>();
var otherSevice = builder.AddProject<Projects.OtherService>();
var authToken = builder
.AddParameter("ngrok-auth-token", "your-ngrok-auth-token", secret: true);
builder.AddNgrok("ngrok", endpointPort: 59600) // omit endpointPort to use random port
.WithAuthToken(authToken)
.WithTunnelEndpoint(myService, "http", "<your-ngrok-domain>")
.WithTunnelEndpoint(otherSevice, "http"); // ngrok will generate a random domain for this service
Querying the ngrok tunneled endpoints
After the ngrok container has started, you can query the ngrok tunneled endpoints using api exposed by the ngrok container:
curl -H "Accept: application/json" -s http://localhost:59600/api/tunnels
This will return a JSON response with the ngrok tunneled endpoints.
{
"tunnels": [
{
"name": "my-http",
"ID": "5baa78f84cffb31a96cccf5bbe992451",
"uri": "/api/tunnels/my-http",
"public_url": "https://<your-ngrok-domain>",
"proto": "https",
"config": {
"addr": "http://host.docker.internal:5165",
"inspect": true
},
// ...
}, {
"name": "other-http",
"ID": "f7f1351d1307e3615ca7de310bf6bb61",
"uri": "/api/tunnels/other-http",
"public_url": "https://0849-94-134-176-242.ngrok-free.app",
"proto": "https",
"config": {
"addr": "http://host.docker.internal:3657",
"inspect": true
},
// ...
}
],
"uri": "/api/tunnels"
}
Additional Information
Feedback & contributing
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 is compatible. 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. |
-
net8.0
- Aspire.Hosting (>= 9.1.0)
-
net9.0
- Aspire.Hosting (>= 9.1.0)
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 |
---|---|---|
9.3.1-beta.253 | 111 | 4/1/2025 |
9.3.1-beta.252 | 87 | 3/27/2025 |
9.3.1-beta.250 | 89 | 3/27/2025 |
9.3.1-beta.249 | 86 | 3/27/2025 |
9.3.1-beta.248 | 87 | 3/27/2025 |
9.3.1-beta.247 | 88 | 3/27/2025 |
9.3.1-beta.244 | 437 | 3/25/2025 |
9.3.1-beta.242 | 436 | 3/24/2025 |
9.3.1-beta.241 | 110 | 3/19/2025 |
9.3.0 | 208 | 3/19/2025 |
9.3.0-beta.239 | 106 | 3/19/2025 |
9.2.2-beta.237 | 116 | 3/19/2025 |
9.2.2-beta.236 | 76 | 3/14/2025 |
9.2.2-beta.230 | 109 | 3/13/2025 |
9.2.2-beta.229 | 108 | 3/13/2025 |
9.2.2-beta.228 | 123 | 3/11/2025 |
9.2.2-beta.227 | 119 | 3/11/2025 |
9.2.2-beta.226 | 121 | 3/11/2025 |
9.2.2-beta.225 | 112 | 3/11/2025 |
9.2.2-beta.224 | 116 | 3/11/2025 |
9.2.2-beta.223 | 124 | 3/10/2025 |
9.2.2-beta.222 | 124 | 3/10/2025 |
9.2.2-beta.220 | 117 | 3/9/2025 |
9.2.2-beta.218 | 119 | 3/9/2025 |
9.2.2-beta.217 | 158 | 3/7/2025 |
9.2.2-beta.216 | 163 | 3/7/2025 |
9.2.2-beta.215 | 160 | 3/7/2025 |
9.2.2-beta.214 | 161 | 3/5/2025 |
9.2.2-beta.213 | 151 | 3/5/2025 |
9.2.2-beta.212 | 155 | 3/5/2025 |
9.2.2-beta.211 | 157 | 3/4/2025 |
9.2.2-beta.210 | 158 | 3/4/2025 |
9.2.2-beta.208 | 60 | 3/3/2025 |
9.2.1 | 109 | 3/3/2025 |
9.2.1-beta.207 | 79 | 3/2/2025 |
9.2.1-beta.206 | 53 | 3/1/2025 |
9.2.1-beta.205 | 55 | 2/27/2025 |
9.2.1-beta.204 | 52 | 2/26/2025 |
9.2.1-beta.203 | 50 | 2/26/2025 |
9.2.0 | 100 | 2/26/2025 |
9.2.0-beta.202 | 45 | 2/26/2025 |
9.2.0-beta.201 | 54 | 2/26/2025 |
9.2.0-beta.199 | 52 | 2/26/2025 |
9.2.0-beta.198 | 45 | 2/26/2025 |
9.1.1-beta.197 | 54 | 2/25/2025 |
9.1.1-beta.196 | 57 | 2/25/2025 |
9.1.1-beta.195 | 49 | 2/25/2025 |
9.1.1-beta.194 | 53 | 2/25/2025 |
9.1.1-beta.193 | 56 | 2/25/2025 |
9.1.1-beta.192 | 56 | 2/24/2025 |
9.1.1-beta.191 | 98 | 2/24/2025 |
9.1.1-beta.190 | 60 | 2/19/2025 |
9.1.1-beta.189 | 50 | 2/19/2025 |
9.1.1-beta.188 | 58 | 2/19/2025 |
9.1.1-beta.187 | 64 | 2/19/2025 |
9.1.1-beta.183 | 64 | 2/18/2025 |
9.1.1-beta.182 | 59 | 2/18/2025 |
9.1.1-beta.181 | 74 | 2/18/2025 |
9.1.1-beta.180 | 59 | 2/17/2025 |
9.1.1-beta.178 | 57 | 2/17/2025 |
9.1.1-beta.177 | 71 | 2/12/2025 |
9.1.1-beta.176 | 67 | 2/11/2025 |
9.1.1-beta.175 | 58 | 2/11/2025 |
9.1.1-beta.173 | 61 | 2/10/2025 |
9.1.1-beta.169 | 58 | 2/6/2025 |
9.1.1-beta.168 | 50 | 2/5/2025 |
9.1.1-beta.166 | 55 | 2/5/2025 |
9.1.1-beta.165 | 46 | 2/5/2025 |
9.1.1-beta.164 | 57 | 2/3/2025 |
9.1.1-beta.162 | 56 | 2/3/2025 |
9.1.1-beta.155 | 54 | 1/30/2025 |
9.1.1-beta.154 | 49 | 1/30/2025 |
9.1.1-beta.153 | 48 | 1/30/2025 |
9.1.1-beta.152 | 44 | 1/29/2025 |
9.1.1-beta.150 | 55 | 1/29/2025 |
9.1.1-beta.148 | 58 | 1/26/2025 |
9.1.1-beta.147 | 49 | 1/26/2025 |
9.1.1-beta.146 | 53 | 1/23/2025 |
9.1.1-beta.145 | 47 | 1/22/2025 |
9.1.1-beta.144 | 48 | 1/22/2025 |
9.1.1-beta.142 | 51 | 1/22/2025 |
9.1.1-beta.140 | 51 | 1/22/2025 |
9.1.1-beta.139 | 48 | 1/21/2025 |
9.1.1-beta.138 | 48 | 1/20/2025 |
9.1.1-beta.137 | 41 | 1/17/2025 |
9.1.1-beta.136 | 43 | 1/15/2025 |
9.1.1-beta.135 | 20 | 1/15/2025 |
9.1.1-beta.134 | 23 | 1/15/2025 |