Browse Source

add jsonignore for param localHost

tags/4.1.7
Yifei0727 5 years ago
parent
commit
5c0ce2159b
3 changed files with 4 additions and 4 deletions
  1. +1
    -1
      shadowsocks-csharp/Controller/Service/PACServer.cs
  2. +1
    -1
      shadowsocks-csharp/Controller/Service/UpdateChecker.cs
  3. +2
    -2
      shadowsocks-csharp/Model/Configuration.cs

+ 1
- 1
shadowsocks-csharp/Controller/Service/PACServer.cs View File

@@ -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}";
}


+ 1
- 1
shadowsocks-csharp/Controller/Service/UpdateChecker.cs View File

@@ -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;
}


+ 2
- 2
shadowsocks-csharp/Model/Configuration.cs View File

@@ -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";
}


Loading…
Cancel
Save