Browse Source

hide optional fields in gui-config.json

tags/4.2.0.0
Student Main 5 years ago
parent
commit
f5c812e38e
No known key found for this signature in database GPG Key ID: AA78519C208C8742
1 changed files with 14 additions and 0 deletions
  1. +14
    -0
      shadowsocks-csharp/Model/Server.cs

+ 14
- 0
shadowsocks-csharp/Model/Server.cs View File

@@ -6,6 +6,8 @@ using System.Web;
using Shadowsocks.Controller; using Shadowsocks.Controller;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Linq; using System.Linq;
using Newtonsoft.Json;
using System.ComponentModel;
namespace Shadowsocks.Model namespace Shadowsocks.Model
{ {
@@ -27,10 +29,21 @@ namespace Shadowsocks.Model
public int server_port; public int server_port;
public string password; public string password;
public string method; public string method;
// optional fields
[DefaultValue("")]
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public string plugin; public string plugin;
[DefaultValue("")]
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public string plugin_opts; public string plugin_opts;
[DefaultValue("")]
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public string plugin_args; public string plugin_args;
[DefaultValue("")]
[JsonProperty(NullValueHandling = NullValueHandling.Ignore, DefaultValueHandling = DefaultValueHandling.IgnoreAndPopulate)]
public string remarks; public string remarks;
public int timeout; public int timeout;
public override int GetHashCode() public override int GetHashCode()
@@ -103,6 +116,7 @@ namespace Shadowsocks.Model
return $"ss://{url}{tag}"; return $"ss://{url}{tag}";
} }
[JsonIgnore]
public string FormalHostName public string FormalHostName
{ {
get get


Loading…
Cancel
Save