mirror of
https://github.com/netchx/netch.git
synced 2026-05-11 23:45:06 +08:00
Add files via upload
This commit is contained in:
15
Netch/Models/Config/AioDNS.cs
Normal file
15
Netch/Models/Config/AioDNS.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace Netch.Models.Config
|
||||
{
|
||||
public class AioDNS
|
||||
{
|
||||
/// <summary>
|
||||
/// 国内 DNS 地址
|
||||
/// </summary>
|
||||
public string ChinaDNS = "tcp://119.29.29.29:53";
|
||||
|
||||
/// <summary>
|
||||
/// 国外 DNS 地址
|
||||
/// </summary>
|
||||
public string OtherDNS = "tls://1.1.1.1:853";
|
||||
}
|
||||
}
|
||||
73
Netch/Models/Config/Config.cs
Normal file
73
Netch/Models/Config/Config.cs
Normal file
@@ -0,0 +1,73 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Netch.Models.Config
|
||||
{
|
||||
public class Config
|
||||
{
|
||||
/// <summary>
|
||||
/// 配置 版本
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("verCode")]
|
||||
public int VerCode = 1;
|
||||
|
||||
/// <summary>
|
||||
/// 通用 配置
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("generic")]
|
||||
public Generic Generic = new();
|
||||
|
||||
/// <summary>
|
||||
/// 端口 配置
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("ports")]
|
||||
public Ports Ports = new();
|
||||
|
||||
/// <summary>
|
||||
/// ProcessMode 配置
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("processmode")]
|
||||
public ProcessMode ProcessMode = new();
|
||||
|
||||
/// <summary>
|
||||
/// ShareMode 配置
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sharemode")]
|
||||
public ShareMode ShareMode = new();
|
||||
|
||||
/// <summary>
|
||||
/// TapMode 配置
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("tapmode")]
|
||||
public TapMode TapMode = new();
|
||||
|
||||
/// <summary>
|
||||
/// TunMode 配置
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("tunmode")]
|
||||
public TunMode TunMode = new();
|
||||
|
||||
/// <summary>
|
||||
/// AioDNS 配置
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("aiodns")]
|
||||
public AioDNS AioDNS = new();
|
||||
|
||||
/// <summary>
|
||||
/// V2Ray 配置
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("v2ray")]
|
||||
public V2Ray V2Ray = new();
|
||||
|
||||
/// <summary>
|
||||
/// STUN 配置
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("stun")]
|
||||
public STUN STUN = new();
|
||||
|
||||
/// <summary>
|
||||
/// 订阅链接
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("subscriptions")]
|
||||
public List<Subscription> Subscriptions = new();
|
||||
}
|
||||
}
|
||||
15
Netch/Models/Config/Generic.cs
Normal file
15
Netch/Models/Config/Generic.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
namespace Netch.Models.Config
|
||||
{
|
||||
public class Generic
|
||||
{
|
||||
/// <summary>
|
||||
/// 检查 Unstable 更新
|
||||
/// </summary>
|
||||
public bool Unstable = false;
|
||||
|
||||
/// <summary>
|
||||
/// 使用 ICMP 测试延迟
|
||||
/// </summary>
|
||||
public bool ICMPing = true;
|
||||
}
|
||||
}
|
||||
23
Netch/Models/Config/Ports.cs
Normal file
23
Netch/Models/Config/Ports.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
namespace Netch.Models.Config
|
||||
{
|
||||
public class Ports
|
||||
{
|
||||
/// <summary>
|
||||
/// Socks 端口
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("socks")]
|
||||
public int Socks = 2081;
|
||||
|
||||
/// <summary>
|
||||
/// Mixed 端口
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("mixed")]
|
||||
public int Mixed = 2082;
|
||||
|
||||
/// <summary>
|
||||
/// Redir 端口
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("redir")]
|
||||
public int Redir = 2083;
|
||||
}
|
||||
}
|
||||
11
Netch/Models/Config/ProcessMode.cs
Normal file
11
Netch/Models/Config/ProcessMode.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace Netch.Models.Config
|
||||
{
|
||||
public class ProcessMode
|
||||
{
|
||||
/// <summary>
|
||||
/// DNS
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("dns")]
|
||||
public string DNS = "1.1.1.1:53";
|
||||
}
|
||||
}
|
||||
11
Netch/Models/Config/STUN.cs
Normal file
11
Netch/Models/Config/STUN.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace Netch.Models.Config
|
||||
{
|
||||
public class STUN
|
||||
{
|
||||
/// <summary>
|
||||
/// 主机名
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("host")]
|
||||
public string Host = "stun.ekiga.net";
|
||||
}
|
||||
}
|
||||
48
Netch/Models/Config/ShareMode.cs
Normal file
48
Netch/Models/Config/ShareMode.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Netch.Models.Config
|
||||
{
|
||||
public class ShareMode
|
||||
{
|
||||
/// <summary>
|
||||
/// 硬件地址(用于 ARP 回复)
|
||||
///
|
||||
/// CuteCR
|
||||
/// 43:75:74:65:43:52
|
||||
///
|
||||
/// NetchX
|
||||
/// 4e:65:74:63:68:58
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("hardware")]
|
||||
public string Hardware = "4e:65:74:63:68:58";
|
||||
|
||||
/// <summary>
|
||||
/// 地址
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("network")]
|
||||
public string Network = "100.64.0.0/24";
|
||||
|
||||
/// <summary>
|
||||
/// 网关
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("gateway")]
|
||||
public string Gateway = "100.64.0.1";
|
||||
|
||||
/// <summary>
|
||||
/// DNS
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("dns")]
|
||||
public string DNS = "aiodns";
|
||||
|
||||
/// <summary>
|
||||
/// 网卡名(默认自动检测)
|
||||
/// </summary>
|
||||
public string EthernetName = "auto";
|
||||
|
||||
/// <summary>
|
||||
/// 绕过 IP 地址
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bypass")]
|
||||
public List<string> BypassIPs = new();
|
||||
}
|
||||
}
|
||||
23
Netch/Models/Config/Subscription.cs
Normal file
23
Netch/Models/Config/Subscription.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
namespace Netch.Models.Config
|
||||
{
|
||||
public class Subscription
|
||||
{
|
||||
/// <summary>
|
||||
/// 启用 / 禁用
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("enabled")]
|
||||
public bool Checked = true;
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("remark")]
|
||||
public string Remark;
|
||||
|
||||
/// <summary>
|
||||
/// 链接
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("address")]
|
||||
public string Link;
|
||||
}
|
||||
}
|
||||
31
Netch/Models/Config/TapMode.cs
Normal file
31
Netch/Models/Config/TapMode.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Netch.Models.Config
|
||||
{
|
||||
public class TapMode
|
||||
{
|
||||
/// <summary>
|
||||
/// 地址
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("network")]
|
||||
public string Network = "100.64.0.100/24";
|
||||
|
||||
/// <summary>
|
||||
/// 网关
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("gateway")]
|
||||
public string Gateway = "100.64.0.1";
|
||||
|
||||
/// <summary>
|
||||
/// DNS
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("dns")]
|
||||
public string DNS = "aiodns";
|
||||
|
||||
/// <summary>
|
||||
/// 绕过 IP 地址
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bypass")]
|
||||
public List<string> BypassIPs = new();
|
||||
}
|
||||
}
|
||||
31
Netch/Models/Config/TunMode.cs
Normal file
31
Netch/Models/Config/TunMode.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Netch.Models.Config
|
||||
{
|
||||
public class TunMode
|
||||
{
|
||||
/// <summary>
|
||||
/// 地址
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("network")]
|
||||
public string Network = "100.64.0.100/24";
|
||||
|
||||
/// <summary>
|
||||
/// 网关
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("gateway")]
|
||||
public string Gateway = "100.64.0.1";
|
||||
|
||||
/// <summary>
|
||||
/// DNS
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("dns")]
|
||||
public string DNS = "aiodns";
|
||||
|
||||
/// <summary>
|
||||
/// 绕过 IP 地址
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("bypass")]
|
||||
public List<string> BypassIPs = new();
|
||||
}
|
||||
}
|
||||
63
Netch/Models/Config/V2Ray.cs
Normal file
63
Netch/Models/Config/V2Ray.cs
Normal file
@@ -0,0 +1,63 @@
|
||||
namespace Netch.Models.Config
|
||||
{
|
||||
public class V2Ray
|
||||
{
|
||||
/// <summary>
|
||||
/// FullCone 支持(需要 xray-core 服务端版本 v1.3.0+)
|
||||
/// </summary>
|
||||
public bool FullCone = false;
|
||||
|
||||
/// <summary>
|
||||
/// 跳过证书认证
|
||||
/// </summary>
|
||||
public bool Insecure = false;
|
||||
|
||||
/// <summary>
|
||||
/// 多路复用
|
||||
/// </summary>
|
||||
public bool Multiplex = false;
|
||||
|
||||
/// <summary>
|
||||
/// KCP 设定
|
||||
/// </summary>
|
||||
public V2RayKCP KCP = new();
|
||||
}
|
||||
|
||||
public class V2RayKCP
|
||||
{
|
||||
/// <summary>
|
||||
/// MTU
|
||||
/// </summary>
|
||||
public int MTU = 1450;
|
||||
|
||||
/// <summary>
|
||||
/// TTI
|
||||
/// </summary>
|
||||
public int TTI = 50;
|
||||
|
||||
/// <summary>
|
||||
/// 上行链路流量
|
||||
/// </summary>
|
||||
public int UPC = 5;
|
||||
|
||||
/// <summary>
|
||||
/// 下行链路流量
|
||||
/// </summary>
|
||||
public int DLC = 20;
|
||||
|
||||
/// <summary>
|
||||
/// 读取缓冲区大小(MB)
|
||||
/// </summary>
|
||||
public int RBS = 2;
|
||||
|
||||
/// <summary>
|
||||
/// 写入缓冲区大小(MB)
|
||||
/// </summary>
|
||||
public int WBS = 2;
|
||||
|
||||
/// <summary>
|
||||
/// 拥塞控制
|
||||
/// </summary>
|
||||
public bool BBR = false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user