-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfigModels.cs
More file actions
46 lines (37 loc) · 1.17 KB
/
ConfigModels.cs
File metadata and controls
46 lines (37 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using Newtonsoft.Json;
namespace SingboxGUI
{
// Root config class for deserialization
public class RootConfig
{
public ExperimentalConfig Experimental { get; set; }
}
// Experimental configuration section
public class ExperimentalConfig
{
[JsonProperty("cache_file")]
public CacheFileConfig CacheFile { get; set; }
[JsonProperty("clash_api")]
public ClashApiConfig ClashApi { get; set; }
}
// Clash API configuration
public class ClashApiConfig
{
[JsonProperty("external_controller")]
public string ExternalController { get; set; }
[JsonProperty("access_control_allow_origin")]
public string AccessControlAllowOrigin { get; set; }
[JsonProperty("access_control_allow_private_network")]
public bool AccessControlAllowPrivateNetwork { get; set; }
}
// Cache file configuration
public class CacheFileConfig
{
[JsonProperty("enabled")]
public bool Enabled { get; set; }
[JsonProperty("path")]
public string Path { get; set; }
[JsonProperty("cache_id")]
public string CacheId { get; set; }
}
}