1
0
mirror of https://github.com/proxysu/ProxySU.git synced 2024-11-29 00:26:09 +03:00
ProxySU/ProxySuper.Core/ViewModels/XrayConfigViewModel.cs

123 lines
2.5 KiB
C#
Raw Normal View History

2021-07-08 13:37:32 +03:00
using MvvmCross.ViewModels;
2021-05-22 06:12:26 +03:00
using ProxySuper.Core.Models.Projects;
namespace ProxySuper.Core.ViewModels
{
public class XrayConfigViewModel : MvxViewModel<XraySettings>
{
public XraySettings Settings { get; set; }
public override void Prepare(XraySettings parameter)
{
Settings = parameter;
}
2022-11-23 17:06:09 +03:00
public string Flow
{
get { return Settings.Flow; }
}
public string UTLS
{
get { return Settings.UTLS; }
}
2021-05-22 12:14:27 +03:00
public bool Checked_VLESS_TCP_XTLS
{
get
{
2021-08-20 06:52:45 +03:00
return Settings.Types.Contains(RayType.VLESS_TCP_XTLS);
2021-05-22 12:14:27 +03:00
}
}
2021-05-22 06:12:26 +03:00
2021-05-22 12:14:27 +03:00
public bool Checked_VLESS_TCP
{
get
{
2021-08-20 06:52:45 +03:00
return Settings.Types.Contains(RayType.VLESS_TCP);
2021-05-22 12:14:27 +03:00
}
}
public bool Checked_VLESS_WS
{
get
{
2021-08-20 06:52:45 +03:00
return Settings.Types.Contains(RayType.VLESS_WS);
2021-05-22 12:14:27 +03:00
}
}
public bool Checked_VLESS_KCP
{
get
{
2021-08-20 06:52:45 +03:00
return Settings.Types.Contains(RayType.VLESS_KCP);
2021-05-22 12:14:27 +03:00
}
}
2022-11-24 16:07:34 +03:00
public bool Checked_VLESS_QUIC
{
get
{
return Settings.Types.Contains(RayType.VLESS_QUIC);
}
}
2021-06-30 06:56:13 +03:00
public bool Checked_VLESS_gRPC
{
get
{
2021-08-20 06:52:45 +03:00
return Settings.Types.Contains(RayType.VLESS_gRPC);
2021-06-30 06:56:13 +03:00
}
}
2021-05-22 12:14:27 +03:00
public bool Checked_VMESS_TCP
{
get
{
2021-08-20 06:52:45 +03:00
return Settings.Types.Contains(RayType.VMESS_TCP);
2021-05-22 12:14:27 +03:00
}
}
public bool Checked_VMESS_WS
{
get
{
2021-08-20 06:52:45 +03:00
return Settings.Types.Contains(RayType.VMESS_WS);
2021-05-22 12:14:27 +03:00
}
}
public bool Checked_VMESS_KCP
{
get
{
2021-08-20 06:52:45 +03:00
return Settings.Types.Contains(RayType.VMESS_KCP);
2021-05-22 12:14:27 +03:00
}
}
2022-11-24 16:07:34 +03:00
public bool Checked_VMESS_QUIC
{
get
{
return Settings.Types.Contains(RayType.VMESS_QUIC);
}
}
2021-05-22 12:14:27 +03:00
public bool Checked_Trojan_TCP
{
get
{
2021-08-20 06:52:45 +03:00
return Settings.Types.Contains(RayType.Trojan_TCP);
2021-05-22 12:14:27 +03:00
}
}
public bool CheckedShadowSocks
{
get
{
2021-08-20 06:52:45 +03:00
return Settings.Types.Contains(RayType.ShadowsocksAEAD);
2021-05-22 12:14:27 +03:00
}
}
2021-05-22 06:12:26 +03:00
}
}