mirror of
https://github.com/nitezs/sub2clash.git
synced 2024-12-23 15:14:43 -05:00
🐛 Fix vless parser cannot correctly parse some reality/grpc fields
This commit is contained in:
parent
25e47453cb
commit
b73a02bdbf
42
README.md
42
README.md
@ -1,29 +1,31 @@
|
||||
# sub2clash
|
||||
|
||||
> Sing-box 用户?看看另一个项目 [sub2sing-box](https://github.com/nitezs/sub2sing-box)
|
||||
|
||||
将订阅链接转换为 Clash、Clash.Meta 配置
|
||||
[预览](https://www.nite07.com/sub)
|
||||
|
||||
## 特性
|
||||
|
||||
- 开箱即用的规则、策略组配置
|
||||
- 自动根据节点名称按国家划分策略组
|
||||
- 支持多订阅合并
|
||||
- 支持添加自定义 Rule Provider、Rule
|
||||
- 支持多种协议
|
||||
- Shadowsocks
|
||||
- ShadowsocksR
|
||||
- Vmess
|
||||
- Vless (Clash.Meta)
|
||||
- Trojan
|
||||
- Hysteria (Clash.Meta)
|
||||
- Hysteria2 (Clash.Meta)
|
||||
- 开箱即用的规则、策略组配置
|
||||
- 自动根据节点名称按国家划分策略组
|
||||
- 多订阅合并
|
||||
- 自定义 Rule Provider、Rule
|
||||
- 支持多种协议
|
||||
- Shadowsocks
|
||||
- ShadowsocksR
|
||||
- Vmess
|
||||
- Vless (Clash.Meta)
|
||||
- Trojan
|
||||
- Hysteria (Clash.Meta)
|
||||
- Hysteria2 (Clash.Meta)
|
||||
|
||||
## 使用
|
||||
|
||||
### 运行
|
||||
### 部署
|
||||
|
||||
- [docker compose](./docker-compose.yml)
|
||||
- 运行[二进制文件](https://github.com/nitezs/sub2clash/releases/latest)
|
||||
- [docker compose](./docker-compose.yml)
|
||||
- 运行[二进制文件](https://github.com/nitezs/sub2clash/releases/latest)
|
||||
|
||||
### 配置
|
||||
|
||||
@ -49,11 +51,11 @@
|
||||
可以通过变量自定义模板中的策略组代理节点
|
||||
具体参考下方默认模板
|
||||
|
||||
- `<all>` 为添加所有节点
|
||||
- `<countries>` 为添加所有国家策略组
|
||||
- `<地区二位字母代码>` 为添加指定地区所有节点,例如 `<hk>` 将添加所有香港节点
|
||||
- `<all>` 为添加所有节点
|
||||
- `<countries>` 为添加所有国家策略组
|
||||
- `<地区二位字母代码>` 为添加指定地区所有节点,例如 `<hk>` 将添加所有香港节点
|
||||
|
||||
#### 默认模板
|
||||
|
||||
- [Clash](./templates/template_clash.yaml)
|
||||
- [Clash.Meta](./templates/template_meta.yaml)
|
||||
- [Clash](./templates/template_clash.yaml)
|
||||
- [Clash.Meta](./templates/template_meta.yaml)
|
||||
|
@ -110,6 +110,7 @@ func ParseVless(proxy string) (model.Proxy, error) {
|
||||
|
||||
if security == "reality" {
|
||||
result.TLS = true
|
||||
result.Servername = sni
|
||||
result.RealityOpts = model.RealityOptions{
|
||||
PublicKey: pbk,
|
||||
ShortID: sid,
|
||||
@ -133,7 +134,9 @@ func ParseVless(proxy string) (model.Proxy, error) {
|
||||
|
||||
if _type == "grpc" {
|
||||
result.Network = "grpc"
|
||||
result.Servername = serviceName
|
||||
result.GrpcOpts = model.GrpcOptions{
|
||||
GrpcServiceName: serviceName,
|
||||
}
|
||||
}
|
||||
|
||||
if _type == "http" {
|
||||
|
Loading…
Reference in New Issue
Block a user