mirror of
https://github.com/proxysu/ProxySU.git
synced 2024-11-29 16:46:06 +03:00
68 lines
1.4 KiB
C#
68 lines
1.4 KiB
C#
using Newtonsoft.Json;
|
|
using ProxySuper.Core.Services;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace ProxySuper.Core.Models.Projects
|
|
{
|
|
public class TrojanGoSettings : IProjectSettings
|
|
{
|
|
public TrojanGoSettings()
|
|
{
|
|
Port = 443;
|
|
WebSocketPath = "/ws";
|
|
}
|
|
|
|
public List<int> FreePorts
|
|
{
|
|
get
|
|
{
|
|
return new List<int>();
|
|
}
|
|
}
|
|
|
|
public ProjectType Type { get; set; } = ProjectType.TrojanGo;
|
|
|
|
/// <summary>
|
|
/// 域名
|
|
/// </summary>
|
|
public string Domain { get; set; }
|
|
|
|
/// <summary>
|
|
/// 端口
|
|
/// </summary>
|
|
public int Port { get; set; }
|
|
|
|
/// <summary>
|
|
/// 密码
|
|
/// </summary>
|
|
public string Password { get; set; }
|
|
|
|
/// <summary>
|
|
/// 伪装域名
|
|
/// </summary>
|
|
public string MaskDomain { get; set; }
|
|
|
|
/// <summary>
|
|
/// 是否开启WebSocket
|
|
/// </summary>
|
|
[JsonIgnore]
|
|
public bool EnableWebSocket
|
|
{
|
|
get
|
|
{
|
|
return !string.IsNullOrEmpty(WebSocketPath);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// websocket路径
|
|
/// </summary>
|
|
public string WebSocketPath { get; set; }
|
|
|
|
}
|
|
}
|