Guideants.Proxy
0.1.0
dotnet add package Guideants.Proxy --version 0.1.0
NuGet\Install-Package Guideants.Proxy -Version 0.1.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="Guideants.Proxy" Version="0.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Guideants.Proxy" Version="0.1.0" />
<PackageReference Include="Guideants.Proxy" />
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 Guideants.Proxy --version 0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Guideants.Proxy, 0.1.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 Guideants.Proxy@0.1.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=Guideants.Proxy&version=0.1.0
#tool nuget:?package=Guideants.Proxy&version=0.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Guideants.Proxy
ASP.NET Core middleware for proxying GuideAnts API calls with secure API key injection.
Installation
dotnet add package Guideants.Proxy
Quick Start
using Guideants.Proxy;
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
// Add the proxy
app.MapGuideantsProxy("/api/chat", options =>
{
options.ApiKey = builder.Configuration["Guideants:ApiKey"]!;
});
app.Run();
Configuration Options
app.MapGuideantsProxy("/api/chat", options =>
{
// Required: Your GuideAnts API key
options.ApiKey = builder.Configuration["Guideants:ApiKey"]!;
// Optional: Target API URL (defaults to https://api.guideants.ai)
options.TargetBaseUrl = "https://api.guideants.ai";
// Optional: Distributed cache for guide configuration
options.Cache = app.Services.GetService<IDistributedCache>();
options.CacheTtl = TimeSpan.FromMinutes(5);
// Optional: Logger
options.Logger = app.Services.GetRequiredService<ILogger<Program>>();
// Optional: Request transformation
options.TransformRequest = async (context, request) =>
{
// Add custom headers, modify the request, etc.
var user = context.User.Identity?.Name;
if (user != null)
{
request.Headers.Add("X-User", user);
}
};
// Optional: Metrics callbacks
options.OnRequest = info =>
{
Console.WriteLine($"Request: {info.Method} {info.Path}");
};
options.OnResponse = info =>
{
Console.WriteLine($"Response: {info.StatusCode} in {info.Duration.TotalMilliseconds}ms");
};
});
With Authentication
app.MapGuideantsProxy("/api/chat", options =>
{
options.ApiKey = builder.Configuration["Guideants:ApiKey"]!;
})
.RequireAuthorization("MyPolicy");
Client Usage
Once the proxy is set up, configure the GuideAnts chat component to use it:
<guideants-chat
proxy-url="https://your-server.com/api/chat"
pub-id="your-published-guide-id">
</guideants-chat>
Or programmatically:
const chat = document.querySelector('guideants-chat');
chat.setProxyUrl('https://your-server.com/api/chat');
chat.setPubId('your-published-guide-id');
How It Works
- Client requests go to your server at
/api/chat/* - Proxy injects the API key header
- Requests are forwarded to
https://api.guideants.ai/api/published/* - Responses (including SSE streams) are forwarded back to the client
Security Notes
- Never expose your API key in client-side code
- The proxy strips the
Authorizationheader from incoming requests - Add your own authentication middleware before the proxy
- Use HTTPS in production
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 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 |
|---|---|---|
| 0.1.0 | 183 | 11/26/2025 |
Initial release - Server-side proxy middleware for secure API key management with SSE streaming support.