Skip to content

Commit

Permalink
Merge pull request #38 from InvisibleManVPN/develop
Browse files Browse the repository at this point in the history
InvisibleMan XRay version 0.4.2
  • Loading branch information
InvisibleManVPN authored Mar 25, 2023
2 parents 9e108e7 + a7f02b9 commit c387ec6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
4 changes: 2 additions & 2 deletions InvisibleMan-XRay/InvisibleMan-XRay.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<PackageId>Invisible Man XRay</PackageId>
<Company>Invisible Man</Company>
<Copyright>Copyright (C) 2023 Invisible Man</Copyright>
<Version>0.4.1.0</Version>
<AssemblyVersion>0.4.1.0</AssemblyVersion>
<Version>0.4.2.0</Version>
<AssemblyVersion>0.4.2.0</AssemblyVersion>
<Nullable>enable</Nullable>
<NoWarn>0108;8600;8601;8602;8603;8604;8618;8625;8762</NoWarn>
<UseWPF>true</UseWPF>
Expand Down
14 changes: 11 additions & 3 deletions InvisibleMan-XRay/Models/Templates/Vmess.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Linq;
using System.Text;
using Newtonsoft.Json;

Expand Down Expand Up @@ -28,6 +29,13 @@ public class Data
}

private Data data;
private readonly string[] validSecurity = new[] {
"aes-128-gcm",
"chacha20-poly1305",
"auto",
"none",
"zero"
};

public override Status FetchDataFromLink(string link)
{
Expand Down Expand Up @@ -70,10 +78,10 @@ void MapDecodedLinkToData(string decodedString)
version = !string.IsNullOrEmpty(data.v) ? int.Parse(data.v) : 0,
remark = data.ps,
address = data.add,
port = !string.IsNullOrEmpty(data.v)? int.Parse(data.port) : 0,
port = !string.IsNullOrEmpty(data.port)? int.Parse(data.port) : 0,
id = data.id,
alterId = !string.IsNullOrEmpty(data.v) ? int.Parse(data.aid) : 0,
security = data.scy,
alterId = !string.IsNullOrEmpty(data.aid) ? int.Parse(data.aid) : 0,
security = validSecurity.Contains(data.scy) ? data.scy : Global.DEFAULT_SECURITY,
requestHost = data.host,
path = data.path,
streamNetwork = data.net,
Expand Down
1 change: 1 addition & 0 deletions InvisibleMan-XRay/Values/Global.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ public static class StreamSecurity

public const string DEFAULT_EMAIL = "t@t.tt";
public const string DEFAULT_LOG_LEVEL = "warning";
public const string DEFAULT_SECURITY = "auto";
}
}

0 comments on commit c387ec6

Please sign in to comment.