Commit Graph
100 Commits
Author SHA1 Message Date
MythEclipse 35c0123529 feat: expand IPv6 pool to 18 addresses (7 base + 11 ffff range) 2026-06-19 19:38:33 +07:00
MythEclipse 2ff31eabe7 fix: include workflow paths in build trigger 2026-06-19 19:13:19 +07:00
MythEclipse d447523bb1 fix: use SHA tags instead of latest for GHCR images 2026-06-19 19:12:23 +07:00
MythEclipse 2d3776b54b fix: lowercase GHCR image name 2026-06-19 19:11:38 +07:00
MythEclipse 17338a7dca feat: IPv6 outbound rotation via curl --interface
- Add IPv6SourcePool for round-robin IP rotation
- fetchViaCurl: Bun.spawn + curl -6 --interface for source binding
- Auto-fallback to regular fetch when IPv6 connection fails
- Response decompression via --compressed flag
- Docker + GHCR build/deploy workflows
- 8 routable IPv6 addresses on VPS
2026-06-19 19:07:46 +07:00
MythEclipse cb6191902e fix: critical bugs, serverless stability, and security hardening
Bug Fixes:
- Fix rate limiter API mismatch: check() -> checkAsync() in index.ts, worker.ts, api/relay.ts
- Fix WebSocket SSRF silent drop: return error Response instead of undefined
- Fix isDevMode() default: changed from true to false (production-safe)
- Fix process.env -> env bindings in worker.ts requireAuth for Cloudflare Workers
- Fix Bun.file() crash in Workers: add try/catch with fallback
- Fix Bun.CryptoHasher -> Web Crypto API in mimo-auth.ts for Workers compat

Architecture:
- Add public methods to ProxyPool (getEntryAtIndex, getProxyUrlAtIndex, getCurrentIndex, setCurrentIndex) to remove all 'as any' casts in SessionProxyPool
- Add addProxy() method for manual proxy management
- Add loadAsync(), tryLoadAsync(), loadFromString() to ProxyPool

Serverless Stability:
- Add optional DNS rebinding protection via SSRF_DNS_CHECK env flag
- CORS cache now auto-invalidates when CORS_ORIGIN env changes
- Rate limiter max-size eviction (10k keys) prevents unbounded memory growth

Tests:
- Fix type assertions in test files (body as Record<string, unknown>)
- All 153 tests pass, typecheck clean
2026-06-19 18:10:49 +07:00
MythEclipseandClaude 6d61dcba8f prioritas langsung baru proxy
Ubah strategi retry di fetchWithRetry dan fetchWithSessionRetry:
- Langsung (direct) sebagai percobaan pertama sebelum proxy pool
- Proxy sebagai fallback jika direct gagal

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-18 01:45:34 +07:00
MythEclipseandClaude ca8de1ba00 feat: migrate deepseek route to aichat.org with all models
- Replace broken deep-seek.ai endpoint with aichat.org relay
- Add AichatSession manager with cookie/CSRF bootstrap and auto-refresh
- Add exponential backoff retry (3 attempts) for session bootstrap
- Add all 9 aichat.org model routes via shared config (zero duplication)
- Session cookies auto-refreshed from Set-Cookie on every API response
- Auto-heal: 401 triggers session re-bootstrap + retry transparently

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-18 00:02:54 +07:00
MythEclipseandClaude 778180a5dc fix: inline test-api.html as TypeScript string export for Vercel
Bun import of .html files returns HTMLBundle (not a string) in Vercel's
serverless environment, and Bun.file() has no filesystem access there.
Copy the HTML content into api/test-api-content.ts as an escaped string
export, then import it in api/relay.ts — Bun bundler inlines it.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-17 14:14:13 +07:00
MythEclipseandClaude f8fd18612b fix: use Bun.file().text() at module scope to inline test-api.html
Bun HTML import returns HTMLBundle object on Vercel serverless, which
renders as '[object HTMLBundle]'. Using Bun.file().text() at top-level
module scope ensures Bun bundler inlines the raw string at build time.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-17 13:54:13 +07:00
MythEclipseandClaude bcba2c5386 fix: use text import for test-api.html in Vercel deployment
Bun HTML import returns HTMLBundle object, not a string — Vercel
renders it as '[object HTMLBundle]'. Use 'with { type: "text" }'
to import as raw string so it renders properly.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-17 13:51:04 +07:00
MythEclipseandClaude bc6edbef3e fix: serve test-api.html at /docs on Vercel and Worker deployments
Update api/relay.ts (Vercel entry point) and src/worker.ts (Cloudflare
Workers entry point) to serve the interactive API test console at /docs
and /test, replacing the old inline docs page.

api/relay.ts uses Bun's HTML import (bundled inline at build time)
since filesystem access is unavailable in Vercel serverless runtime.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-17 13:37:23 +07:00
MythEclipseandClaude aa3f96ef2d refactor: merge /test into /docs, serve test-api.html publicly
Both /docs and /test now serve the API test console (public/test-api.html),
replacing the old inline docs page.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-17 13:28:43 +07:00
MythEclipseandClaude e4406b586e feat: add Xiaomi MiMo Free API provider (mimo-auto)
- Add mimo-auth.ts: JWT bootstrap with device fingerprint, cached auto-refresh, 401/403 invalidation
- Add mimo-auto entry to MODEL_ROUTES with anti-abuse system message injection
- Inject JWT auth + x-session-affinity header before Mimo API fetch
- Retry once on 401/403 (invalidate JWT, re-bootstrap)
- Extend SSE passthrough for mimo-free provider
- Strip 'data:' prefix from Mimo non-streaming responses

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-17 13:22:07 +07:00
MythEclipse 89f0ff0f32 a 2026-06-17 12:29:54 +07:00
MythEclipseandClaude 7cbf6fd817 feat: add per-model proxy cooldown for rate-limit handling
ProxyPool:
- Add cooldowns map (host:port::model -> expiry) and cooldownDuration (60s default)
- Add markRateLimited(model) — puts current proxy in cooldown for a model
- Add isProxyInCooldown, isIndexInCooldown, isCurrentInCooldown checks
- Modify rotate(model?) — skip proxies in cooldown for the given model
- Add setCooldownDuration(ms) for configuration

SessionProxyPool:
- Add markRateLimited(sessionId, model) — delegates to underlying pool
- Modify rotateNow(sessionId, model?) — skip cooldown proxies
- Modify acquire(sessionId, model?) — skip cooldown when picking least-loaded
- Modify pickLeastUsedIndex(model?) — skip cooldown proxies in scan

fetch-utils.ts:
- Add extractModel helper — extracts model from context string
- On HTTP 429: call markRateLimited(model) before markFailed
- Pass model to rotate() / rotateNow() / acquire() throughout

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-17 04:59:16 +07:00
MythEclipseandClaude 283ed26231 fix: exhaust all proxies then direct fallback before giving up
fetchWithRetry:
- Dynamically calculate maxAttempts = pool.size + 1 (direct fallback)
- Try every proxy in pool via rotation, then direct as last resort
- Only classify as error when even direct produces no response

fetchWithSessionRetry:
- Default maxRetries = sessionPool.size + 1 instead of hardcoded 3
- Try pool.size proxy attempts (each on a different proxy via rotateNow),
  then 1 direct attempt (no proxy) before giving up
- Only classify as error if direct also returns no response

ProxyPool.rotate():
- Skip proxies that have exceeded the failure threshold (isFailed)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-17 04:45:30 +07:00
MythEclipseandClaude f1943353ef fix: rotate proxy on every failure, return proper HTTP status
- Add rotateNow() to SessionProxyPool — force-rotate session to a
  different proxy immediately (excludes current index to ensure real
  rotation). Uses round-robin scan from oldIndex+1 so all proxies
  get used, not just bouncing between two.

- fetchWithSessionRetry: call rotateNow() on every failure instead of
  markFailed() which only rotated after threshold. Return last HTTP
  response (e.g. 429) instead of classifying as 502 when we have one.

- fetchWithRetry: rotate pool on every failure for consistency.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-17 04:40:45 +07:00
MythEclipseandClaude 9c2f0a65f0 feat: add request logging to AI proxy routes
- Log session ID, model, pool size, and active session count on every
  POST /v1/chat/completions and POST /v1/messages

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-17 04:30:07 +07:00
MythEclipseandClaude 45f1b33fb6 feat: add structured logging across proxy pool and fetch utils
- fetch-utils.ts: logProxy() — logs every attempt, proxy used, success/failure
  with sessionId prefix for traceability
- proxy-pool.ts: logPool() — logs acquire/release/rotate/markFailed/markSuccess
  with active session count and proxy host info
- Both use consistent [prefix] HH:MM:SS.mmm key=value format

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-17 04:29:31 +07:00
MythEclipseandClaude 519fe3af83 fix: proxy pool now actively distributes IPs across sessions
- fetchWithRetry: use proxy on every attempt (not just fallback after direct)
- fetchWithSessionRetry: call acquire() on attempt 0 so new sessions get
  a least-loaded proxy assigned, enabling IP spread across concurrent users
- Update docstrings to reflect new strategy

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-17 04:26:26 +07:00
MythEclipseandClaude 9bd6acddc5 feat: implement session-based sticky proxy pool with auto-failover
Add SessionProxyPool for per-session sticky proxy allocation with
load-balanced least-used selection and auto-rotation on failure.
Introduce fetchWithSessionRetry for transparent retry with proxy
rotation. Wire into AI proxy handlers (OpenAI + Anthropic) with
stream lifecycle cleanup.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-16 23:50:47 +07:00
MythEclipseandClaude 6c945dcbf4 feat: add API test page at /test endpoint
- New public/test-api.html — browser-based test UI for all proxy endpoints
- Health check, model listing, Chat Completions (stream+non-stream),
  Anthropic Messages (stream+non-stream), and generic HTTP relay
- Server serves /test route from public/test-api.html

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-16 22:58:17 +07:00
MythEclipse b09bca8def feat(core): implement robust fetch utilities and stream management
Introduce a centralized `fetch-utils.ts` to handle retry logic with proxy fallback, SSE line buffering to prevent chunk-boundary corruption, and graceful shutdown via active reader tracking.

Key changes:
- Add `fetchWithRetry` for automatic direct-to-proxy failover.
- Implement `SSELineBuffer` to ensure reliable parsing of split SSE chunks.
- Add `createStreamBodyLimiter` to enforce payload limits on streaming requests.
- Refactor `ProxyPool` to decouple failure marking from rotation.
- Standardize CORS handling and environment variable configuration.
- Clean up documentation and remove obsolete skill files.
2026-06-11 03:56:26 +07:00
MythEclipse db065f788d style(anthropic-proxy): update comment formatting and add SSE utility functions
Standardize comment separators and arrow usage in documentation headers.
Additionally, introduce `accumulateSSEText` and `extractTextFromSSE` to
provide robust parsing for various SSE stream formats, including
Claude Code and OpenAI-compatible deltas.
2026-06-11 01:43:23 +07:00
MythEclipse 261f84a96e refactor(anthropic-proxy): improve SSE stream transformation logic
Refactor the backend-to-Anthropic SSE transformation to use a more robust
state machine approach. This replaces manual string building with a
structured phase-based system (`init`, `block`, `done`) to better
manage the Anthropic streaming protocol, including `message_start` and
`content_block_delta` events.

- Extract `formatContentBlockDelta` helper for consistent event formatting
- Implement phase-based state machine in `transformAnthropicStream`
- Delegate `[DONE]` handling to the stream transformer instead of
  manually emitting `message_stop`
- Improve reliability of message ID generation and event sequencing
2026-06-11 01:24:54 +07:00
MythEclipseandClaude Fable 5 47b85fb396 chore: use hardcoded dummy API key
- Replace env-based API_KEY with sk-dummy-key hardcoded
- All entry points use same key: Authorization: Bearer sk-dummy-key
- Simplifies usage for library/client consumption

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 00:59:01 +07:00
MythEclipseandClaude Fable 5 c0a02279bd feat: add API key authentication for AI proxy endpoints
- Add API_KEY config (env var) to all entry points
- requireAuth helper checks Authorization: Bearer or x-api-key header
- Auth applied to /v1/chat/completions, /v1/messages, /v1/models
- When API_KEY is empty/unset, auth is disabled (backward compatible)
- Update wrangler.toml with API_KEY variable documentation

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 00:56:18 +07:00
MythEclipseandClaude Fable 5 2be57c0838 fix: handle surfsense stream format correctly
Surfsense sends data: {"type":"text-delta","delta":"text"} — use
raw.delta (not raw.content) and filter events by type. Skip non-text
events (thinking steps, start, etc) to produce clean Anthropic SSE.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 00:49:36 +07:00
MythEclipseandClaude Fable 5 2fead57d0f fix: use MODEL_ROUTES directly for Anthropic proxy routing
Remove the ANTHROPIC_MODEL_MAP layer — /v1/messages now uses the
same model names as /v1/chat/completions (deepseek-v4-flash-free,
gpt-5.4-mini-no-login, deepseek/deepseek-v4-flash). This way users
send the original model name and it routes to the correct backend.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 00:42:21 +07:00
MythEclipseandClaude Fable 5 2fca9febe4 fix: pass original model name to backend in Anthropic proxy
Use anthReq.model instead of backendModel so the backend receives
the user-sent model name (e.g. claude-sonnet-4) rather than the
internal mapped name.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 00:20:20 +07:00
MythEclipseandClaude Fable 5 5974d31164 fix: avoid double markFailed in AI proxy retry loop
Response handler already calls markFailed() on non-2xx and network
errors (which rotates the proxy). The preamble at attempt >= 2 was
calling markFailed() again, double-rotating and skipping a proxy.
Changed preamble to use rotate() instead of markFailed().

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-11 00:02:40 +07:00
MythEclipseandClaude Fable 5 2dfb87eac6 fix: retry AI proxy with next proxy on HTTP errors too
Previously only retried on network errors (fetch exceptions). Now also
rotates to next proxy when upstream returns non-2xx (429 rate limit,
5xx, etc). Applies to both OpenAI and Anthropic endpoints.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 23:57:24 +07:00
MythEclipseandClaude Fable 5 38d7a83fe9 feat: add AI proxy routes to Workers and Vercel entry points
- Add /v1/chat/completions, /v1/messages, /v1/models routes to
  src/worker.ts (Cloudflare Workers) and api/relay.ts (Vercel)
- Import handleChatCompletion, handleAnthropicMessages handlers
- Using the same backend routing as the standalone server

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 23:45:38 +07:00
MythEclipseandClaude Fable 5 4168a087a0 feat: add Anthropic-compatible AI proxy endpoint
- Create src/lib/anthropic-proxy.ts: accepts Anthropic Messages API
  format (POST /v1/messages) and routes to the same backend providers
- Anthropic model names (claude-sonnet-4, claude-3-haiku, claude-opus-4)
  map to backend models with full request/response translation
- Streaming (SSE) via Anthropic protocol: message_start,
  content_block_delta, message_stop events
- Add /v1/messages route to server with CORS and proxy pool fallback
- Reuses MODEL_ROUTES from ai-proxy.ts for consistent backend routing

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 23:08:32 +07:00
MythEclipseandClaude Fable 5 567ed52db5 feat: add OpenAI-compatible AI proxy endpoint
- Create src/lib/ai-proxy.ts: routes OpenAI chat completions requests
  to backend providers (opencode.ai, surfsense.com, deep-seek.ai)
  based on model name with request/response translation
- Add POST /v1/chat/completions route to server with streaming (SSE)
  support, CORS, and proxy pool fallback on failure
- Add GET /v1/models route returning available model list
- Direct-first strategy: try backend directly, fall back to proxy pool
  on network failure (consistent with relay behavior)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 22:52:45 +07:00
MythEclipseandClaude Fable 5 c61f8d9db6 fix: try direct connection first, fall back to proxy
Change proxy strategy: first attempt goes direct (no proxy).
Only if direct fails, fall back to proxy pool with rotation.
This way healthy upstreams don't pay the proxy latency.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 22:15:47 +07:00
MythEclipseandClaude Fable 5 03427cae8c feat: auto-rotate proxy pool with retry on network failure
- Add src/lib/proxy-pool.ts: round-robin proxy pool that reads
  proxy.txt (host:port:user:pass), tracks consecutive failures,
  and rotates on threshold
- Integrate into src/index.ts: on fetch network error, mark proxy
  as failed, rotate to next, and retry the request once
- proxy.txt loaded from PROXY_FILE/PROXY_LIST env var or ./proxy.txt
- Graceful no-op when proxy.txt doesn't exist (Vercel/Workers)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 22:12:59 +07:00
MythEclipseandClaude Fable 5 3f96d8a6e7 fix: relay requests to / with x-relay-target instead of showing index
When a GET request hits / with an x-relay-target header, it should relay
the request — not display the index page. Fixed in all three entry points
(src/index.ts, api/relay.ts, src/worker.ts).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 21:59:25 +07:00
MythEclipseandClaude Fable 5 2ac23f199d chore: configure Cloudflare Workers deployment
- Enable workers_dev deploy to edge-proxy-relay.workers.dev
- Set account_id in wrangler.toml
- Configure CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID as
  GitHub Actions secrets via gh CLI (from .env)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 21:46:13 +07:00
MythEclipseandClaude Fable 5 7a4df35371 feat: add Cloudflare Workers deployment support
- Create src/worker.ts: Workers-compatible relay handler using env
  bindings instead of process.env, exports { fetch } for Workers runtime
- Update wrangler.toml: point to new src/worker.ts entry point
- Update deploy.yml: add wrangler-action deploy step after tests pass
- The worker reuses the same relay logic from src/lib/ and src/middleware/

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 21:38:22 +07:00
MythEclipseandClaude Fable 5 58553f936e fix: disable Vercel Next.js framework detection
Add "framework": null to vercel.json so Vercel doesn't try to
run Next.js build flow (looking for .next/routes-manifest.json).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 21:22:37 +07:00
MythEclipseandClaude Fable 5 9dc32e8b10 fix: correct Vercel Bun runtime config and handler export format
Per Vercel docs (vercel.com/docs/functions/runtimes/bun):
- Use top-level "bunVersion": "1.x" in vercel.json (NOT functions block)
- Export default { async fetch(request) { ... } } — object with fetch method
  (not a bare default function)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 21:20:16 +07:00
MythEclipseandClaude Fable 5 591c1fa199 fix: add Vercel-compatible relay handler and fix vercel.json runtime
- Create api/relay.ts: Vercel serverless function handler that reuses
  relay logic from src/lib/relay-utils.ts and src/middleware/
- Export default fetch handler (no Bun.serve()) for Vercel Functions
- Fix vercel.json: use @vercel/node@5 runtime with proper routing via
  rewrites to catch all traffic to the relay handler
- Remove stale buildCommand/outputDirectory (Vercel handles function builds)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 21:17:21 +07:00
MythEclipseandClaude Fable 5 f58a92e2aa feat: migrate from Next.js to pure Bun relay proxy
- Replace Next.js app router with standalone Bun.serve() entry point
- Add middleware stack: rate limiter, body limiter, structured logger, SSRF protection
- Add WebSocket bidirectional relay via x-relay-target header
- Implement error classification (DNS→502, timeouts→504, SSRF→403, rate→429)
- Remove all Next.js dependencies and config files
- Update deploy workflow, tsconfig, wrangler config for Bun deployment

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 19:54:55 +07:00
MythEclipse 124dab98a2 docs: improve README with comprehensive examples and protocol support info 2026-05-08 19:12:18 +07:00
MythEclipse 694f14a316 fix: add node 22 + set secrets to correct repo 2026-05-08 19:03:24 +07:00
MythEclipse eba4fbe00a fix: remove wrong working-directory from workflow 2026-05-08 19:01:49 +07:00
MythEclipse 443ff77be9 ci: add CF Workers deploy workflow + fix relay header forwarding 2026-05-08 18:58:50 +07:00
MythEclipse dfb0f5942f docs: add alternative deployment endpoint to README 2026-05-08 17:32:56 +07:00
MythEclipseandClaude Opus 4.7 75731af9b6 Remove edge runtime directive from route handler
Cloudflare Workers via OpenNext tidak support Next.js edge runtime.
Hapus export const runtime = "edge" agar handler jalan di Workers runtime.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-08 17:32:35 +07:00
MythEclipseandClaude Opus 4.7 765bcdca44 Add Cloudflare Workers deploy config via OpenNext
- Fix build:worker script to use opennextjs-cloudflare build
- Add open-next.config.ts required by OpenNext Cloudflare
- Update wrangler.toml main entry to .open-next/worker.js
- Ignore .open-next/ and .wrangler/ build artifacts

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-08 17:27:06 +07:00
MythEclipse d211c40fa1 docs: update example usage in README for clarity and formatting 2026-05-07 23:45:00 +07:00
MythEclipse ef436182fc docs: update live deployment section by removing trailing slashes from URLs 2026-05-07 23:26:17 +07:00
MythEclipse 240866c0d0 docs: add alternative deployment endpoint to README 2026-05-07 23:25:58 +07:00
MythEclipse 6a82a834eb refactor: remove unnecessary targetUrl parameter and prevent compressed responses in relay 2026-05-07 23:09:49 +07:00
MythEclipse c1772d6b6b docs: update live deployment section in README for clarity 2026-05-07 22:56:38 +07:00
MythEclipse 6f91d93672 feat: restructure API and documentation with new relay handler and UI components 2026-05-07 22:55:23 +07:00
MythEclipse fff35f02fe docs: add secondary deployment endpoint to README 2026-05-07 22:52:22 +07:00
MythEclipse 1df328ad96 docs: update README with live deployment info and correct example commands 2026-05-07 22:47:49 +07:00
MythEclipse 6588c2bc39 test: add unit tests for relay-utils functions 2026-05-07 22:41:08 +07:00
MythEclipse d848b903e8 fix: update example proxy commands in README for clarity 2026-05-07 22:37:48 +07:00
MythEclipse 932bc192fa feat: integrate Geist font and enhance layout with utility classes
feat: update Home component with new UI elements and improved request handling

chore: add components.json for component configuration

feat: implement Badge component for status indication

feat: create Button component for consistent styling

feat: develop Card component structure for content display

feat: add Input component for user input fields

feat: implement Label component for form accessibility

feat: create Select component for dropdown functionality

feat: add Separator component for visual separation

feat: implement Toaster component for notifications

feat: create Tabs component for tabbed navigation

feat: add Textarea component for multi-line input

feat: add utility functions for class name management
2026-05-07 22:30:50 +07:00
MythEclipse f691476046 fix: prevent encoding issues by removing problematic headers in relay responses 2026-05-07 22:25:39 +07:00
MythEclipse 1a0a947674 Refactor code structure for improved readability and maintainability 2026-05-07 22:22:35 +07:00
MythEclipse 83e66805c4 refactor: remove Tailwind CSS configuration and update dependencies 2026-05-07 21:34:39 +07:00
MythEclipse 001bba1d24 fix: add CORS headers to relay responses and OPTIONS method handling 2026-05-07 21:31:00 +07:00
MythEclipse 7416bfb2bd feat: migrate proxy logic to new structure and implement new relay route 2026-05-07 21:26:27 +07:00
MythEclipse 083d77e252 fix: migrate proxy handler logic from pages/api/proxy.ts to app/api/proxy/route.ts and remove old file 2026-05-07 21:22:30 +07:00
MythEclipse 52845da832 fix: update proxy configuration to use 'config' export and move allowed methods inside handler 2026-05-07 21:20:31 +07:00
MythEclipse 751eb083c4 fix: migrate proxy route logic from route.ts to pages/api/proxy.ts 2026-05-07 21:19:20 +07:00
MythEclipse f3ec82cbbf fix: replace stripRelayHeaders with filterHeaders and add BLOCKED_HEADERS set 2026-05-07 21:16:31 +07:00
MythEclipse f2ebba51bb fix: remove commented console log for request headers in Home component 2026-05-07 21:11:44 +07:00
MythEclipse 3fdbaf3ced fix: update .gitignore and tsconfig for Next.js compatibility 2026-05-07 21:09:09 +07:00
MythEclipse 9d1ef77cda fix: update duplex type assertion in buildRelayRequest function 2026-05-07 21:07:39 +07:00
MythEclipse b11763a7ab fix: update devDependencies to include TypeScript and type definitions for React 2026-05-07 21:05:58 +07:00
MythEclipse e553ed3e02 fix: update PostCSS configuration to correctly reference '@tailwindcss/postcss' 2026-05-07 21:04:45 +07:00
MythEclipse 262dbfafbe chore: migrate PostCSS and Tailwind configuration to .mjs format 2026-05-07 21:03:30 +07:00
MythEclipse b0dde3c885 refactor: migrate to Next.js with edge functions and update relay utilities
- Removed old relay utilities and tests, replacing them with a new structure under `src/lib/relay-utils.ts`.
- Implemented a new edge function in `app/api/proxy/route.ts` to handle proxy requests.
- Created a new Next.js layout and page structure for the frontend, including a user interface for testing the proxy.
- Added Tailwind CSS for styling and configured PostCSS.
- Updated TypeScript configuration for better compatibility with Next.js.
- Removed unused files and configurations related to the previous setup.
2026-05-07 20:59:23 +07:00
MythEclipse 4c30f2a6e1 chore: remove index.html and update vercel.json for API routing 2026-05-07 20:45:18 +07:00
MythEclipse db175e6e95 fix: update fetch options to include target URL in buildRelayRequest 2026-05-07 20:43:09 +07:00
MythEclipse cc38b7c7c6 feat: add isAllowedTarget function to validate URL protocols 2026-05-07 20:37:10 +07:00
MythEclipse 9e2f4d39b1 feat: implement API handler for edge runtime with method validation and target normalization 2026-05-07 20:35:18 +07:00
MythEclipse a6333750e4 feat: update project structure and enhance UI for Edge Proxy Test
- Add .gitignore to exclude api directory
- Remove deprecated api/index.ts file
- Create new public/index.html with improved UI and functionality
- Update package.json build script to copy index.html to dist
- Enhance request handling in index.html with custom headers and presets
- Improve response display with status, time, and size metrics
2026-05-07 20:26:51 +07:00
MythEclipse 9c05003e70 fix: remove .vercelignore file 2026-05-07 20:15:27 +07:00
MythEclipse 7df78ad117 fix: remove rewrites configuration from vercel.json 2026-05-07 20:14:43 +07:00
MythEclipse c0bfce3d26 Revert "feat: update build output directory to 'dist' in package.json and set outputDirectory in vercel.json"
This reverts commit cfbc4609b5.
2026-05-07 20:13:41 +07:00
MythEclipse 149a646fea fix: correct typo in comment for allowed methods 2026-05-07 20:08:04 +07:00
MythEclipse 9759d63b38 feat: add index.html for Edge Proxy Relay interface and remove rewrites from vercel.json 2026-05-07 20:03:57 +07:00
MythEclipse 49f50b7aa8 fix: update fetch request URL to use '/api' endpoint 2026-05-07 20:00:43 +07:00
MythEclipse e5de4bbbfb fix: update fetch API endpoint and adjust rewrites in vercel.json 2026-05-07 19:59:34 +07:00
MythEclipse 6f28d18b95 feat: refactor header handling and update module path in package.json 2026-05-07 19:55:39 +07:00
MythEclipse 1b86a33b4e fix: remove functions configuration from vercel.json 2026-05-07 19:54:25 +07:00
MythEclipse 8e0cf9d0f3 fix: update import path for relay-utils and restore functions configuration in vercel.json 2026-05-07 19:53:20 +07:00
MythEclipse 212ce32480 feat: implement Edge Proxy Relay with request handling and header filtering 2026-05-07 19:49:52 +07:00
MythEclipse d8e1e125b1 feat: update vercel.json to restore build and install commands, and adjust routing configuration 2026-05-07 19:46:08 +07:00
MythEclipse 4cf3a520d5 feat: add index.html for Edge Proxy Relay interface with request handling 2026-05-07 19:46:00 +07:00
MythEclipse cfbc4609b5 feat: update build output directory to 'dist' in package.json and set outputDirectory in vercel.json 2026-05-07 19:41:56 +07:00
MythEclipse 2a82012910 feat: simplify vercel.json by removing function configuration and updating bunVersion 2026-05-07 19:39:31 +07:00
MythEclipse 098eabe5bf feat: add 'api' directory to .gitignore and update build script in package.json 2026-05-07 19:32:04 +07:00