fix: V2RayConfigUtils direct outbound config

refactor: rename VMessController Name V2Ray to VMess
This commit is contained in:
ChsBuffer
2020-10-22 21:31:20 +08:00
parent 4fbbd1dbd4
commit b96f171b47
2 changed files with 12 additions and 4 deletions

View File

@@ -18,7 +18,7 @@ namespace Netch.Servers.VMess.Utils
routing(server, mode, ref v2rayConfig);
outbound(server, ref v2rayConfig);
outbound(server, mode, ref v2rayConfig);
return JsonConvert.SerializeObject(v2rayConfig);
}
@@ -103,7 +103,7 @@ namespace Netch.Servers.VMess.Utils
}
}
private static void outbound(Server server, ref V2rayConfig v2rayConfig)
private static void outbound(Server server, Mode mode, ref V2rayConfig v2rayConfig)
{
try
{
@@ -224,7 +224,15 @@ namespace Netch.Servers.VMess.Utils
}
}
v2rayConfig.outbounds = new List<Outbounds> {outbound};
v2rayConfig.outbounds = new List<Outbounds>
{
outbound,
new Outbounds
{
tag = "direct",
protocol = "freedom"
}
};
}
catch
{

View File

@@ -13,7 +13,7 @@ namespace Netch.Servers.VMess
StoppedKeywords.AddRange(new[] {"config file not readable", "failed to"});
}
public override string Name { get; protected set; } = "V2Ray";
public override string Name { get; protected set; } = "VMess";
public override string MainFile { get; protected set; } = "v2ray.exe";
public Server Server { get; set; }
public ushort? Socks5LocalPort { get; set; }