-
Notifications
You must be signed in to change notification settings - Fork 64
QR code scheme
本项目自 SSR 项目而来, 因此带着 SSR 的一些遗绪, 但实质已经完全不同了。
采用 base64 且 URL safe 作为 scheme, 且不带 padding (没有末尾的等于号), 具体格式如下:
ssr://base64(host:port:protocol:method:obfs:base64pass/?remarks=base64remarks&ot_enable=1&ot_domain=base64domain&ot_path=base64path&dangerous_mode=false&ot_cert=base64cert&client_id=plainuuid)
其中, base64pass 及之前以 : 分隔的, 不可省略, 而 /? 后面的内容, 按需填写。
各个字段的含义如下:
-
host: 服务器地址, 可以是域名或 IP 地址, 也可以是 IPv6 地址(它必须用[]包裹起来, 例如[::1]) -
port: 服务器端口, 取值范围为 1~65535 -
protocol: 协议, 由于本项目不再使用 SSR 的协议, 但为了兼容, 仍然保留此字段, 目前固定为origin, 也就是不使用任何协议。 -
method: 加密方式, 目前也固定为none, 也就是不使用任何加密。 -
obfs: 混淆方式, 目前也固定为plain, 也就是不使用任何混淆。 -
base64pass: 出于兼容考虑的任意密码,并未使用, 它是经过urlsafebase64编码后且去掉末尾=号的字符串。 -
remarks: 备注, 可选, 经过urlsafebase64编码后且去掉末尾=号的字符串。 -
ot_enable: 是否启用Over TLS功能, 它必须存在且值为1, 虽然以前的 SSR 客户端中, 它是可选的。 -
ot_domain:Over TLS的域名, 可选, 值为经过urlsafebase64编码后且去掉末尾=号的字符串。 -
ot_path:Over TLS的路径, 必须存在, 值为经过urlsafebase64编码后且去掉末尾=号的字符串。 -
dangerous_mode: 是否启用危险模式, 可选, 值为true或false, 默认为false。 它的作用是让客户端不再进行证书验证,这有可能遭到中间人攻击,但好处是免除了冗长的根证书文件的携带, 还能够编码成 QRcode 方便分享。 -
ot_cert:Over TLS的证书, 可选, 值为经过urlsafebase64编码后且去掉末尾=号的字符串。 它在dangerous_mode为false或者未设置时, 客户端会使用它来验证服务端的证书, 以防止中间人攻击。 -
client_id: 客户端 ID, 可选, 值为一个明文 UUID 字符串,用于商业 overtls 服务端辨识顾客。
示例:
服务器IP: 123.45.67.89
端口: 1234
密码: aaabbb
加密: none
协议: origin
协议参数: (空)
混淆: plain
混淆参数: (空)
ot_path: /abcdefg/
备注: 测试中文
生成的结果:
ssr://MTIzLjQ1LjY3Ljg5OjEyMzQ6b3JpZ2luOm5vbmU6cGxhaW46WVdGaFltSmkvP290X2VuYWJsZT0xJm90X3BhdGg9TDJGaVkyUmxabWN2JnJlbWFya3M9NXJXTDZLLVY1TGl0NXBhSA
如果你生成的结果结果与上面的不一致,那么请检查实现代码,否则可能导致部分环境下识别错误。
用于同时导入或导出多个链接使用
标准导出格式形如:
ssr://aaa
ssr://bbb
ssr://ccc
或者
ssr://aaa ssr://bbb ssr://ccc
即使用换行分隔或空格分隔,注意换行可能因平台不同而产生三种不同的换行格式
其它格式例如使用"|"作为分隔符,尽管多数客户端仍然能识别,但也不建议使用此格式,请不要以客户端能识别作为判断标准。
The overtls client manager supports subscription, which can be used to automatically update the configuration file of the overtls client manager.
The subscription address is a http or https link, which can be obtained from the
overtls server manager, and the subscription address is unique to each overtls server manager.
The subscription format is a json file, which contains the configuration information of
the overtls server nodes, the format is as follows:
{
"version": 1,
"servers": [
{
"url": "ssr://NjYuMTEyLjIwOS4xMDc6OTQ0M...",
"type": "overtls"
},
{
"url": "ssr://Y2hhY2hhMjAtaWV0Zi1wb2x5...",
"type": "overtls"
}
],
// The above fields are mandatory.
// Optional fields for data usage:
"bytes_used": 274877906944,
"bytes_remaining": 824633720832
// You may add other custom fields in the root object.
}任何疑问或建议, 请到 Issues 提出.