Browse Source

use local port in update checker

tags/2.3
clowwindy 10 years ago
parent
commit
3e56b3d3a4
2 changed files with 5 additions and 4 deletions
  1. +4
    -3
      shadowsocks-csharp/Controller/UpdateChecker.cs
  2. +1
    -1
      shadowsocks-csharp/View/MenuViewController.cs

+ 4
- 3
shadowsocks-csharp/Controller/UpdateChecker.cs View File

@@ -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));
}


+ 1
- 1
shadowsocks-csharp/View/MenuViewController.cs View File

@@ -63,7 +63,7 @@ namespace Shadowsocks.View
LoadCurrentConfiguration();
updateChecker.CheckUpdate();
updateChecker.CheckUpdate(controller.GetConfiguration());
if (controller.GetConfiguration().isDefault)
{


Loading…
Cancel
Save