Browse Source

Modify PAC request behavior

Update the PAC file using the proxy channel only when proxy mode is enabled.
tags/4.2.1.0
Stzx 5 years ago
parent
commit
17c499c525
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