Browse Source

Format the proxy host name used in GfwListUpdater.

Directly create a WebProxy with IPAddress.IPv6Loopback.ToString() throws UriFormatException. Format the proxy host name to satisfy WebProxy.
tags/4.2.1.0
Kexy Biscuit GitHub 5 years ago
parent
commit
a6a8b091cb
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      shadowsocks-csharp/Controller/Service/GfwListUpdater.cs

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

@@ -94,7 +94,9 @@ namespace Shadowsocks.Controller
if (config.enabled)
{
http.Proxy = new WebProxy(
config.isIPv6Enabled ? IPAddress.IPv6Loopback.ToString() : IPAddress.Loopback.ToString(),
config.isIPv6Enabled
? $"http://[{IPAddress.IPv6Loopback.ToString()}]"
: $"http://{IPAddress.Loopback.ToString()}",
config.localPort);
}
http.DownloadStringCompleted += http_DownloadStringCompleted;


Loading…
Cancel
Save