From 90413ca3591beed62c4a9d8cd42515bea28e4448 Mon Sep 17 00:00:00 2001
From: Soul Dark <1012179378@qq.com>
Date: Thu, 16 Aug 2018 18:10:19 +0800
Subject: [PATCH] update to 5.1.3
---
shadowsocks-csharp/Controller/UpdateChecker.cs | 2 +-
shadowsocks-csharp/Model/Server.cs | 2 +-
.../Properties/Resources.Designer.cs | 18 ++++++++----------
shadowsocks-csharp/View/MenuViewController.cs | 11 +++++++++--
shadowsocks-csharp/app.config | 2 +-
.../shadowsocks-csharp4.0.csproj | 6 ++++--
shadowsocks-csharp/ssr-win-4.0.xml | 2 +-
test/test.csproj | 2 +-
8 files changed, 26 insertions(+), 19 deletions(-)
diff --git a/shadowsocks-csharp/Controller/UpdateChecker.cs b/shadowsocks-csharp/Controller/UpdateChecker.cs
index 718d60bd..c75422fe 100755
--- a/shadowsocks-csharp/Controller/UpdateChecker.cs
+++ b/shadowsocks-csharp/Controller/UpdateChecker.cs
@@ -18,7 +18,7 @@ public class UpdateChecker
public const string Name = "ShadowsocksR";
public const string Copyright = "Copyright © BreakWa11 2017. Fork from Shadowsocks by clowwindy";
- public const string Version = "5.1.1";
+ public const string Version = "5.1.3";
#if !_CONSOLE
public const string NetVer = "4.0";
#else
diff --git a/shadowsocks-csharp/Model/Server.cs b/shadowsocks-csharp/Model/Server.cs
index cd9ffd34..90ebba35 100755
--- a/shadowsocks-csharp/Model/Server.cs
+++ b/shadowsocks-csharp/Model/Server.cs
@@ -543,7 +543,7 @@ public void tcpingLatency()
try
{
- sock.EndConnect(result);
+ sock.Close();
}
catch (Exception)
{
diff --git a/shadowsocks-csharp/Properties/Resources.Designer.cs b/shadowsocks-csharp/Properties/Resources.Designer.cs
index 90b763a0..45fbe715 100755
--- a/shadowsocks-csharp/Properties/Resources.Designer.cs
+++ b/shadowsocks-csharp/Properties/Resources.Designer.cs
@@ -80,11 +80,10 @@ internal Resources() {
///Disable bypass=全局
///Servers=服务器
///Edit servers...=编辑服务器...
- ///Import servers from file...=从文件导入服务器...
- ///Servers Subscribe=服务器订阅
- ///Subscribe setting...=SSR服务器订阅设置...
- ///Update subscribe SSR node=更新SSR服务器订阅
- ///Update subscr [rest of string was truncated]";.
+ ///Import servers from file...=从文件导入...
+ ///Import from clipboard SSR links...=从剪贴板SSR链接导入...
+ ///Import from screen QRCode...=从屏幕二维码导入...
+ ///Servers Subscribe=服务器订 [rest of string was truncated]";.
///
internal static string cn {
get {
@@ -239,11 +238,10 @@ internal static string user_rule {
///Disable bypass=全局
///Servers=伺服器
///Edit servers...=編輯伺服器...
- ///Import servers from file...=從文件導入伺服器...
- ///Servers Subscribe=伺服器訂閱
- ///Subscribe setting...=SSR伺服器訂閱設置...
- ///Update subscribe SSR node=更新SSR伺服器訂閱
- ///Update su [rest of string was truncated]";.
+ ///Import servers from file...=從文件導入...
+ ///Import from clipboard SSR links...=从剪貼板SSR連結導入...
+ ///Import from screen QRCode...=从熒幕 QR 碼導入...
+ ///Servers Subscrib [rest of string was truncated]";.
///
internal static string zh_tw {
get {
diff --git a/shadowsocks-csharp/View/MenuViewController.cs b/shadowsocks-csharp/View/MenuViewController.cs
index 88f38d59..9d83609b 100755
--- a/shadowsocks-csharp/View/MenuViewController.cs
+++ b/shadowsocks-csharp/View/MenuViewController.cs
@@ -158,12 +158,19 @@ private void timerDelayCheckUpdate_Elapsed(object sender, System.Timers.ElapsedE
private void timerUpdateLatency_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
timerUpdateLatency.Interval = 1000.0 * 60;
+ timerUpdateLatency.Stop();
Configuration configuration = _controller.GetCurrentConfiguration();
- foreach (var server in configuration.configs)
+ for (int i = 0; i < configuration.configs.Count; i++)
{
+ var server = configuration.configs[i];
server.tcpingLatency();
+ if (i % 10 == 0)
+ {
+ UpdateServersMenu();
+ }
}
UpdateServersMenu();
+ timerUpdateLatency.Start();
}
void controller_Errored(object sender, System.IO.ErrorEventArgs e)
{
@@ -637,7 +644,7 @@ void updateFreeNodeChecker_NewFreeNodeFound(object sender, EventArgs e)
{
if (updateFreeNodeChecker.noitify)
ShowBalloonTip(I18N.GetString("Success"),
- String.Format(I18N.GetString("Update subscribe {0} success"), lastGroup), ToolTipIcon.Info, 10000);
+ string.Format(I18N.GetString("Update subscribe {0} success"), lastGroup), ToolTipIcon.Info, 10000);
}
else
{
diff --git a/shadowsocks-csharp/app.config b/shadowsocks-csharp/app.config
index edc0b9bd..c4239d21 100755
--- a/shadowsocks-csharp/app.config
+++ b/shadowsocks-csharp/app.config
@@ -1,5 +1,5 @@
-
+
diff --git a/shadowsocks-csharp/shadowsocks-csharp4.0.csproj b/shadowsocks-csharp/shadowsocks-csharp4.0.csproj
index 3bcdcd24..3b0e067a 100644
--- a/shadowsocks-csharp/shadowsocks-csharp4.0.csproj
+++ b/shadowsocks-csharp/shadowsocks-csharp4.0.csproj
@@ -10,7 +10,7 @@
Properties
Shadowsocks
ShadowsocksR
- v4.7.1
+ v4.6.1
512
Shadowsocks.Program
shadowsocks.ico
@@ -292,7 +292,9 @@
-
+
+ Designer
+
diff --git a/shadowsocks-csharp/ssr-win-4.0.xml b/shadowsocks-csharp/ssr-win-4.0.xml
index 54ca6159..f4146fd3 100644
--- a/shadowsocks-csharp/ssr-win-4.0.xml
+++ b/shadowsocks-csharp/ssr-win-4.0.xml
@@ -2,7 +2,7 @@
-
-
+
diff --git a/test/test.csproj b/test/test.csproj
index 44cf0154..adb5bcbc 100755
--- a/test/test.csproj
+++ b/test/test.csproj
@@ -8,7 +8,7 @@
Properties
test
test
- v4.7.1
+ v4.6.1
512
{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
10.0