diff --git a/shadowsocks-csharp/Controller/Service/PACServer.cs b/shadowsocks-csharp/Controller/Service/PACServer.cs index b53648fc..f1ee3218 100644 --- a/shadowsocks-csharp/Controller/Service/PACServer.cs +++ b/shadowsocks-csharp/Controller/Service/PACServer.cs @@ -51,7 +51,7 @@ namespace Shadowsocks.Controller PacSecret = ""; } - PacUrl = $"http://{config.LocalHost}:{config.localPort}/pac?t={GetTimestamp(DateTime.Now)}{PacSecret}"; + PacUrl = $"http://{config.localHost}:{config.localPort}/pac?t={GetTimestamp(DateTime.Now)}{PacSecret}"; } diff --git a/shadowsocks-csharp/Controller/Service/UpdateChecker.cs b/shadowsocks-csharp/Controller/Service/UpdateChecker.cs index 1e94c571..6cf562a3 100644 --- a/shadowsocks-csharp/Controller/Service/UpdateChecker.cs +++ b/shadowsocks-csharp/Controller/Service/UpdateChecker.cs @@ -170,7 +170,7 @@ namespace Shadowsocks.Controller { WebClient http = new WebClient(); http.Headers.Add("User-Agent", UserAgent); - http.Proxy = new WebProxy(config.LocalHost, config.localPort); + http.Proxy = new WebProxy(config.localHost, config.localPort); return http; } diff --git a/shadowsocks-csharp/Model/Configuration.cs b/shadowsocks-csharp/Model/Configuration.cs index 08f88fbb..b7e62325 100644 --- a/shadowsocks-csharp/Model/Configuration.cs +++ b/shadowsocks-csharp/Model/Configuration.cs @@ -36,8 +36,8 @@ namespace Shadowsocks.Model public HotkeyConfig hotkey; private static string CONFIG_FILE = "gui-config.json"; - - public string LocalHost => GetLocalHost(); + [JsonIgnore] + public string localHost => GetLocalHost(); private string GetLocalHost() { return isIPv6Enabled ? "[::1]" : "127.0.0.1"; }