$ show yonggekkk/sing-box-yg
This repository contains a collection of deployment and management scripts for setting up and maintaining a multi-protocol proxy server (sing-box) on VPS and free hosting platforms (Serv00/Hostuno). The system automates the installation of five proxy protocols (Vless-reality, Vmess-ws, Hysteria-2, Tuic-v5, Anytls), generates TLS certificates, configures Cloudflare Argo tunnels for CDN proxying, and provides keep-alive mechanisms via cron, GitHub Actions, Cloudflare Workers, and a Node.js web server to prevent service downtime on free hosts. The primary entry points are interactive bash scripts (`sb.sh` for VPS, `serv00.sh` for Serv00) and a non-interactive keep-alive script (`serv00keep.sh`). The architecture is a set of loosely coupled shell scripts and a small Express.js application, not a monolithic service. External dependencies include sing-box, cloudflared, and standard Linux utilities. The code is functional and widely used (10k+ stars) but exhibits typical script-level craftsmanship: long monolithic functions, global variable usage, and tight coupling to specific hosting environments. The last commit date (2026-10-13) appears anomalous and likely a data error, but the repository shows active maintenance with recent stars and forks.
The LLM identified 2 files worth highlighting for reuse:
A Node.js Express server that provides HTTP endpoints for managing a Serv00 proxy service. It exposes routes for keep-alive (`/up`), restart (`/re`), port reset (`/rp`), process listing (`/jc`), and node info (`/list/key`). The server runs a keep-alive command on a timer and on startup. While tightly coupled to the Serv00 environment (hardcoded paths, specific shell commands), the pattern of a lightweight web server for remote service management is reusable. The code is straightforward but lacks error handling and modularity.
A Cloudflare Workers script that performs scheduled HTTP GET requests to a list of URLs for keep-alive purposes. It uses `addEventListener('scheduled', ...)` and fetches each URL with a timeout. The script is simple, generic, and could be extracted for any project needing to periodically ping endpoints to prevent idle timeouts. It demonstrates a clean pattern for serverless keep-alive tasks.