{"id":50705180,"url":"https://github.com/Villoh/tunnel-agent","last_synced_at":"2026-06-26T11:00:35.855Z","repository":{"id":357691009,"uuid":"1233408615","full_name":"Villoh/tunnel-agent","owner":"Villoh","description":"Use your OAuth subscriptions or API keys in any coding agent, Factory Droid, Cursor, and more. Tunnel Agent handles provider authentication and routes requests through CLIProxyAPI.","archived":false,"fork":false,"pushed_at":"2026-06-24T21:24:57.000Z","size":18032,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-24T23:11:58.922Z","etag":null,"topics":["ai-agents","avalonia","cliproxyapi","csharp","desktop-app","dotnet","oauth","windows"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Villoh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-08T23:40:50.000Z","updated_at":"2026-06-24T21:25:02.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Villoh/tunnel-agent","commit_stats":null,"previous_names":["villoh/tunnel-agent"],"tags_count":37,"template":false,"template_full_name":null,"purl":"pkg:github/Villoh/tunnel-agent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Villoh%2Ftunnel-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Villoh%2Ftunnel-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Villoh%2Ftunnel-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Villoh%2Ftunnel-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Villoh","download_url":"https://codeload.github.com/Villoh/tunnel-agent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Villoh%2Ftunnel-agent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34813782,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-26T02:00:06.560Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-agents","avalonia","cliproxyapi","csharp","desktop-app","dotnet","oauth","windows"],"created_at":"2026-06-09T11:00:26.329Z","updated_at":"2026-06-26T11:00:35.843Z","avatar_url":"https://github.com/Villoh.png","language":"C#","funding_links":[],"categories":["C# #"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"src/TunnelAgent.Avalonia/Assets/logo.png\" width=\"128\" height=\"128\" alt=\"Tunnel Agent Icon\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eTunnel Agent\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  Desktop UI for \u003ca href=\"https://github.com/router-for-me/CLIProxyAPI\"\u003eCLIProxyAPI\u003c/a\u003e and \u003ca href=\"https://github.com/henrique-coder/perplexity-webui-scraper\"\u003ePerplexity WebUI Scraper\u003c/a\u003e. Manage OAuth providers, API keys, and Perplexity session accounts, then point any coding agent at the local endpoint.\u003cbr\u003e\u003cbr\u003eOne click to connect. Works with whatever you already have.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"LICENSE\"\u003e\u003cimg alt=\"MIT License\" src=\"https://img.shields.io/badge/License-MIT-146CF9?style=for-the-badge\u0026labelColor=ffffff\u0026logoColor=000000\u0026logo=opensourceinitiative\"\u003e\u003c/a\u003e\n  \u003cimg alt=\"Platform\" src=\"https://img.shields.io/badge/Platform-Windows-146CF9?style=for-the-badge\u0026labelColor=ffffff\u0026logoColor=000000\u0026logo=windows\"\u003e\n  \u003cimg alt=\".NET\" src=\"https://img.shields.io/badge/.NET-10-146CF9?style=for-the-badge\u0026labelColor=ffffff\u0026logoColor=000000\u0026logo=dotnet\"\u003e\n  \u003cimg alt=\"Version\" src=\"https://img.shields.io/github/v/tag/Villoh/tunnel-agent?label=Version\u0026style=for-the-badge\u0026color=146CF9\u0026labelColor=ffffff\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/Villoh/tunnel-agent/releases\"\u003eDownload\u003c/a\u003e\n  ·\n  \u003ca href=\"https://github.com/Villoh/tunnel-agent/issues\"\u003eIssues\u003c/a\u003e\n  ·\n  \u003ca href=\"TODO.md\"\u003eTODO\u003c/a\u003e\n  ·\n  \u003ca href=\"CONTRIBUTING.md\"\u003eContributing\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/Villoh/tunnel-agent/main/assets/preview.gif\" alt=\"Tunnel Agent preview\" width=\"100%\"\u003e\n\u003c/p\u003e\n\n---\n\n\u003e [!WARNING]\n\u003e This app has only been tested on **Windows**. It may require changes to work correctly on Linux or macOS. Contributions to add full support for both platforms are very welcome.\n\n## Features\n\n- 🖥️ **Native Windows Experience**: clean Avalonia UI that respects your system theme and keeps local engine management in one place\n- 🌍 **Multi-Language UI (i18n)**: fully localized interface with runtime language switching across 14 languages, auto-detecting your system language on first launch\n- 🔀 **Multi-Engine Control**: run and manage both CLIProxyAPI and Perplexity from the same desktop app, with per-engine configuration, endpoint controls, and status\n- 🚀 **One-Click Server Management**: start and stop each local engine directly from the Providers view\n- 🔐 **Credential Storage**: secure handling for OAuth tokens, custom provider API keys, and file-based Perplexity session accounts stored under Tunnel Agent settings\n- 👥 **Provider Management**: connect Claude Code, OpenAI Codex, Gemini CLI, Kimi, Antigravity, xAI (Grok), and custom OpenAI-compatible providers\n- 🧠 **Perplexity WebUI Sessions**: add multiple Perplexity accounts, set a default session, reset accounts safely, and auto-install the Perplexity engine when needed\n- 🎚️ **Model Visibility**: browse available models grouped by connected provider or engine source, including Perplexity-backed model listings\n- 🔁 **Model Fallback**: create virtual models backed by ordered provider/model chains, automatically fail over when quota is exhausted, expose the virtual models through `/v1/models`, and cache the last working route for a configurable duration\n- 📈 **Usage Dashboard**: Home view with live usage telemetry (calls, tokens, success rate) over selectable time ranges, an interactive usage chart, and a summary table that groups by provider or model — backed by SQLite history that persists across restarts\n- 💰 **Cost Estimation**: per-request cost estimates using live OpenRouter pricing (input/output/cache read \u0026 write rates) cached on disk for offline use, with a built-in price table fallback\n- 📊 **Live Status**: see sidebar engine health plus focused engine state, endpoint, and release info\n- ⚙️ **Configuration**: control startup behaviour, per-engine ports, updates, release selection, routing strategy, and credential actions\n\n## Engine Overview\n\n### [CLIProxyAPI](https://github.com/router-for-me/CLIProxyAPI)\n\nCLIProxyAPI remains the main unified OpenAI-compatible local proxy for OAuth and upstream providers. Tunnel Agent lets you:\n\n- install and update CLIProxyAPI releases\n- switch to a pinned release instead of always following latest\n- manage connected providers and custom OpenAI-compatible accounts\n- inspect provider quotas and available models exposed by the running proxy\n\n### [Perplexity WebUI Scraper](https://github.com/henrique-coder/perplexity-webui-scraper)\n\nTunnel Agent now includes first-class support for the Perplexity WebUI Scraper engine. You can:\n\n- install and start Perplexity from the same UI\n- manage Perplexity session token accounts separately from CLIProxy auth files\n- store each Perplexity account as its own JSON file under the Tunnel Agent settings directory\n- generate a Perplexity session token directly from the UI with a guided email/OTP/TOTP wizard\n- edit account labels in-place from the account list\n- view Perplexity endpoint status and available models from the Perplexity server\n- keep Perplexity on a selected release instead of being forced to latest\n\n## Supported Ecosystem\n\n### AI Providers\n\n| Provider                 | Auth method         |\n| ------------------------ | ------------------- |\n| Claude (Anthropic)       | OAuth               |\n| Gemini CLI (Google)      | OAuth               |\n| OpenAI Codex             | OAuth               |\n| Kimi (Moonshot)          | OAuth               |\n| Antigravity              | OAuth               |\n| xAI (Grok)               | OAuth               |\n| Perplexity               | WebUI session token |\n| Custom OpenAI-compatible | API key + base URL  |\n\n### IDE Quota Tracking (Monitor Only)\n\n| IDE    | Description                                |\n| ------ | ------------------------------------------ |\n| Cursor | Auto-detected when installed and logged in |\n| Kiro   | Auto-detected when installed and logged in |\n| Trae   | Auto-detected when installed and logged in |\n\n\u003e [!NOTE]\n\u003e These IDEs are only used for quota usage monitoring. They cannot be used as providers for the proxy.\n\n### Agents\n\n| Agent         | Config method                                                     |\n| ------------- | ----------------------------------------------------------------- |\n| Claude Code   | `~/.claude/settings.json`                                         |\n| Codex CLI     | `~/.codex/config.toml` + `auth.json`                              |\n| Gemini CLI    | Environment variables                                             |\n| Amp           | `~/.config/amp/settings.json` + `~/.local/share/amp/secrets.json` |\n| OpenCode      | `~/.config/opencode/opencode.json`                                |\n| Pi            | `~/.pi/agent/models.json`                                         |\n| Factory Droid | `~/.factory/settings.json`                                        |\n\n### Languages\n\nThe interface is fully localized with runtime language switching (Configuration → General → Language). Use **System default** to follow the current OS language, or pick a specific locale to keep a manual override.\n\n| Language       | Locale  |\n| -------------- | ------- |\n| System default | `null`  |\n| English        | `en-US` |\n| Español        | `es-ES` |\n| Português      | `pt-PT` |\n| Italiano       | `it-IT` |\n| Français       | `fr-FR` |\n| Deutsch        | `de-DE` |\n| 简体中文       | `zh-CN` |\n| 日本語         | `ja-JP` |\n| العربية        | `ar-SA` |\n| Українська     | `uk-UA` |\n| Русский        | `ru-RU` |\n| हिन्दी         | `hi-IN` |\n| 한국어         | `ko-KR` |\n| Türkçe         | `tr-TR` |\n\n\u003e [!NOTE]\n\u003e Translations live in [`src/TunnelAgent.Avalonia/Resources/Strings*.resx`](src/TunnelAgent.Avalonia/Resources), one file per locale (e.g. `Strings.es-ES.resx`), with `Strings.resx` as the English base. To fix or improve a translation, edit the `\u003cvalue\u003e` text for the matching key in that locale's file (keep the `name` keys and any `{0}` placeholders unchanged) and open a PR. To add a new language, copy `Strings.resx` to `Strings.\u003clocale\u003e.resx`, translate the values, and register the locale in `LocalizationService.cs`.\n\n## Installation\n\n**Installer (recommended):** download `TunnelAgent-x.y.z-win-Setup.exe` from the [latest release](https://github.com/Villoh/tunnel-agent/releases/latest) and run it. Updates are applied automatically in the background.\n\n**Portable:** download `TunnelAgent-x.y.z-win-x64-portable.zip`, extract it, and run `TunnelAgent.exe`. No installation required.\n\n**Scoop:**\n\n```powershell\nscoop bucket add villoh https://github.com/Villoh/scoop-bucket\nscoop install tunnel-agent\n```\n\n**Requirements:** Windows 10 or later.\n\n## Usage\n\n1. **Start the engine**: click the play button next to the endpoint. The status indicator turns green when the engine is running.\n2. **Connect providers**: open the Providers tab for CLIProxyAPI, connect OAuth providers (Claude, Gemini CLI, Kimi…) or add custom API key accounts.\n3. **Configure your agents**: open the Agents tab to auto-write or manually copy the proxy config for each agent. For unsupported clients, copy the endpoint (e.g. `http://127.0.0.1:8317/v1`) from the Providers header and configure it manually.\n4. **Track quota**: open the Quota tab to see remaining quota for connected CLIProxyAPI providers and standalone IDE accounts (Kiro, Trae).\n\n## Development\n\n**Requirements:** [.NET SDK 10.0.203+](https://dotnet.microsoft.com/download)\n\nClone and run:\n\n```pwsh\ngit clone https://github.com/Villoh/tunnel-agent.git\ncd tunnel-agent\ndotnet restore\ndotnet run --project src/TunnelAgent.Avalonia/TunnelAgent.Avalonia.csproj\n```\n\n\u003e If the app is already running, stop it before rebuilding; Windows locks `TunnelAgent.exe` while it is open.\n\n## Credits\n\n- [VibeProxy](https://github.com/automazeio/vibeproxy): original concept and inspiration\n- [CLIProxyAPI](https://github.com/router-for-me/CLIProxyAPI): the unified proxy that powers multi-provider support\n- [perplexity-webui-scraper](https://github.com/henrique-coder/perplexity-webui-scraper): Perplexity engine and session token CLI\n- [Quotio](https://github.com/nguyenphutrong/quotio): reference implementation for quota tracking and IDE account detection\n- [OpenUsage](https://github.com/robinebers/openusage): provider API documentation and reference implementations for Claude, Codex, Kiro, and more quota endpoints\n\n## Contributing\n\nContributions are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\n## Security\n\nTo report a vulnerability, see [SECURITY.md](SECURITY.md). Do not open a public issue.\n\n## License\n\nMIT License, see [LICENSE](LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVilloh%2Ftunnel-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FVilloh%2Ftunnel-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FVilloh%2Ftunnel-agent/lists"}