From 232ff1f0241ab93af2fc80155de60ab8a9846948 Mon Sep 17 00:00:00 2001
From: Soul Dark <1012179378@qq.com>
Date: Thu, 19 Jul 2018 16:19:33 +0800
Subject: [PATCH] update to 5.0.0
---
.../Controller/ShadowsocksController.cs | 7 ++
shadowsocks-csharp/Model/Configuration.cs | 2 +-
.../Properties/Resources.Designer.cs | 92 +++++++++----------
.../shadowsocks-csharp-console.csproj | 6 +-
shadowsocks-csharp/shadowsocks-csharp.csproj | 6 +-
5 files changed, 62 insertions(+), 51 deletions(-)
diff --git a/shadowsocks-csharp/Controller/ShadowsocksController.cs b/shadowsocks-csharp/Controller/ShadowsocksController.cs
index f7094207..5be1b6da 100755
--- a/shadowsocks-csharp/Controller/ShadowsocksController.cs
+++ b/shadowsocks-csharp/Controller/ShadowsocksController.cs
@@ -510,6 +510,13 @@ protected void Reload()
UpdateSystemProxy();
Util.Utils.ReleaseMemory();
+
+ Configuration config = GetCurrentConfiguration();
+ for (int id = 0; id < config.configs.Count; ++id)
+ {
+ Server server = config.configs[id];
+ server.GetConnections().CloseAll();
+ }
}
diff --git a/shadowsocks-csharp/Model/Configuration.cs b/shadowsocks-csharp/Model/Configuration.cs
index 46b167b8..843f0f02 100755
--- a/shadowsocks-csharp/Model/Configuration.cs
+++ b/shadowsocks-csharp/Model/Configuration.cs
@@ -393,7 +393,7 @@ public Configuration()
localDnsServer = "";
balanceAlgorithm = "LowException";
- random = true;
+ random = false;
sysProxyMode = (int)ProxyMode.Global;
proxyRuleMode = (int)ProxyRuleMode.BypassLanAndChina;
diff --git a/shadowsocks-csharp/Properties/Resources.Designer.cs b/shadowsocks-csharp/Properties/Resources.Designer.cs
index 67f2c81c..90b763a0 100755
--- a/shadowsocks-csharp/Properties/Resources.Designer.cs
+++ b/shadowsocks-csharp/Properties/Resources.Designer.cs
@@ -1,10 +1,10 @@
//------------------------------------------------------------------------------
//
-// 此代码由工具生成。
-// 运行时版本:4.0.30319.42000
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
//
-// 对此文件的更改可能会导致不正确的行为,并且如果
-// 重新生成代码,这些更改将会丢失。
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
//
//------------------------------------------------------------------------------
@@ -13,13 +13,13 @@ namespace Shadowsocks.Properties {
///
- /// 一个强类型的资源类,用于查找本地化的字符串等。
+ /// A strongly-typed resource class, for looking up localized strings, etc.
///
- // 此类是由 StronglyTypedResourceBuilder
- // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
- // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
- // (以 /str 作为命令选项),或重新生成 VS 项目。
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
@@ -33,7 +33,7 @@ internal Resources() {
}
///
- /// 返回此类使用的缓存的 ResourceManager 实例。
+ /// Returns the cached ResourceManager instance used by this class.
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
@@ -47,8 +47,8 @@ internal Resources() {
}
///
- /// 使用此强类型资源类,为所有资源查找
- /// 重写当前线程的 CurrentUICulture 属性。
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
///
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
@@ -61,30 +61,30 @@ internal Resources() {
}
///
- /// 查找类似 # translation for Simplified Chinese
+ /// Looks up a localized string similar to # translation for Simplified Chinese
///
///Shadowsocks=Shadowsocks
///
///# Menu items
///
- ///Disable system proxy=不修改系统(IE)代理
///Mode=系统代理模式
+ ///No modify system proxy=保持当前状态不修改
+ ///Disable system proxy=直连模式
///PAC=PAC 模式
///Global=全局模式
///Proxy rule=代理规则
///Bypass LAN=绕过局域网
///Bypass LAN && China=绕过局域网和大陆
///Bypass LAN && not China=绕过局域网和非大陆
+ ///User custom=用户自定义
///Disable bypass=全局
///Servers=服务器
///Edit servers...=编辑服务器...
///Import servers from file...=从文件导入服务器...
- ///Global settings...=选项设置...
- ///Start on Boot=开机启动
- ///Allow Clients from LAN=允许来自局域网的连接
- ///Load balance=服务器负载均衡
- ///Same host for same address=优先相同节点连接同一地址
- ///Enable domai [字符串的其余部分被截断]"; 的本地化字符串。
+ ///Servers Subscribe=服务器订阅
+ ///Subscribe setting...=SSR服务器订阅设置...
+ ///Update subscribe SSR node=更新SSR服务器订阅
+ ///Update subscr [rest of string was truncated]";.
///
internal static string cn {
get {
@@ -93,7 +93,7 @@ internal static string cn {
}
///
- /// 查找 System.Byte[] 类型的本地化资源。
+ /// Looks up a localized resource of type System.Byte[].
///
internal static byte[] libsscrypto_dll {
get {
@@ -103,7 +103,7 @@ internal static byte[] libsscrypto_dll {
}
///
- /// 查找 System.Byte[] 类型的本地化资源。
+ /// Looks up a localized resource of type System.Byte[].
///
internal static byte[] libsscrypto64_dll {
get {
@@ -113,7 +113,7 @@ internal static byte[] libsscrypto64_dll {
}
///
- /// 查找 System.Byte[] 类型的本地化资源。
+ /// Looks up a localized resource of type System.Byte[].
///
internal static byte[] mgwz_dll {
get {
@@ -123,7 +123,7 @@ internal static byte[] mgwz_dll {
}
///
- /// 查找 System.Drawing.Bitmap 类型的本地化资源。
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ngnl {
get {
@@ -133,14 +133,14 @@ internal static System.Drawing.Bitmap ngnl {
}
///
- /// 查找类似 listen-address __PRIVOXY_BIND_IP__:__PRIVOXY_BIND_PORT__
+ /// Looks up a localized string similar to listen-address __PRIVOXY_BIND_IP__:__PRIVOXY_BIND_PORT__
///show-on-task-bar 0
///activity-animation 0
///forward-socks5 / 127.0.0.1:__SOCKS_PORT__ .
///hide-console
///__BYPASS_ACTION__
///
- /// 的本地化字符串。
+ ///.
///
internal static string privoxy_conf {
get {
@@ -149,7 +149,7 @@ internal static string privoxy_conf {
}
///
- /// 查找 System.Byte[] 类型的本地化资源。
+ /// Looks up a localized resource of type System.Byte[].
///
internal static byte[] privoxy_exe {
get {
@@ -159,7 +159,7 @@ internal static byte[] privoxy_exe {
}
///
- /// 查找 System.Byte[] 类型的本地化资源。
+ /// Looks up a localized resource of type System.Byte[].
///
internal static byte[] proxy_pac_txt {
get {
@@ -169,7 +169,7 @@ internal static byte[] proxy_pac_txt {
}
///
- /// 查找 System.Drawing.Bitmap 类型的本地化资源。
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ss16 {
get {
@@ -179,7 +179,7 @@ internal static System.Drawing.Bitmap ss16 {
}
///
- /// 查找 System.Drawing.Bitmap 类型的本地化资源。
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ss20 {
get {
@@ -189,7 +189,7 @@ internal static System.Drawing.Bitmap ss20 {
}
///
- /// 查找 System.Drawing.Bitmap 类型的本地化资源。
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ss24 {
get {
@@ -199,7 +199,7 @@ internal static System.Drawing.Bitmap ss24 {
}
///
- /// 查找 System.Drawing.Bitmap 类型的本地化资源。
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
///
internal static System.Drawing.Bitmap ssw128 {
get {
@@ -209,9 +209,9 @@ internal static System.Drawing.Bitmap ssw128 {
}
///
- /// 查找类似 ! Put user rules line by line in this file.
+ /// Looks up a localized string similar to ! Put user rules line by line in this file.
///! See https://adblockplus.org/en/filter-cheatsheet
- /// 的本地化字符串。
+ ///.
///
internal static string user_rule {
get {
@@ -220,30 +220,30 @@ internal static string user_rule {
}
///
- /// 查找类似 # translation for Traditional Chinese
+ /// Looks up a localized string similar to # translation for Traditional Chinese
///
///Shadowsocks=Shadowsocks
///
///# Menu items
///
- ///Disable system proxy=不修改系統(IE)代理
///Mode=系統代理模式
+ ///No modify system proxy=保持當前狀態不修改
+ ///Disable system proxy=直連模式
///PAC=PAC 模式
///Global=全局模式
///Proxy rule=代理規則
- ///Bypass LAN=绕过區域網路
- ///Bypass LAN && China=绕过區域網路和大陸
- ///Bypass LAN && not China=绕过區域網路和非大陸
+ ///Bypass LAN=繞過區域網路
+ ///Bypass LAN && China=繞過區域網路和大陸
+ ///Bypass LAN && not China=繞過區域網路和非大陸
+ ///User custom=用戶自定義
///Disable bypass=全局
///Servers=伺服器
///Edit servers...=編輯伺服器...
///Import servers from file...=從文件導入伺服器...
- ///Global settings...=選項設置...
- ///Start on Boot=開機啟動
- ///Allow Clients from LAN=允許來自區域網路的連接
- ///Load balance=伺服器負載均衡
- ///Same host for same address=優先相同節點連接同一位址
- ///Enable [字符串的其余部分被截断]"; 的本地化字符串。
+ ///Servers Subscribe=伺服器訂閱
+ ///Subscribe setting...=SSR伺服器訂閱設置...
+ ///Update subscribe SSR node=更新SSR伺服器訂閱
+ ///Update su [rest of string was truncated]";.
///
internal static string zh_tw {
get {
diff --git a/shadowsocks-csharp/shadowsocks-csharp-console.csproj b/shadowsocks-csharp/shadowsocks-csharp-console.csproj
index b5468b1e..dc967bce 100644
--- a/shadowsocks-csharp/shadowsocks-csharp-console.csproj
+++ b/shadowsocks-csharp/shadowsocks-csharp-console.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
Shadowsocks
ShadowsocksR
- v2.0
+ v4.0
512
@@ -49,6 +49,7 @@
AnyCPU
prompt
ManagedMinimumRules.ruleset
+ false
true
@@ -59,6 +60,7 @@
AnyCPU
prompt
ManagedMinimumRules.ruleset
+ false
diff --git a/shadowsocks-csharp/shadowsocks-csharp.csproj b/shadowsocks-csharp/shadowsocks-csharp.csproj
index f22b30c6..a11e80a4 100755
--- a/shadowsocks-csharp/shadowsocks-csharp.csproj
+++ b/shadowsocks-csharp/shadowsocks-csharp.csproj
@@ -1,5 +1,5 @@
-
+
Debug
AnyCPU
@@ -10,7 +10,7 @@
Properties
Shadowsocks
ShadowsocksR
- v2.0
+ v4.0
512
Shadowsocks.Program
shadowsocks.ico
@@ -50,6 +50,7 @@
prompt
ManagedMinimumRules.ruleset
false
+ false
true
@@ -60,6 +61,7 @@
AnyCPU
prompt
ManagedMinimumRules.ruleset
+ false