Temporarily disable SelfContain

This commit is contained in:
H1JK
2022-06-03 00:22:05 +00:00
parent 876b18f85e
commit 8f44125856
2 changed files with 19 additions and 1 deletions

View File

@@ -18,6 +18,12 @@ public class VMessForm : ServerForm
VMessGlobal.TransferProtocols,
s => server.TransferProtocol = s,
server.TransferProtocol);
CreateComboBox("PacketEncoding",
"Packet Encoding",
VMessGlobal.TransferProtocols,
s => server.TransferProtocol = s,
server.TransferProtocol);
CreateComboBox("FakeType", "Fake Type", VMessGlobal.FakeTypes, s => server.FakeType = s, server.FakeType);
CreateTextBox("Host", "Host", s => true, s => server.Host = s, server.Host);

View File

@@ -10,7 +10,7 @@ public class VMessServer : Server
public override string MaskedData()
{
var maskedData = $"{EncryptMethod} + {TransferProtocol} + {FakeType}";
var maskedData = $"{EncryptMethod} + {TransferProtocol} + {PacketEncoding} + {FakeType}";
switch (TransferProtocol)
{
case "tcp":
@@ -49,6 +49,11 @@ public class VMessServer : Server
/// </summary>
public virtual string TransferProtocol { get; set; } = VMessGlobal.TransferProtocols[0];
/// <summary>
/// 包传输格式
/// </summary>
public virtual string PacketEncoding { get; set; } = VMessGlobal.PacketEncodings[2];
/// <summary>
/// 伪装类型
/// </summary>
@@ -115,6 +120,13 @@ public class VMessGlobal
"chacha20-poly1305"
};
public static readonly List<string> PacketEncodings = new()
{
"none",
"packet", // requires v2fly/v2ray-core v5.0.2+ or SagerNet/v2ray-core
"xudp" // requires XTLS/Xray-core or SagerNet/v2ray-core
}
/// <summary>
/// V2Ray 传输协议
/// </summary>