@@ -51,7 +51,7 @@ namespace Shadowsocks.Controller | |||||
PacSecret = ""; | 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}"; | |||||
} | } | ||||
@@ -170,7 +170,7 @@ namespace Shadowsocks.Controller | |||||
{ | { | ||||
WebClient http = new WebClient(); | WebClient http = new WebClient(); | ||||
http.Headers.Add("User-Agent", UserAgent); | http.Headers.Add("User-Agent", UserAgent); | ||||
http.Proxy = new WebProxy(config.LocalHost, config.localPort); | |||||
http.Proxy = new WebProxy(config.localHost, config.localPort); | |||||
return http; | return http; | ||||
} | } | ||||
@@ -36,8 +36,8 @@ namespace Shadowsocks.Model | |||||
public HotkeyConfig hotkey; | public HotkeyConfig hotkey; | ||||
private static string CONFIG_FILE = "gui-config.json"; | private static string CONFIG_FILE = "gui-config.json"; | ||||
public string LocalHost => GetLocalHost(); | |||||
[JsonIgnore] | |||||
public string localHost => GetLocalHost(); | |||||
private string GetLocalHost() { | private string GetLocalHost() { | ||||
return isIPv6Enabled ? "[::1]" : "127.0.0.1"; | return isIPv6Enabled ? "[::1]" : "127.0.0.1"; | ||||
} | } | ||||