File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 <PackageId >Invisible Man XRay</PackageId >
1010 <Company >Invisible Man</Company >
1111 <Copyright >Copyright (C) 2023 Invisible Man</Copyright >
12- <Version >0.4.1 .0</Version >
13- <AssemblyVersion >0.4.1 .0</AssemblyVersion >
12+ <Version >0.4.2 .0</Version >
13+ <AssemblyVersion >0.4.2 .0</AssemblyVersion >
1414 <Nullable >enable</Nullable >
1515 <NoWarn >0108;8600;8601;8602;8603;8604;8618;8625;8762</NoWarn >
1616 <UseWPF >true</UseWPF >
Original file line number Diff line number Diff line change 11using System ;
2+ using System . Linq ;
23using System . Text ;
34using Newtonsoft . Json ;
45
@@ -28,6 +29,13 @@ public class Data
2829 }
2930
3031 private Data data ;
32+ private readonly string [ ] validSecurity = new [ ] {
33+ "aes-128-gcm" ,
34+ "chacha20-poly1305" ,
35+ "auto" ,
36+ "none" ,
37+ "zero"
38+ } ;
3139
3240 public override Status FetchDataFromLink ( string link )
3341 {
@@ -70,10 +78,10 @@ void MapDecodedLinkToData(string decodedString)
7078 version = ! string . IsNullOrEmpty ( data . v ) ? int . Parse ( data . v ) : 0 ,
7179 remark = data . ps ,
7280 address = data . add ,
73- port = ! string . IsNullOrEmpty ( data . v ) ? int . Parse ( data . port ) : 0 ,
81+ port = ! string . IsNullOrEmpty ( data . port ) ? int . Parse ( data . port ) : 0 ,
7482 id = data . id ,
75- alterId = ! string . IsNullOrEmpty ( data . v ) ? int . Parse ( data . aid ) : 0 ,
76- security = data . scy ,
83+ alterId = ! string . IsNullOrEmpty ( data . aid ) ? int . Parse ( data . aid ) : 0 ,
84+ security = validSecurity . Contains ( data . scy ) ? data . scy : Global . DEFAULT_SECURITY ,
7785 requestHost = data . host ,
7886 path = data . path ,
7987 streamNetwork = data . net ,
Original file line number Diff line number Diff line change @@ -17,5 +17,6 @@ public static class StreamSecurity
1717
1818 public const string DEFAULT_EMAIL = "t@t.tt" ;
1919 public const string DEFAULT_LOG_LEVEL = "warning" ;
20+ public const string DEFAULT_SECURITY = "auto" ;
2021 }
2122}
You can’t perform that action at this time.
0 commit comments