{"id":42659889,"url":"https://github.com/sing-box-orbit/sing-box-orbit-node","last_synced_at":"2026-01-29T09:41:34.138Z","repository":{"id":331604078,"uuid":"1131506409","full_name":"sing-box-orbit/sing-box-orbit-node","owner":"sing-box-orbit","description":"REST API server for managing sing-box proxy instances","archived":false,"fork":false,"pushed_at":"2026-01-10T12:50:09.000Z","size":61,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-11T03:00:02.561Z","etag":null,"topics":["api","bun","hono","proxy","rest-api","sing-box","typescript","vpn"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sing-box-orbit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"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-01-10T06:21:38.000Z","updated_at":"2026-01-10T12:50:12.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/sing-box-orbit/sing-box-orbit-node","commit_stats":null,"previous_names":["sing-box-orbit/sing-box-orbit-node"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sing-box-orbit/sing-box-orbit-node","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sing-box-orbit%2Fsing-box-orbit-node","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sing-box-orbit%2Fsing-box-orbit-node/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sing-box-orbit%2Fsing-box-orbit-node/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sing-box-orbit%2Fsing-box-orbit-node/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sing-box-orbit","download_url":"https://codeload.github.com/sing-box-orbit/sing-box-orbit-node/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sing-box-orbit%2Fsing-box-orbit-node/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28874256,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T07:35:32.468Z","status":"ssl_error","status_checked_at":"2026-01-29T07:33:31.463Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["api","bun","hono","proxy","rest-api","sing-box","typescript","vpn"],"created_at":"2026-01-29T09:41:30.565Z","updated_at":"2026-01-29T09:41:34.123Z","avatar_url":"https://github.com/sing-box-orbit.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sing-box-orbit-node\n\n[![CI](https://github.com/sing-box-orbit/sing-box-orbit-node/actions/workflows/ci.yml/badge.svg)](https://github.com/sing-box-orbit/sing-box-orbit-node/actions/workflows/ci.yml)\n[![Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/lookgoodmeat/5c15334bebb54130f734a69db622379c/raw/coverage.json)](https://sing-box-orbit.github.io/sing-box-orbit-node/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nREST API server for remote management of [sing-box](https://sing-box.sagernet.org/) — universal proxy platform.\n\n**[🇷🇺 Русская версия](README.ru.md)**\n\n## Features\n\n- Start/stop/reload sing-box process\n- **Auto-restart on crash** with exponential backoff\n- Monitor server status and health\n- Real-time log viewing\n- Configuration validation before startup\n- Automatic OpenAPI documentation\n- Optional API-key authentication\n- **Rate limiting** for DDoS protection\n\n## Requirements\n\n- [Bun](https://bun.sh/) \u003e= 1.0\n- sing-box binary (downloaded automatically)\n\n## Quick Start\n\n```bash\n# Clone repository\ngit clone \u003crepo-url\u003e\ncd sing-box-orbit-node\n\n# Install dependencies\nbun install\n\n# Download sing-box binary for your platform\nbun run setup\n\n# Copy and configure environment variables\ncp .env.example .env\n\n# Create sing-box configuration\nmkdir -p data\n# Place your config.json in ./data/config.json\n\n# Start in development mode\nbun run dev\n```\n\n## Scripts\n\n| Command | Description |\n|---------|-------------|\n| `bun run dev` | Start with hot-reload |\n| `bun run start` | Start in production mode |\n| `bun run build` | Build standalone executable |\n| `bun run setup` | Download sing-box binary |\n| `bun run lint` | Check code (Biome) |\n| `bun run lint:fix` | Auto-fix lint errors |\n| `bun run format` | Format code |\n| `bun run typecheck` | TypeScript type checking |\n| `bun run test` | Run tests |\n| `bun run test:watch` | Run tests in watch mode |\n| `bun run test:coverage` | Run tests with coverage report |\n\n## Configuration\n\nEnvironment variables (`.env`):\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `NODE_ENV` | development | Environment mode |\n| `HOST` | 0.0.0.0 | Server bind address |\n| `PORT` | 3333 | Server port |\n| `API_KEY` | — | API key for authentication |\n| `SINGBOX_BIN` | ./bin/sing-box | Path to sing-box binary |\n| `SINGBOX_CONFIG_PATH` | ./data/config.json | Config file path |\n| `SINGBOX_WORKING_DIR` | ./data | Working directory |\n| `SINGBOX_AUTO_RESTART` | true | Auto-restart on crash |\n| `SINGBOX_RESTART_DELAY` | 1000 | Initial restart delay (ms) |\n| `SINGBOX_MAX_RESTARTS` | 5 | Max restarts within window |\n| `SINGBOX_RESTART_WINDOW` | 60000 | Time window for restart limit (ms) |\n| `RATE_LIMIT_ENABLED` | true | Enable rate limiting |\n| `RATE_LIMIT_MAX_REQUESTS` | 100 | Max requests per window |\n| `RATE_LIMIT_WINDOW_MS` | 60000 | Time window (ms) |\n| `LOG_LEVEL` | info | Log level |\n\n## API\n\nBase URL: `http://localhost:3333`\n\nIf `API_KEY` is set, requests must include header `Authorization: Bearer \u003ckey\u003e` or `X-API-Key: \u003ckey\u003e`.\n\nInteractive documentation available at `http://localhost:3333/docs`\n\n## Docker\n\n### Using Docker Compose (recommended)\n\nCreate `docker-compose.yml`:\n\n```yaml\nservices:\n  sing-box-orbit-node:\n    image: ghcr.io/sing-box-orbit/sing-box-orbit-node:latest\n    container_name: sing-box-orbit-node\n    network_mode: host\n    restart: unless-stopped\n    environment:\n      - API_KEY=your-secret-api-key\n      - LOG_LEVEL=info\n    volumes:\n      - ./data:/etc/sing-box\n      - ./logs:/app/data/logs\n```\n\n```bash\nmkdir -p data logs\ndocker compose up -d\n```\n\n\u003e **Note:** Default configuration is created automatically on first start if `config.json` doesn't exist.\n\n### Using Docker directly\n\n```bash\ndocker run -d \\\n  --name sing-box-orbit-node \\\n  -p 3333:3333 \\\n  -v $(pwd)/data:/etc/sing-box \\\n  -v $(pwd)/logs:/app/data/logs \\\n  -e API_KEY=your-secret-key \\\n  ghcr.io/sing-box-orbit/sing-box-orbit-node:latest\n```\n\n### Volume paths\n\n| Host path | Container path | Description |\n|-----------|----------------|-------------|\n| `./data` | `/etc/sing-box` | sing-box config and working directory |\n| `./logs` | `/app/data/logs` | Application logs |\n\n### Health check\n\nThe `/health` endpoint is publicly accessible (no authentication required) for container orchestration compatibility.\n\n## Tech Stack\n\n- **Runtime**: [Bun](https://bun.sh/)\n- **Framework**: [Hono](https://hono.dev/)\n- **API Schema**: [fets](https://github.com/ardatan/feTS) + [TypeBox](https://github.com/sinclairzx81/typebox)\n- **Docs**: [Scalar](https://scalar.com/)\n- **Linter**: [Biome](https://biomejs.dev/)\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsing-box-orbit%2Fsing-box-orbit-node","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsing-box-orbit%2Fsing-box-orbit-node","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsing-box-orbit%2Fsing-box-orbit-node/lists"}