1
0
mirror of https://github.com/proxysu/ProxySU.git synced 2024-11-23 13:46:08 +03:00
ProxySU/ProxySuper.Core/Models/Projects/NaiveProxySettings.cs

47 lines
1.0 KiB
C#
Raw Normal View History

2021-06-17 13:54:07 +03:00
using Newtonsoft.Json;
2021-05-20 13:32:17 +03:00
using System.Collections.Generic;
namespace ProxySuper.Core.Models.Projects
{
public class NaiveProxySettings : IProjectSettings
{
2021-05-24 13:57:17 +03:00
public NaiveProxySettings()
{
Port = 443;
}
public List<int> FreePorts => new List<int>();
public ProjectType Type { get; set; } = ProjectType.NaiveProxy;
2021-05-20 13:32:17 +03:00
public int Port { get; set; }
public string Domain { get; set; }
2021-05-24 13:57:17 +03:00
public string UserName { get; set; }
2021-05-20 13:32:17 +03:00
2021-05-24 13:57:17 +03:00
public string Password { get; set; }
2021-05-25 13:28:37 +03:00
public string MaskDomain { get; set; }
2021-06-17 13:54:07 +03:00
[JsonIgnore]
public string Email
{
get
{
if (!string.IsNullOrEmpty(Domain))
{
var arr = Domain.Split('.');
if (arr.Length == 3)
{
return $"{arr[0]}@{arr[1]}.{arr[2]}";
}
}
return $"{UserName + Port.ToString()}@gmail.com";
}
}
2021-05-20 13:32:17 +03:00
}
}