2022-10-06 17:44:08 +08:00
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Configuration;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using static System.Configuration.ConfigurationManager;
|
|
|
|
|
namespace BarrageGrab
|
|
|
|
|
{
|
|
|
|
|
internal class Appsetting
|
|
|
|
|
{
|
|
|
|
|
private static readonly Appsetting ins = new Appsetting();
|
|
|
|
|
|
2023-03-04 14:52:04 +08:00
|
|
|
public static Appsetting Instanse { get => Get(); }
|
2022-11-05 16:39:35 +08:00
|
|
|
|
|
|
|
|
public Appsetting()
|
|
|
|
|
{
|
|
|
|
|
FilterProcess = AppSettings["filterProcess"].Trim().Split(',');
|
|
|
|
|
WsProt = int.Parse(AppSettings["wsListenPort"]);
|
2023-03-04 14:52:04 +08:00
|
|
|
PrintBarrage = AppSettings["printBarrage"].ToLower() == "true";
|
|
|
|
|
ProxyPort = int.Parse(AppSettings["proxPort"]);
|
2022-11-05 16:39:35 +08:00
|
|
|
}
|
|
|
|
|
|
2022-10-06 17:44:08 +08:00
|
|
|
public static Appsetting Get()
|
|
|
|
|
{
|
|
|
|
|
return ins;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 过滤的进程
|
|
|
|
|
/// </summary>
|
2022-11-05 16:39:35 +08:00
|
|
|
public string[] FilterProcess { get; private set; }
|
2022-10-06 17:44:08 +08:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 端口号
|
|
|
|
|
/// </summary>
|
2022-11-05 16:39:35 +08:00
|
|
|
public int WsProt { get; private set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 控制台打印消息开关
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool PrintBarrage { get; private set; }
|
2023-03-04 14:52:04 +08:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 代理端口
|
|
|
|
|
/// </summary>
|
|
|
|
|
public int ProxyPort { get; private set; } = 8827;
|
2022-10-06 17:44:08 +08:00
|
|
|
}
|
|
|
|
|
}
|