Browse Source

Merge pull request #2526 from Stzx/master

Modify PAC request behavior
tags/4.2.1.0
Allen Zhu GitHub 5 years ago
parent
commit
5af4f83ca4
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      shadowsocks-csharp/Controller/Service/GfwListUpdater.cs

+ 5
- 2
shadowsocks-csharp/Controller/Service/GfwListUpdater.cs View File

@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
@@ -91,7 +91,10 @@ namespace Shadowsocks.Controller
{
Logging.Info($"Checking GFWList from {GFWLIST_URL}");
WebClient http = new WebClient();
http.Proxy = new WebProxy(IPAddress.Loopback.ToString(), config.localPort);
if (config.enabled)
{
http.Proxy = new WebProxy(IPAddress.Loopback.ToString(), config.localPort);
}
http.DownloadStringCompleted += http_DownloadStringCompleted;
http.DownloadStringAsync(new Uri(GFWLIST_URL));
}


Loading…
Cancel
Save