https://github.com/mapleafgo/singcast-cli
Dual-Format Proxy Core — Clash & sing-box Config, sing-box Engine
https://github.com/mapleafgo/singcast-cli
clash sing-box
Last synced: about 2 months ago
JSON representation
Dual-Format Proxy Core — Clash & sing-box Config, sing-box Engine
- Host: GitHub
- URL: https://github.com/mapleafgo/singcast-cli
- Owner: mapleafgo
- License: gpl-3.0
- Created: 2023-12-03T04:15:21.000Z (over 2 years ago)
- Default Branch: singcast
- Last Pushed: 2026-06-05T07:06:39.000Z (about 2 months ago)
- Last Synced: 2026-06-05T09:06:02.297Z (about 2 months ago)
- Topics: clash, sing-box
- Language: Go
- Homepage:
- Size: 1010 KB
- Stars: 17
- Watchers: 2
- Forks: 17
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Singcast
Dual-Format Proxy Core — Clash & sing-box Config, sing-box Engine
A lightweight proxy core powered by [sing-box](https://github.com/SagerNet/sing-box). Accepts both **Clash Meta (Mihomo) YAML** and **sing-box JSON** configurations — automatically translating Clash configs at runtime while running everything through the high-performance sing-box engine.
## Features
- **Clash → sing-box Translation** — Automatically converts Mihomo YAML to sing-box JSON at startup
- **Native sing-box JSON** — Also accepts sing-box configs directly, no translation needed
- **Multi-Protocol** — VLESS, VMess, Shadowsocks, Trojan, Hysteria2, TUIC, WireGuard, SOCKS5, HTTP, AnyTLS
- **Auto Routing** — GeoIP/GeoSite-based routing with country detection
- **Daemon Mode** — Background process with PID file and signal-based reload
## CLI
```bash
# Start proxy service
singcast run -c config.yaml
# Run as daemon
singcast run -c config.yaml -d
# With rule-set download proxy
singcast run -c config.yaml -p https://gh-proxy.org
# Translate YAML to sing-box JSON
singcast convert -c config.yaml -o output.json
# Validate config
singcast check -c config.yaml
# Show version
singcast version
```
### `run` Flags
| Flag | Alias | Description |
|------|-------|-------------|
| `--config` | `-c` | Config file path (YAML or JSON) |
| `--daemon` | `-d` | Run as daemon (fork to background) |
| `--api` | | Override external-controller address |
| `--home` | | Home directory (default `~/.singcast`) |
| `--rule-set-proxy` | `-p` | URL prefix for rule-set downloads |
Environment variable `SINGCAST_RULE_SET_PROXY` can also set the rule-set proxy.
### Signals
- `SIGHUP` — Reload config (Unix only)
- `SIGINT` / `SIGTERM` — Graceful shutdown
## Build
[Task](https://taskfile.dev) is required.
```bash
# CLI for current platform
task cli
# CLI for all platforms
task cli-all
# FFI shared library (desktop)
task ffi-darwin-arm64
task ffi-linux-amd64
task ffi-windows-amd64
# FFI shared library (mobile)
task ffi-android-arm64
task ffi-ios-arm64
# All targets
task all
```
Build tags: `with_clash_api,with_utls,with_quic,with_gvisor`
## License
GPL-3.0