use local port in update checker

This commit is contained in:
clowwindy
2015-01-18 17:15:06 +08:00
parent 5aa2822904
commit 3e56b3d3a4
2 changed files with 5 additions and 4 deletions
@@ -1,4 +1,5 @@
using System;
using Shadowsocks.Model;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Net;
@@ -19,11 +20,11 @@ namespace Shadowsocks.Controller
public const string Version = "2.3";
public void CheckUpdate()
public void CheckUpdate(Configuration config)
{
// TODO test failures
WebClient http = new WebClient();
http.Proxy = new WebProxy(IPAddress.Loopback.ToString(), 8123);
http.Proxy = new WebProxy(IPAddress.Loopback.ToString(), config.localPort);
http.DownloadStringCompleted += http_DownloadStringCompleted;
http.DownloadStringAsync(new Uri(UpdateURL));
}
@@ -63,7 +63,7 @@ namespace Shadowsocks.View
LoadCurrentConfiguration();
updateChecker.CheckUpdate();
updateChecker.CheckUpdate(controller.GetConfiguration());
if (controller.GetConfiguration().isDefault)
{