mirror of
https://github.com/nitezs/sub2sing-box.git
synced 2024-12-23 21:24:42 -05:00
fix: vmess/vless quic 缺少 tls 配置
This commit is contained in:
parent
43f7a1ed4e
commit
86885f6b47
@ -109,6 +109,9 @@ func ParseVless(proxy string) (model2.Proxy, error) {
|
|||||||
Type: "quic",
|
Type: "quic",
|
||||||
QUICOptions: model2.V2RayQUICOptions{},
|
QUICOptions: model2.V2RayQUICOptions{},
|
||||||
}
|
}
|
||||||
|
result.VLESS.TLS = &model2.OutboundTLSOptions{
|
||||||
|
Enabled: true,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if params.Get("type") == "grpc" {
|
if params.Get("type") == "grpc" {
|
||||||
result.VLESS.Transport = &model2.V2RayTransportOptions{
|
result.VLESS.Transport = &model2.V2RayTransportOptions{
|
||||||
|
@ -71,14 +71,13 @@ func ParseVmess(proxy string) (model2.Proxy, error) {
|
|||||||
} else {
|
} else {
|
||||||
alpn = nil
|
alpn = nil
|
||||||
}
|
}
|
||||||
tls := model2.OutboundTLSOptions{
|
result.VMess.TLS = &model2.OutboundTLSOptions{
|
||||||
Enabled: true,
|
Enabled: true,
|
||||||
UTLS: &model2.OutboundUTLSOptions{
|
UTLS: &model2.OutboundUTLSOptions{
|
||||||
Fingerprint: vmess.Fp,
|
Fingerprint: vmess.Fp,
|
||||||
},
|
},
|
||||||
ALPN: alpn,
|
ALPN: alpn,
|
||||||
}
|
}
|
||||||
result.VMess.TLS = &tls
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if vmess.Net == "ws" {
|
if vmess.Net == "ws" {
|
||||||
@ -94,20 +93,21 @@ func ParseVmess(proxy string) (model2.Proxy, error) {
|
|||||||
"Host": vmess.Host,
|
"Host": vmess.Host,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
transport := model2.V2RayTransportOptions{
|
result.VMess.Transport = &model2.V2RayTransportOptions{
|
||||||
Type: "ws",
|
Type: "ws",
|
||||||
WebsocketOptions: ws,
|
WebsocketOptions: ws,
|
||||||
}
|
}
|
||||||
result.VMess.Transport = &transport
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if vmess.Net == "quic" {
|
if vmess.Net == "quic" {
|
||||||
quic := model2.V2RayQUICOptions{}
|
quic := model2.V2RayQUICOptions{}
|
||||||
transport := model2.V2RayTransportOptions{
|
result.VMess.Transport = &model2.V2RayTransportOptions{
|
||||||
Type: "quic",
|
Type: "quic",
|
||||||
QUICOptions: quic,
|
QUICOptions: quic,
|
||||||
}
|
}
|
||||||
result.VMess.Transport = &transport
|
result.VMess.TLS = &model2.OutboundTLSOptions{
|
||||||
|
Enabled: true,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if vmess.Net == "grpc" {
|
if vmess.Net == "grpc" {
|
||||||
@ -115,11 +115,10 @@ func ParseVmess(proxy string) (model2.Proxy, error) {
|
|||||||
ServiceName: vmess.Path,
|
ServiceName: vmess.Path,
|
||||||
PermitWithoutStream: true,
|
PermitWithoutStream: true,
|
||||||
}
|
}
|
||||||
transport := model2.V2RayTransportOptions{
|
result.VMess.Transport = &model2.V2RayTransportOptions{
|
||||||
Type: "grpc",
|
Type: "grpc",
|
||||||
GRPCOptions: grpc,
|
GRPCOptions: grpc,
|
||||||
}
|
}
|
||||||
result.VMess.Transport = &transport
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if vmess.Net == "h2" {
|
if vmess.Net == "h2" {
|
||||||
@ -127,11 +126,10 @@ func ParseVmess(proxy string) (model2.Proxy, error) {
|
|||||||
Host: strings.Split(vmess.Host, ","),
|
Host: strings.Split(vmess.Host, ","),
|
||||||
Path: vmess.Path,
|
Path: vmess.Path,
|
||||||
}
|
}
|
||||||
transport := model2.V2RayTransportOptions{
|
result.VMess.Transport = &model2.V2RayTransportOptions{
|
||||||
Type: "http",
|
Type: "http",
|
||||||
HTTPOptions: httpOps,
|
HTTPOptions: httpOps,
|
||||||
}
|
}
|
||||||
result.VMess.Transport = &transport
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return result, nil
|
return result, nil
|
||||||
|
Loading…
Reference in New Issue
Block a user