1
0
mirror of https://github.com/nitezs/sub2clash.git synced 2024-12-23 22:04:41 -05:00

🐛 Fix vless parser cannot correctly parse some reality/grpc fields

This commit is contained in:
Nite07 2024-05-05 22:46:01 +08:00
parent 25e47453cb
commit b73a02bdbf
2 changed files with 26 additions and 21 deletions

View File

@ -1,5 +1,7 @@
# sub2clash # sub2clash
> Sing-box 用户?看看另一个项目 [sub2sing-box](https://github.com/nitezs/sub2sing-box)
将订阅链接转换为 Clash、Clash.Meta 配置 将订阅链接转换为 Clash、Clash.Meta 配置
[预览](https://www.nite07.com/sub) [预览](https://www.nite07.com/sub)
@ -7,8 +9,8 @@
- 开箱即用的规则、策略组配置 - 开箱即用的规则、策略组配置
- 自动根据节点名称按国家划分策略组 - 自动根据节点名称按国家划分策略组
- 支持多订阅合并 - 多订阅合并
- 支持添加自定义 Rule Provider、Rule - 自定义 Rule Provider、Rule
- 支持多种协议 - 支持多种协议
- Shadowsocks - Shadowsocks
- ShadowsocksR - ShadowsocksR
@ -20,7 +22,7 @@
## 使用 ## 使用
### 运行 ### 部署
- [docker compose](./docker-compose.yml) - [docker compose](./docker-compose.yml)
- 运行[二进制文件](https://github.com/nitezs/sub2clash/releases/latest) - 运行[二进制文件](https://github.com/nitezs/sub2clash/releases/latest)

View File

@ -110,6 +110,7 @@ func ParseVless(proxy string) (model.Proxy, error) {
if security == "reality" { if security == "reality" {
result.TLS = true result.TLS = true
result.Servername = sni
result.RealityOpts = model.RealityOptions{ result.RealityOpts = model.RealityOptions{
PublicKey: pbk, PublicKey: pbk,
ShortID: sid, ShortID: sid,
@ -133,7 +134,9 @@ func ParseVless(proxy string) (model.Proxy, error) {
if _type == "grpc" { if _type == "grpc" {
result.Network = "grpc" result.Network = "grpc"
result.Servername = serviceName result.GrpcOpts = model.GrpcOptions{
GrpcServiceName: serviceName,
}
} }
if _type == "http" { if _type == "http" {