mirror of https://github.com/2dust/v2rayN
Improve VmessQRCode json
parent
57d9d8ddb9
commit
e1cadc878a
|
@ -48,12 +48,12 @@ namespace v2rayN.Handler
|
||||||
|
|
||||||
VmessQRCode vmessQRCode = new()
|
VmessQRCode vmessQRCode = new()
|
||||||
{
|
{
|
||||||
v = item.configVersion.ToString(),
|
v = item.configVersion,
|
||||||
ps = item.remarks.TrimEx(),
|
ps = item.remarks.TrimEx(),
|
||||||
add = item.address,
|
add = item.address,
|
||||||
port = item.port.ToString(),
|
port = item.port,
|
||||||
id = item.id,
|
id = item.id,
|
||||||
aid = item.alterId.ToString(),
|
aid = item.alterId,
|
||||||
scy = item.security,
|
scy = item.security,
|
||||||
net = item.network,
|
net = item.network,
|
||||||
type = item.headerType,
|
type = item.headerType,
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
namespace v2rayN.Mode
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace v2rayN.Mode
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// https://github.com/2dust/v2rayN/wiki/
|
/// https://github.com/2dust/v2rayN/wiki/
|
||||||
|
@ -6,79 +8,37 @@
|
||||||
[Serializable]
|
[Serializable]
|
||||||
internal class VmessQRCode
|
internal class VmessQRCode
|
||||||
{
|
{
|
||||||
/// <summary>
|
[JsonNumberHandling(JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)]
|
||||||
///
|
public int v { get; set; } = 2;
|
||||||
/// </summary>
|
|
||||||
public string v { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
public string ps { get; set; } = string.Empty;
|
public string ps { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
public string add { get; set; } = string.Empty;
|
public string add { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
[JsonNumberHandling(JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)]
|
||||||
///
|
public int port { get; set; } = 0;
|
||||||
/// </summary>
|
|
||||||
public string port { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
public string id { get; set; } = string.Empty;
|
public string id { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
[JsonNumberHandling(JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)]
|
||||||
///
|
public int aid { get; set; } = 0;
|
||||||
/// </summary>
|
|
||||||
public string aid { get; set; } = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
public string scy { get; set; } = string.Empty;
|
public string scy { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
public string net { get; set; } = string.Empty;
|
public string net { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
public string type { get; set; } = string.Empty;
|
public string type { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
public string host { get; set; } = string.Empty;
|
public string host { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
public string path { get; set; } = string.Empty;
|
public string path { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// TLS
|
|
||||||
/// </summary>
|
|
||||||
public string tls { get; set; } = string.Empty;
|
public string tls { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// TLS SNI
|
|
||||||
/// </summary>
|
|
||||||
public string sni { get; set; } = string.Empty;
|
public string sni { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// TLS alpn
|
|
||||||
/// </summary>
|
|
||||||
public string alpn { get; set; } = string.Empty;
|
public string alpn { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// TLS fingerprint
|
|
||||||
/// </summary>
|
|
||||||
public string fp { get; set; } = string.Empty;
|
public string fp { get; set; } = string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue