Commit graph

59 commits

Author SHA1 Message Date
decolua
58788a0d31 TUI Source 2026-05-12 20:26:08 +07:00
Thiên Toán
a48fa4eb21 fix: handle permission denied when creating DATA_DIR (#1005)
Fallback to default user directory (~/.9router) when configured
DATA_DIR is not writable (EACCES/EPERM). Other errors still throw.

Co-authored-by: Thiên Toán <toanalien@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-12 09:35:49 +07:00
FlyingMongoose
76f3d4b74e
feat(mitm): implement dynamic linux cert resolution and NSS db injection (#1010)
- Replaced hardcoded LINUX_CERT_DIR with dynamic filesystem probing to support Debian, Arch, Fedora, and openSUSE system trust stores.
- Added updateNssDatabases helper to seamlessly inject root certificates directly into browser NSS databases (e.g., ~/.pki/nssdb, ~/.mozilla/firefox).
- Supported standard and snap-based Chrome/Chromium and Firefox installations.
- Made browser cert injection resilient, executing under the current user to prevent file ownership issues, and safely falling back if certutil is absent.
2026-05-11 16:05:34 +07:00
decolua
7ad538bcf2 # v0.4.29 (2026-05-10)
## Features
- Add Cline & Kilo Code tool cards
- Tailscale TUN mode for stable Funnel TLS
- Sort APIKEY providers by usage, collapse to top 20

## Improvements
- Local Material Symbols font (no Google Fonts)
- Docker base: Bun → Node 22-alpine
- MITM reads aliases from JSON cache (no native sqlite)
- Stream stall timeout (2 min) in open-sse

## Fixes
- Fal.ai key test: use stable models endpoint
2026-05-10 21:56:40 +07:00
decolua
b39eb61c33 chore: release v0.4.27
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-09 22:48:07 +07:00
decolua
bee8dad946 feat(db): migrate from lowdb to SQLite with repos pattern
- Add modular DB layer (adapters, migrations, repos, helpers)
- Replace localDb/usageDb/requestDetailsDb monoliths with repos
- Add Tailscale tunnel integration & status check API
- Add /api/cli-tools/all-statuses aggregated endpoint
- Add settingsStore (Zustand) and mitm/dbReader
- Add DB unit tests (benchmark, concurrent, migration, vs-lowdb)
2026-05-09 17:48:20 +07:00
decolua
0d61a1d546 feat: add OllamaLocalExecutor and update provider handling
- Introduced OllamaLocalExecutor to handle requests for the "ollama-local" provider.
- Removed the direct URL construction for "ollama-local" from BaseExecutor.
- Updated index.js to include the new OllamaLocalExecutor in the executors mapping.
- Enhanced the ProvidersPage component to support dynamic addition of OpenAI/Anthropic compatible providers.
2026-05-07 16:42:36 +07:00
Jaime Botero
0d182018ab
fix: resolve Kiro IDE MITM handler bugs for AWS CodeWhisperer translation (#921)
- Request translation: add codeWhispererToMessages() to convert CodeWhisperer conversationState to OpenAI messages array
- Response format: replace pipeSSE() with pipeOpenAIasEventStream() to return AWS EventStream binary frames instead of SSE text
- Protocol headers: add required Smithy system headers (:message-type, :event-type, :content-type) to every EventStream frame
- Tool support: add extractTools() to convert CodeWhisperer toolSpecification to OpenAI tool format
- Tool arguments: add safeArgsString() to prevent '[object Object]' corruption during SSE accumulation
- Multi-turn context: add convertAssistantResponseMessage() and convertUserInputMessage() to preserve toolUses and toolResults in history
- Tool dispatch: send toolUseEvent.input as raw JSON string instead of parsed object to match Kiro's internal JSON.parse() expectation
2026-05-07 15:49:51 +07:00
decolua
d4bc42e1f5 feat: add STT support, Gemini TTS, and expand usage tracking
- Speech-to-Text: full pipeline with sttCore handler, /v1/audio/transcriptions
  endpoint, sttConfig for OpenAI, Gemini, Groq, Deepgram, AssemblyAI,
  HuggingFace, NVIDIA Parakeet; new 9router-stt skill
- Gemini TTS: add gemini provider with 30 prebuilt voices and TTS_PROVIDER_CONFIG
- Usage: implement GLM (intl/cn) and MiniMax (intl/cn) quota fetchers; refactor
  Gemini CLI usage to use retrieveUserQuota with per-model buckets
- Disabled models: lowdb-backed disabledModelsDb + /api/models/disabled route
- Header search: reusable Zustand store (headerSearchStore) wired into Header
- CLI tools: add Claude Cowork tool card and cowork-settings API
- Providers: introduce mediaPriority sorting in getProvidersByKind, add
  Kimi K2.6, reorder hermes, drop qwen STT kind
- UI: expand media-providers/[kind]/[id] page (+314), enhance OAuthModal,
  ModelSelectModal, ProviderTopology, ProxyPools, ProviderLimits
- Assets: refresh provider PNGs (alicode, byteplus, cloudflare-ai, nvidia,
  ollama, vertex, volcengine-ark) and add aws-polly, fal-ai, jina-ai, recraft,
  runwayml, stability-ai, topaz, black-forest-labs
2026-05-05 10:32:59 +07:00
decolua
4ba546afe7 Enhance token refresh logic and improve MITM server handling
- Introduced a caching mechanism for in-flight token refresh requests to prevent race conditions and reduce unnecessary API calls.
- Added error handling for unrecoverable refresh errors, ensuring that the application can gracefully handle token reuse and invalidation scenarios.
- Updated the MITM server management to handle port 443 conflicts, allowing users to kill processes occupying the port before starting the server.
- Improved user feedback in the MitmServerCard component regarding port conflicts and admin privileges.
- Refactored the ComboList component to streamline the display of media provider combos.

This update aims to enhance the reliability and user experience of the token management and MITM functionalities.
2026-05-03 22:10:03 +07:00
decolua
6cdf40b44e Refactor global styles and enhance MITM functionality
- Updated global CSS to implement a new brand color palette and improve light/dark theme consistency.
- Enhanced the MitmServerCard component to provide clearer user feedback regarding admin privileges.
- Filtered LLM combos in the CombosPage to ensure only relevant data is displayed.
- Improved APIPageClient layout for better usability and visual consistency.
- Added functionality to save and load DNS tool states in the MITM manager.
- Updated OAuth configuration URLs for Qwen to reflect the new endpoint structure.
- Refined tunnel management logic to improve reliability and user experience.
2026-05-03 18:00:35 +07:00
Rezky Hamid
e40f7ffb98
fix(mitm): gate sudo prompts on server platform (#822) 2026-05-03 15:00:43 +07:00
decolua
936d65ae1c Enhance chat handling and introduce Caveman feature
- Refactored handleChatCore to include Caveman functionality, allowing for terse-style system prompts to reduce output token usage.
- Updated APIPageClient to manage Caveman settings, including enabling/disabling and selecting compression levels.
- Adjusted AntigravityExecutor to consolidate function declarations for compatibility with Gemini.
- Removed unnecessary console logs during translator initialization across multiple routes.
2026-04-30 18:00:38 +07:00
decolua
34da52f144 Fix : Antigravity MITM 2026-04-29 17:28:38 +07:00
decolua
512e3de371 Update version to 0.4.9, enhance README with Trendshift badge, and add new embedding models to providerModels.js. Refactor TTS handling to support additional providers and improve API key validation for media providers. 2026-04-29 11:34:39 +07:00
decolua
8204bba79f Refactor MitmServerCard to use input field for API key selection and enhance shutdown process to remove DNS entries synchronously. Added removeAllDNSEntriesSync function for safe cleanup during shutdown. 2026-04-28 10:08:57 +07:00
mrcyclo
54a67dbeb8
Add TOOL_HOSTS constant for per-tool DNS mapping and integrate into MitmToolCard component (#788) 2026-04-28 09:50:11 +07:00
decolua
368f4c3e7f - Added Hermes tool to CLI tools and updated related components. 2026-04-23 16:39:31 +07:00
decolua
d8c0a7ef44 refactor: enhance MITM server path resolution and ensure runtime server copy 2026-04-22 10:23:31 +07:00
decolua
224981d537 Fix bug 2026-04-14 12:51:23 +07:00
decolua
1fa05eb2ab Refactor execSync and spawn calls to include windowsHide option for better compatibility on Windows environments. 2026-04-14 11:48:59 +07:00
decolua
04cdb75839 Add proactive token refresh lead times for providers and implement Codex proxy management 2026-04-14 11:41:06 +07:00
decolua
6a6e2fcd77 Fix : noAuth support for providers and adjusted MITM restart settings. 2026-04-14 10:14:50 +07:00
decolua
4c28a1671d Enhance provider models and chat handling with new thinking configurations 2026-04-13 12:04:57 +07:00
decolua
ed17a8ffac Feat : Tailscale 2026-04-11 11:36:33 +07:00
decolua
d84489dba4 - Introduce default MITM router base URL and update related components to handle it.
- Add input for MITM router base URL in MitmServerCard component.
2026-04-04 11:25:58 +07:00
Anurag Saxena
7f4f75a807
fix: pass HOME explicitly in sudo inlineCmd so MITM server resolves correct data dir (closes #478) (#482) 2026-04-04 08:52:31 +07:00
decolua
0c9ad12055 Fix : Fix error 400 2026-03-23 12:05:22 +07:00
Loc Nguyen Huu
8c0b4a3e84
[fix] fix mitm for docker and enhance dockerfile (#381)
* [fix] macos

* chore: clean up .gitignore by removing unnecessary start.sh entry

---------

Co-authored-by: lokinh <locnh@uniultra.xyz>
2026-03-23 09:23:14 +07:00
decolua
c8d2497423 refactor: update MitmServerCard and MitmToolCard to use modalError instead of message for error handling
- Replaced message state with modalError in both components for better error management.
- Removed unused message display logic and adjusted action handling to improve clarity.
- Enhanced error handling in doAction and doDnsAction functions to ignore errors gracefully.
- Updated API call responses to streamline user feedback on actions.
2026-03-20 12:44:20 +07:00
decolua
f1c53a319e refactor: update MITM bypass logic and enhance combo name validation 2026-03-19 22:47:32 +07:00
decolua
fd4ec9e5b8 - Enhance passthrough function to support response inspection
- Add cursor tool configuration and update related components
2026-03-19 15:32:29 +07:00
decolua
9877f32efa update submodule: dev pointer to latest
Made-with: Cursor
2026-03-17 16:14:29 +07:00
decolua
03ff35100d Feat : Kiro MITM 2026-03-17 16:12:25 +07:00
decolua
065761268c Feat : Kiro MITM 2026-03-17 16:11:58 +07:00
B1nh M1nh
6546b162cc Make API key optional for MITM server
- Remove hard exit when ROUTER_API_KEY is missing
- Conditionally attach Authorization header only if API_KEY is set
- Allow MITM auto-start without requiring an active API key
- Fallback to default key when no active key is found

Made-with: Cursor
2026-03-17 09:38:19 +07:00
decolua
62d7e61907 Fix MITM window 2026-03-16 09:27:26 +07:00
decolua
1dd5d60724 Fix : MITM 2026-03-14 23:59:22 +07:00
decolua
b98f4ce20e refactor: Fix MITM 2026-03-14 16:38:44 +07:00
decolua
adae2605bf Feat : Auto restart after crash 2026-03-14 09:37:29 +07:00
decolua
758224749d Feat : Add support for the new "alicode-intl" provider 2026-03-07 10:08:55 +07:00
decolua
b7b4ac5592 Fix bug 2026-03-06 09:59:15 +07:00
decolua
f4e08fcd16 Fix : MITM 2026-03-05 21:13:09 +07:00
decolua
573b0f0241 - Refines the overall structure of the CLI tools and MITM server functionalities.
- Add buildQwenBaseUrl function to construct URLs for Qwen resources.
- Update buildProviderUrl to support Qwen model requests.
- Enhance token refresh logic to include provider-specific data for Qwen.
- Refactor CLI Tools page to exclude MITM tools and streamline model retrieval.
- Introduce new components for MITM server management.
- Update API routes to handle Qwen-specific resource URLs and improve error handling.
2026-03-05 11:25:03 +07:00
decolua
7195fee2f6 Refactor UsageChart and UsageStats components to support dynamic period selection 2026-03-03 16:19:44 +07:00
decolua
f2306e6962 Fix MITM 2026-03-03 15:52:20 +07:00
decolua
07d4cdfa7e Fix : Claude OAuth 2026-03-03 14:46:05 +07:00
decolua
2f4b813c5b feat(usage): implement timeout and error handling for antigravity usage and subscription requests
- Add a 10-second timeout for fetch requests in getAntigravityUsage and getAntigravitySubscriptionInfo functions.
- Include error logging for fetch failures in both functions.
- Update headers to include "x-request-source" for MITM bypass.
- Enhance proxyFetch with DNS resolution and MITM bypass capabilities.
- Ensure proxyFetch is loaded in the API route for proper fetch patching.
2026-02-28 12:12:49 +07:00
decolua
833069caac Fix MITM on window 2026-02-28 10:04:57 +07:00
decolua
9003675b71 - Updated CLI tool components to accept initial status as a prop, improving state management for tool statuses.
- Added functionality to fetch and set statuses for various CLI tools (Claude, Codex, Droid, OpenClaw, Antigravity) on component mount.
- Enhanced error handling and logging in the OAuth provider test utilities and DNS management functions.
- Improved the MITM server to handle multiple target hosts and provide clearer error messages regarding port usage.
2026-02-25 16:32:05 +07:00