diff --git a/shadowsocks-csharp/Data/libsscrypto64.dll.gz b/shadowsocks-csharp/Data/libsscrypto64.dll.gz
new file mode 100644
index 0000000..1b1aa26
Binary files /dev/null and b/shadowsocks-csharp/Data/libsscrypto64.dll.gz differ
diff --git a/shadowsocks-csharp/Encryption/MbedTLS.cs b/shadowsocks-csharp/Encryption/MbedTLS.cs
index 01f8fd3..c52d2d4 100644
--- a/shadowsocks-csharp/Encryption/MbedTLS.cs
+++ b/shadowsocks-csharp/Encryption/MbedTLS.cs
@@ -20,7 +20,11 @@ namespace Shadowsocks.Encryption
string dllPath = Utils.GetTempPath("libsscrypto.dll");
try
{
+#if _X64
+ FileManager.UncompressFile(dllPath, Resources.libsscrypto64_dll);
+#else
FileManager.UncompressFile(dllPath, Resources.libsscrypto_dll);
+#endif
}
catch (IOException)
{
diff --git a/shadowsocks-csharp/Encryption/Sodium.cs b/shadowsocks-csharp/Encryption/Sodium.cs
index 22a7b7a..00216eb 100755
--- a/shadowsocks-csharp/Encryption/Sodium.cs
+++ b/shadowsocks-csharp/Encryption/Sodium.cs
@@ -17,7 +17,11 @@ namespace Shadowsocks.Encryption
string dllPath = Utils.GetTempPath("libsscrypto.dll");
try
{
+#if _X64
+ FileManager.UncompressFile(dllPath, Resources.libsscrypto64_dll);
+#else
FileManager.UncompressFile(dllPath, Resources.libsscrypto_dll);
+#endif
}
catch (IOException)
{
diff --git a/shadowsocks-csharp/Properties/Resources.Designer.cs b/shadowsocks-csharp/Properties/Resources.Designer.cs
index 79c0991..277840e 100644
--- a/shadowsocks-csharp/Properties/Resources.Designer.cs
+++ b/shadowsocks-csharp/Properties/Resources.Designer.cs
@@ -111,6 +111,16 @@ namespace Shadowsocks.Properties {
}
}
+ ///
+ /// 查找 System.Byte[] 类型的本地化资源。
+ ///
+ internal static byte[] libsscrypto64_dll {
+ get {
+ object obj = ResourceManager.GetObject("libsscrypto64_dll", resourceCulture);
+ return ((byte[])(obj));
+ }
+ }
+
///
/// 查找 System.Byte[] 类型的本地化资源。
///
@@ -227,29 +237,29 @@ namespace Shadowsocks.Properties {
}
///
- /// 查找类似 # translation for Traditional Chinese
- ///
- ///Shadowsocks=Shadowsocks
- ///
- ///# Menu items
- ///
- ///Enable System Proxy=啟用系統代理
- ///Mode=系統代理模式
- ///PAC=PAC 模式
- ///Global=全局模式
- ///Servers=伺服器
- ///Edit Servers...=編輯伺服器...
- ///Statistics Config...=統計配置...
- ///Start on Boot=開機啟動
- ///Forward Proxy...=正向代理設置...
- ///Allow Clients from LAN=允許來自區域網路的連接
- ///Local PAC=使用本地 PAC
- ///Online PAC=使用在線 PAC
- ///Edit Local PAC File...=編輯本地 PAC 文件...
- ///Update Local PAC from GFWList=從 GFWList 更新本地 PAC
- ///Edit User Rule for GFWList...=編輯 GFWList 的用戶規則...
- ///Show QRCode...=顯示 QR 碼...
- ///Scan QRCode from Screen [字符串的其余部分被截断]"; 的本地化字符串。
+ /// 查找类似 # translation for Traditional Chinese
+ ///
+ ///Shadowsocks=Shadowsocks
+ ///
+ ///# Menu items
+ ///
+ ///Enable System Proxy=啟用系統代理
+ ///Mode=系統代理模式
+ ///PAC=PAC 模式
+ ///Global=全局模式
+ ///Servers=伺服器
+ ///Edit Servers...=編輯伺服器...
+ ///Statistics Config...=統計配置...
+ ///Start on Boot=開機啟動
+ ///Forward Proxy...=正向代理設置...
+ ///Allow Clients from LAN=允許來自區域網路的連接
+ ///Local PAC=使用本地 PAC
+ ///Online PAC=使用在線 PAC
+ ///Edit Local PAC File...=編輯本地 PAC 文件...
+ ///Update Local PAC from GFWList=從 GFWList 更新本地 PAC
+ ///Edit User Rule for GFWList...=編輯 GFWList 的用戶規則...
+ ///Show QRCode...=顯示 QR 碼...
+ ///S [字符串的其余部分被截断]"; 的本地化字符串。
///
internal static string zh_tw {
get {
diff --git a/shadowsocks-csharp/Properties/Resources.resx b/shadowsocks-csharp/Properties/Resources.resx
index 5e4ca24..e334c94 100755
--- a/shadowsocks-csharp/Properties/Resources.resx
+++ b/shadowsocks-csharp/Properties/Resources.resx
@@ -124,8 +124,11 @@
..\data\cn.txt;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8
+
+ ..\Data\libsscrypto64.dll.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
- ..\data\libsscrypto.dll.gz;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+ ..\Data\libsscrypto.dll.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
..\data\mgwz.dll.gz;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
diff --git a/shadowsocks-csharp/Util/SystemProxy/WinINet.cs b/shadowsocks-csharp/Util/SystemProxy/WinINet.cs
index 184f47e..a43889c 100644
--- a/shadowsocks-csharp/Util/SystemProxy/WinINet.cs
+++ b/shadowsocks-csharp/Util/SystemProxy/WinINet.cs
@@ -93,7 +93,7 @@ namespace Shadowsocks.Util.SystemProxy
foreach (INTERNET_PER_CONN_OPTION eachOption in _optionlist)
{
Marshal.StructureToPtr(eachOption, current, false);
- current = (IntPtr)((int)current + Marshal.SizeOf(eachOption));
+ current = (IntPtr)(current.ToInt64() + Marshal.SizeOf(eachOption));
}
// Initialize a INTERNET_PER_CONN_OPTION_LIST instance.
diff --git a/shadowsocks-csharp/shadowsocks-csharp.csproj b/shadowsocks-csharp/shadowsocks-csharp.csproj
index 522a65c..050f83e 100644
--- a/shadowsocks-csharp/shadowsocks-csharp.csproj
+++ b/shadowsocks-csharp/shadowsocks-csharp.csproj
@@ -23,6 +23,8 @@
3.5
+
+
publish\
true
Disk
@@ -37,8 +39,6 @@
1.0.0.%2a
false
true
-
-
true
@@ -65,6 +65,25 @@
app.manifest
+
+ true
+ bin\x64\Debug\
+ TRACE;DEBUG;_X64
+ full
+ x64
+ prompt
+ ManagedMinimumRules.ruleset
+
+
+ true
+ bin\x64\Release\
+ TRACE;_X64
+ true
+ pdbonly
+ x64
+ prompt
+ ManagedMinimumRules.ruleset
+
3rd\GlobalHotKey.1.1.0\lib\GlobalHotKey.dll
@@ -286,6 +305,7 @@
+
diff --git a/shadowsocks-windows.sln b/shadowsocks-windows.sln
index bb7f297..fbd94f7 100644
--- a/shadowsocks-windows.sln
+++ b/shadowsocks-windows.sln
@@ -1,7 +1,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
-VisualStudioVersion = 14.0.24720.0
+VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "shadowsocks-csharp", "shadowsocks-csharp\shadowsocks-csharp.csproj", "{8C02D2F7-7CDB-4D55-9F25-CD03EF4AA062}"
EndProject
@@ -12,17 +12,27 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "test", "test\test.csproj",
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
+ Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {8C02D2F7-7CDB-4D55-9F25-CD03EF4AA062}.Debug|x64.ActiveCfg = Debug|x64
+ {8C02D2F7-7CDB-4D55-9F25-CD03EF4AA062}.Debug|x64.Build.0 = Debug|x64
{8C02D2F7-7CDB-4D55-9F25-CD03EF4AA062}.Debug|x86.ActiveCfg = Debug|x86
{8C02D2F7-7CDB-4D55-9F25-CD03EF4AA062}.Debug|x86.Build.0 = Debug|x86
{8C02D2F7-7CDB-4D55-9F25-CD03EF4AA062}.Debug|x86.Deploy.0 = Debug|x86
+ {8C02D2F7-7CDB-4D55-9F25-CD03EF4AA062}.Release|x64.ActiveCfg = Release|x64
+ {8C02D2F7-7CDB-4D55-9F25-CD03EF4AA062}.Release|x64.Build.0 = Release|x64
{8C02D2F7-7CDB-4D55-9F25-CD03EF4AA062}.Release|x86.ActiveCfg = Release|x86
{8C02D2F7-7CDB-4D55-9F25-CD03EF4AA062}.Release|x86.Build.0 = Release|x86
+ {45913187-0685-4903-B250-DCEF0479CD86}.Debug|x64.ActiveCfg = Debug|x64
+ {45913187-0685-4903-B250-DCEF0479CD86}.Debug|x64.Build.0 = Debug|x64
{45913187-0685-4903-B250-DCEF0479CD86}.Debug|x86.ActiveCfg = Debug|x86
{45913187-0685-4903-B250-DCEF0479CD86}.Debug|x86.Build.0 = Debug|x86
+ {45913187-0685-4903-B250-DCEF0479CD86}.Release|x64.ActiveCfg = Release|x64
+ {45913187-0685-4903-B250-DCEF0479CD86}.Release|x64.Build.0 = Release|x64
{45913187-0685-4903-B250-DCEF0479CD86}.Release|x86.ActiveCfg = Release|x86
{45913187-0685-4903-B250-DCEF0479CD86}.Release|x86.Build.0 = Release|x86
EndGlobalSection
diff --git a/test/test.csproj b/test/test.csproj
index 8ea4949..a7aa38f 100755
--- a/test/test.csproj
+++ b/test/test.csproj
@@ -34,6 +34,20 @@
+
+ true
+ bin\x64\Debug\
+ TRACE;DEBUG
+ x64
+ MinimumRecommendedRules.ruleset
+
+
+ bin\x64\Release\
+ TRACE
+ true
+ x64
+ MinimumRecommendedRules.ruleset
+
..\shadowsocks-csharp\3rd\GlobalHotKey.1.1.0\lib\GlobalHotKey.dll