Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/oluceps/clash2sing-box
Convert clash client outbounds to sing-box format
https://github.com/oluceps/clash2sing-box
clash clash-meta converter shadowsocks sing-box trojan vless vless-ws-tls yaml
Last synced: 27 days ago
JSON representation
Convert clash client outbounds to sing-box format
- Host: GitHub
- URL: https://github.com/oluceps/clash2sing-box
- Owner: oluceps
- License: gpl-3.0
- Created: 2022-10-10T05:34:06.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-01T17:19:58.000Z (5 months ago)
- Last Synced: 2024-09-26T21:23:02.271Z (about 1 month ago)
- Topics: clash, clash-meta, converter, shadowsocks, sing-box, trojan, vless, vless-ws-tls, yaml
- Language: Rust
- Homepage: https://oluceps.github.io/clash2sing-box/
- Size: 1.39 MB
- Stars: 161
- Watchers: 2
- Forks: 13
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[中文(zh-cn)](README_CN.md) | English
## Outbound converting Supports
- [x] Shadowsocks
- [x] http
- [x] socks
- [x] VMess
- [x] Trojan
- [x] Hysteria
- [x] ShadowsocksR
- [x] VLESS `VLESS` had been abandoned. Consider use `Trojan` instead. See [detail](https://www.v2fly.org/v5/config/proxy/vless.html)
- [ ] TUIC `sing-box` not support `tuic` yet
- [ ] ShadowTLS `Clash.Meta` not support `Shadow-tls` yet---
Generate minimal sing-box profile from clash profile (local path or url)
```console
./ctos -s "http://<...>" gen > config.json# or
./ctos -s "./config.yaml" gen > config.json
```
This will generate minimal avaliable sing-box format profile
from exist clash config.---
Parse clash config
```console
./ctos -s "./config.yaml" show# show proxies name list by adding `-t`
./ctos -s "./config.yaml" show -t
```
This will get converted proxies list from clash profile,
and tag names (if `--tags` added).
You could manualy append it into sing-box config.---
Append to existed config
```console
./ctos -s "./config.yaml" append --dst ./config.json
```## web app
demo: https://ctos.magicb.uk
![pic](./.github/web.png)
### self host
```console
git clone https://github.com/oluceps/clash2sing-box.git
cd clash2sing-box/web
trunk serve --open
```## Commands
```console
> ./ctos --help
Usage: ctos [OPTIONS]Commands:
show Show sing-box proxies info from clash profile
gen Generate sing-box profile from clash format
append Append new clash proxies to existed sing-box profile [WIP]
help Print this message or the help of the given subcommand(s)Options:
-s, --source clash config path (url)
-h, --help Print help
-V, --version Print version
```## Nix flake support
Try run application directly on machine with nix installed:
```bash
nix run github:oluceps/clash2sing-box -- -s "" show --tags
# or any other actions
```## TODO
- [ ] Clash rule converting
- [x] Subcommand `append`, to extend new content into config
- [x] Simple and easy-to-use web app
- [ ] Auto update with systemd service, with NixOS module
### Credits
+ [Dreamacro/Clash](https://github.com/Dreamacro/clash)
+ [MetaCubeX/Clash.Meta](https://github.com/MetaCubeX/Clash.Meta)
+ [SagerNet/sing-box](https://github.com/SagerNet/sing-box)
+ [jmfiaschi/json_value_merge](https://github.com/jmfiaschi/json_value_merge)
+ [thedodd/trunk](https://github.com/thedodd/trunk)
+ [caddyserver/caddy](https://github.com/caddyserver/caddy)
+ [yewstack/yew](https://github.com/yewstack/yew)