2021-05-13 04:58:45 +03:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
2021-05-14 14:07:19 +03:00
|
|
|
|
namespace ProxySuper.Core.Models.Projects
|
2021-05-13 04:58:45 +03:00
|
|
|
|
{
|
|
|
|
|
public partial class XraySettings : IProjectSettings
|
|
|
|
|
{
|
2021-05-20 13:32:17 +03:00
|
|
|
|
public List<int> FreePorts
|
2021-05-13 04:58:45 +03:00
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return new List<int>
|
|
|
|
|
{
|
|
|
|
|
VLESS_KCP_Port,
|
|
|
|
|
VMESS_KCP_Port,
|
2021-05-15 11:45:36 +03:00
|
|
|
|
ShadowSocksPort,
|
2021-05-13 04:58:45 +03:00
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-05-20 13:32:17 +03:00
|
|
|
|
public ProjectType Type { get; set; } = ProjectType.Xray;
|
2021-05-14 14:07:19 +03:00
|
|
|
|
|
2021-05-13 04:58:45 +03:00
|
|
|
|
/// <summary>
|
2021-05-16 04:12:47 +03:00
|
|
|
|
/// 端口
|
2021-05-13 04:58:45 +03:00
|
|
|
|
/// </summary>
|
2021-05-20 13:32:17 +03:00
|
|
|
|
public int Port { get; set; }
|
2021-05-13 04:58:45 +03:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2021-05-16 04:12:47 +03:00
|
|
|
|
/// 域名
|
2021-05-13 04:58:45 +03:00
|
|
|
|
/// </summary>
|
2021-05-20 13:32:17 +03:00
|
|
|
|
public string Domain { get; set; }
|
2021-05-13 04:58:45 +03:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2021-05-16 04:12:47 +03:00
|
|
|
|
/// UUID
|
2021-05-13 04:58:45 +03:00
|
|
|
|
/// </summary>
|
2021-05-16 04:12:47 +03:00
|
|
|
|
public string UUID { get; set; }
|
2021-05-13 04:58:45 +03:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 伪装域名
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string MaskDomain { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 安装类型
|
|
|
|
|
/// </summary>
|
2021-05-16 04:12:47 +03:00
|
|
|
|
public List<XrayType> Types { get; set; } = new List<XrayType>();
|
2021-05-13 04:58:45 +03:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 根据xray类型获取路径
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="type"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public string GetPath(XrayType type)
|
|
|
|
|
{
|
|
|
|
|
switch (type)
|
|
|
|
|
{
|
|
|
|
|
case XrayType.VLESS_WS:
|
|
|
|
|
return VLESS_WS_Path;
|
|
|
|
|
case XrayType.VMESS_TCP:
|
|
|
|
|
return VMESS_TCP_Path;
|
|
|
|
|
case XrayType.VMESS_WS:
|
|
|
|
|
return VMESS_WS_Path;
|
|
|
|
|
default:
|
|
|
|
|
return string.Empty;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|