subconverter README

The project's README from github.com/tindy2013/subconverter. As one markdown file: README.md.

subconverter

Utility to convert between various proxy subscription formats.

Build Status GitHub tag (latest SemVer) GitHub release GitHub license

Docker README

中文文档

Supported Types

Type As Source As Target Target Name
Clash ✓ ✓ clash
ClashR ✓ ✓ clashr
Quantumult ✓ ✓ quan
Quantumult X ✓ ✓ quanx
Loon ✓ ✓ loon
SS (SIP002) ✓ ✓ ss
SS Android ✓ ✓ sssub
SSD ✓ ✓ ssd
SSR ✓ ✓ ssr
Surfboard ✓ ✓ surfboard
Surge 2 ✓ ✓ surge&ver=2
Surge 3 ✓ ✓ surge&ver=3
Surge 4 ✓ ✓ surge&ver=4
V2Ray ✓ ✓ v2ray
Telegram-liked HTTP/Socks 5 links ✓ × Only as source

Notice:

  1. Shadowrocket users should use ss, ssr or v2ray as target.

  2. You can add &remark= to Telegram-liked HTTP/Socks 5 links to set a remark for this node. For example:


Quick Usage

Using default groups and rulesets configuration directly, without changing any settings

Access Interface

http://127.0.0.1:25500/sub?target=%TARGET%&url=%URL%&config=%CONFIG%

Description

Argument Required Example Description
target Yes clash Target subscription type. Acquire from Target Name in Supported Types.
url Yes https%3A%2F%2Fwww.xxx.com Subscription to convert. Supports URLs and file paths. Process with URLEncode first.
config No https%3A%2F%2Fwww.xxx.com External configuration file path. Supports URLs and file paths. Process with URLEncode first. More examples can be found in this repository.

If you need to merge two or more subscription, you should join them with '|' before the URLEncode process.

Example:

You have 2 subscriptions and you want to merge them and generate a Clash subscription:
1. https://dler.cloud/subscribe/ABCDE?clash=vmess
2. https://rich.cloud/subscribe/ABCDE?clash=vmess

First use '|' to separate 2 subscriptions:
https://dler.cloud/subscribe/ABCDE?clash=vmess|https://rich.cloud/subscribe/ABCDE?clash=vmess

Then process it with URLEncode to get %URL%:
https%3A%2F%2Fdler.cloud%2Fsubscribe%2FABCDE%3Fclash%3Dvmess%7Chttps%3A%2F%2Frich.cloud%2Fsubscribe%2FABCDE%3Fclash%3Dvmess

Then fill %TARGET% and %URL% in Access Interface with actual values:
http://127.0.0.1:25500/sub?target=clash&url=https%3A%2F%2Fdler.cloud%2Fsubscribe%2FABCDE%3Fclash%3Dvmess%7Chttps%3A%2F%2Frich.cloud%2Fsubscribe%2FABCDE%3Fclash%3Dvmess

Finally subscribe this link in Clash and you are done!

Advanced Usage

Please refer to 中文文档.

Auto Upload

Upload Gist automatically

Add a Personal Access Token into gistconf.ini in the root directory, then add &upload=true to the local subscription link, then when you access this link, the program will automatically update the content to Gist repository.

Example:

[common]
;uncomment the following line and enter your token to enable upload function
token = xxxxxxxxxxxxxxxxxxxxxxxx(Your Personal Access Token)

subconverter (tindy2013/subconverter)

Searching Database…

这是干什么的?一个代理订阅格式转换工具:给它一个某种代理客户端用的订阅链接,它就能转换成另一种客户端可直接使用的配置,比如 Clash、Surge 或 V2Ray。
支持在哪些订阅格式之间转换?支持 Clash、ClashR、Quantumult、Quantumult X、Loon、SS (SIP002)、SS Android、SSD、SSR、Surfboard、Surge 2/3/4 和 V2Ray,每种格式既可以作为来源也可以作为目标;Telegram 风格的 HTTP/Socks5 链接只能作为来源。
程序跑起来之后,怎么转换订阅?调用访问接口时带上 target 参数(格式名称,例如 clash)和一个 url 参数,内容是你的订阅链接经 URLEncode 之后的地址;还可以通过可选的 config 参数指定一份外部配置文件。
怎么在我自己的电脑上把它跑起来?这是一个 C++ 程序:用自带的 Makefile 从源码编译,或者运行它的 CI 发布的 Docker 镜像,然后保持本地服务运行,通过 HTTP 来访问它。
有哪些格式上的坑需要注意?Shadowrocket 用户应该选择 ss、ssr 或 v2ray 作为目标格式;Telegram 风格的链接不能作为目标;订阅链接必须先做 URLEncode 再传入。
能把多个订阅合并成一个配置吗?可以——把多个订阅链接用 '|' 拼在一起,再做 URLEncode,转换器就会输出一个合并后的配置。
转换后的订阅能自动同步到 GitHub Gist 吗?可以。把一个 Personal Access Token 放到根目录的 gistconf.ini 文件里,并在你的本地订阅链接后面加上 &upload=true;之后每次访问都会自动更新 Gist。
生成的配置里的规则和分组可以自定义吗?可以——通过 config 参数传入一份外部配置文件(可以是 URL 或文件路径,需 URLEncode);仓库里有更多示例,高级用法在中文文档 (中文文档) 里有说明。
Creator
tindy2013
Size
7.2 MB
Stars
17.1K
Age
6y
Commits · 90 Days