From 53743ca70f1e4b623925287c92fd5310355f93cd Mon Sep 17 00:00:00 2001 From: oiupoyt Date: Fri, 25 Sep 2026 16:13:18 +0530 Subject: [PATCH] fix(ui): adjust timer layout to prevent text overlap; clean up readme --- README.md | 78 +++++++++++++++++++++++++---------------------- public/app.js | 4 +-- public/index.html | 8 ++--- public/style.css | 20 +++++++----- 4 files changed, 59 insertions(+), 51 deletions(-) diff --git a/README.md b/README.md index 5f8ad82..9a21a5f 100644 --- a/README.md +++ b/README.md @@ -1,63 +1,67 @@ # katproxy -A sleek, minimal, high-performance proxy list stream & active TCP latency prober. +Minimal proxy list aggregator and live TCP latency prober. -Features dark glassmorphism aesthetics, live SVG countdown timer, one-click copy suite (IP:Port, cURL, raw lists), multi-protocol filtering (HTTP, SOCKS4, SOCKS5), and live round-trip latency metrics. +- **Frontend**: [katproxy.oiupoyt.space](https://katproxy.oiupoyt.space) +- **Backend API**: [katproxy-api.oiupoyt.space](https://katproxy-api.oiupoyt.space) --- -## ⚡ Architecture +## Overview -- **Backend (Android Tablet / Termux)**: - - Aggregates thousands of proxies from premier GitHub sources (`monosans/proxy-list`, `TheSpeedX/PROXY-List`, `hookzof/socks5_list`). - - Active background TCP socket connection tester measuring real round-trip latency (`ms`). - - REST API running on port `5050`, tunneled via Cloudflare Tunnel as `katproxy-api.oiupoyt.space`. -- **Frontend (Cloudflare Pages)**: - - Fast, zero-dependency static web application located in `public/`. - - JetBrains Mono typography, smooth 60fps micro-animations, quick actions, responsive on desktop and mobile. +katproxy collects proxies from multiple public repositories (`monosans/proxy-list`, `TheSpeedX/PROXY-List`, `hookzof/socks5_list`), normalizes them, and runs concurrent TCP socket checks to verify responsiveness and record round-trip latency. + +The backend runs as a lightweight daemon on an Android tablet (Termux) exposed via Cloudflare Tunnel. The frontend is a static web app hosted on Cloudflare Pages. --- -## 🚀 API Endpoints +## API Reference -| Method | Endpoint | Description | -|---|---|---| -| `GET` | `/api/health` | Service health status and uptime | -| `GET` | `/api/stats` | Total proxies, verified alive count, protocol counts, avg ping | -| `GET` | `/api/proxies` | Paginated list with `protocol`, `alive`, `search`, `sort`, `country` filters | -| `POST` | `/api/refresh` | Trigger immediate upstream re-fetch and probe cycle | -| `GET` | `/api/raw` | Raw plaintext list (`ip:port` or `format=url`) for curl / bash pipelines | +Base URL: `https://katproxy-api.oiupoyt.space` -### Examples +| Method | Endpoint | Parameters | Description | +|---|---|---|---| +| `GET` | `/api/health` | — | Service uptime and status | +| `GET` | `/api/stats` | — | Total count, alive count, protocol breakdown, avg latency | +| `GET` | `/api/proxies` | `protocol`, `alive`, `search`, `sort`, `limit`, `page` | Filtered and paginated proxy list | +| `GET` | `/api/raw` | `protocol`, `alive`, `format` (`ip:port` or `url`) | Plaintext list for shell scripts and curl | +| `POST` | `/api/refresh` | — | Trigger upstream re-fetch and verification cycle | + +### Usage Examples ```bash -# Get 5 fastest SOCKS5 proxies -curl "https://katproxy-api.oiupoyt.space/api/proxies?protocol=socks5&alive=true&limit=5" +# Fetch fastest alive SOCKS5 proxies +curl "https://katproxy-api.oiupoyt.space/api/proxies?protocol=socks5&alive=true&limit=10" -# Raw IP:PORT stream for CLI scripts -curl -s "https://katproxy-api.oiupoyt.space/api/raw?protocol=socks5&alive=true" | head -n 10 +# Stream raw IP:PORT pairs +curl -s "https://katproxy-api.oiupoyt.space/api/raw?protocol=socks5&alive=true" ``` --- -## 🛠 Cloudflare Pages Deployment (Frontend) +## Architecture -1. Connect this GitHub repository (`oiupoyt/katproxy`) to Cloudflare Pages. -2. Build Settings: - - **Framework preset**: None - - **Build command**: None (leave empty) - - **Build output directory**: `public` -3. Deploy! The frontend automatically connects to `https://katproxy-api.oiupoyt.space`. +- **Backend (`/backend`)**: Node.js service running on port `5050` with controlled memory allocation (`--max-old-space-size=256`). Includes background socket prober and auto-refresh worker. +- **Frontend (`/public`)**: Vanilla JavaScript, CSS, and HTML with JetBrains Mono typography, auto-refresh countdown, and one-click copy actions. +- **Tunnel**: Managed by `cloudflared` routing `katproxy-api.oiupoyt.space` to `localhost:5050`. --- -## 📱 Tablet Backend Setup +## Tablet Service Management ```bash -# On the tablet (Termux) -cd ~ -git clone https://github.com/oiupoyt/katproxy.git katproxy -cd katproxy/backend -npm install -node --max-old-space-size=256 server.js +# Check status and recent logs +~/katproxy-backend/status.sh + +# Start or restart daemon +~/katproxy-backend/start.sh + +# Stop daemon +~/katproxy-backend/stop.sh ``` + +--- + +## License + +MIT diff --git a/public/app.js b/public/app.js index 5bff6ba..62bddda 100644 --- a/public/app.js +++ b/public/app.js @@ -61,8 +61,8 @@ const el = { toastContainer: document.getElementById('toast-container') }; -// SVG Circle circumference: 2 * Math.PI * 11 ≈ 69.11 -const CIRCUMFERENCE = 69.11; +// SVG Circle circumference: 2 * Math.PI * 6 ≈ 37.7 +const CIRCUMFERENCE = 37.7; /** * Toast Notification Helper diff --git a/public/index.html b/public/index.html index ba6bead..20d0742 100644 --- a/public/index.html +++ b/public/index.html @@ -45,11 +45,11 @@
- - - + + + - --s + --:--