OSDN Git Service

v2raya-v5: add new package
[v2raya/v2raya-openwrt.git] / v2raya-v5 / patches / 010-fix-check-the-transport-type-to-avoid-abnormal-exit-.patch
1 From 38afbd4f03a7b1816b7da30e7c5f5f9eb167f222 Mon Sep 17 00:00:00 2001
2 From: mzz2017 <mzz@tuta.io>
3 Date: Sun, 11 Dec 2022 19:17:20 +0800
4 Subject: [PATCH] fix: check the transport type to avoid abnormal exit of core
5
6 ---
7  service/core/serverObj/v2ray.go | 2 ++
8  1 file changed, 2 insertions(+)
9
10 --- a/core/serverObj/v2ray.go
11 +++ b/core/serverObj/v2ray.go
12 @@ -333,6 +333,8 @@ func (v *V2Ray) Configuration(info Prior
13                                         Path: v.Path,
14                                 }
15                         }
16 +               default:
17 +                       return Configuration{}, fmt.Errorf("unexpected transport type: %v", v.Net)
18                 }
19                 if strings.ToLower(v.TLS) == "tls" {
20                         core.StreamSettings.Security = "tls"