diff --git a/shadowsocks-csharp/Controller/I18N.cs b/shadowsocks-csharp/Controller/I18N.cs
index e1e46430..75501f04 100755
--- a/shadowsocks-csharp/Controller/I18N.cs
+++ b/shadowsocks-csharp/Controller/I18N.cs
@@ -76,7 +76,7 @@ namespace Shadowsocks.Controller
static I18N()
{
string locale = CultureInfo.CurrentCulture.Name;
- string i18n = File.ReadAllText(Utils.GetDataPath(I18N_FILE), Encoding.UTF8);
+ string i18n = File.ReadAllText(I18N_FILE, Encoding.UTF8);
Logging.Info("Current language is: " + locale);
Init(i18n, locale);
}
diff --git a/shadowsocks-csharp/Controller/Service/PrivoxyRunner.cs b/shadowsocks-csharp/Controller/Service/PrivoxyRunner.cs
index c050b56d..c0b4d6a7 100644
--- a/shadowsocks-csharp/Controller/Service/PrivoxyRunner.cs
+++ b/shadowsocks-csharp/Controller/Service/PrivoxyRunner.cs
@@ -7,7 +7,6 @@ using System.Net.Sockets;
using System.Text;
using System.Windows.Forms;
using Shadowsocks.Model;
-using Shadowsocks.Properties;
using Shadowsocks.Util;
using Shadowsocks.Util.ProcessManagement;
diff --git a/shadowsocks-csharp/Encryption/MbedTLS.cs b/shadowsocks-csharp/Encryption/MbedTLS.cs
index 3aa077aa..acb01f6d 100644
--- a/shadowsocks-csharp/Encryption/MbedTLS.cs
+++ b/shadowsocks-csharp/Encryption/MbedTLS.cs
@@ -16,7 +16,7 @@ namespace Shadowsocks.Encryption
static MbedTLS()
{
- LoadLibrary(Utils.GetDataPath(DLLNAME));
+ LoadLibrary(DLLNAME);
}
public static byte[] MD5(byte[] input)
diff --git a/shadowsocks-csharp/Encryption/OpenSSL.cs b/shadowsocks-csharp/Encryption/OpenSSL.cs
index 3d1870c8..a5b9ce99 100644
--- a/shadowsocks-csharp/Encryption/OpenSSL.cs
+++ b/shadowsocks-csharp/Encryption/OpenSSL.cs
@@ -24,7 +24,7 @@ namespace Shadowsocks.Encryption
static OpenSSL()
{
- LoadLibrary(Utils.GetDataPath(DLLNAME));
+ LoadLibrary(DLLNAME);
}
public static IntPtr GetCipherInfo(string cipherName)
diff --git a/shadowsocks-csharp/Encryption/Sodium.cs b/shadowsocks-csharp/Encryption/Sodium.cs
index 50bc5c68..51810ae5 100755
--- a/shadowsocks-csharp/Encryption/Sodium.cs
+++ b/shadowsocks-csharp/Encryption/Sodium.cs
@@ -18,7 +18,7 @@ namespace Shadowsocks.Encryption
static Sodium()
{
- LoadLibrary(Utils.GetDataPath(DLLNAME));
+ LoadLibrary(DLLNAME);
lock (_initLock)
{
diff --git a/shadowsocks-csharp/Util/SystemProxy/Sysproxy.cs b/shadowsocks-csharp/Util/SystemProxy/Sysproxy.cs
index b928e07c..32e9241f 100644
--- a/shadowsocks-csharp/Util/SystemProxy/Sysproxy.cs
+++ b/shadowsocks-csharp/Util/SystemProxy/Sysproxy.cs
@@ -150,9 +150,9 @@ namespace Shadowsocks.Util.SystemProxy
using (var process = new Process())
{
// Configure the process using the StartInfo properties.
- process.StartInfo.FileName = Utils.GetDataPath(SysproxyName);
+ process.StartInfo.FileName = SysproxyName;
process.StartInfo.Arguments = arguments;
- process.StartInfo.WorkingDirectory = Utils.GetDataPath();
+ process.StartInfo.WorkingDirectory = Directory.GetCurrentDirectory();
process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
process.StartInfo.UseShellExecute = false;
process.StartInfo.RedirectStandardError = true;
diff --git a/shadowsocks-csharp/Util/Util.cs b/shadowsocks-csharp/Util/Util.cs
index 9c79b042..3d8efe92 100755
--- a/shadowsocks-csharp/Util/Util.cs
+++ b/shadowsocks-csharp/Util/Util.cs
@@ -139,25 +139,6 @@ namespace Shadowsocks.Util
}
}
- public static string UnGzip(byte[] buf)
- {
- byte[] buffer = new byte[1024];
- int n;
- using (MemoryStream sb = new MemoryStream())
- {
- using (GZipStream input = new GZipStream(new MemoryStream(buf),
- CompressionMode.Decompress,
- false))
- {
- while ((n = input.Read(buffer, 0, buffer.Length)) > 0)
- {
- sb.Write(buffer, 0, n);
- }
- }
- return System.Text.Encoding.UTF8.GetString(sb.ToArray());
- }
- }
-
public static string FormatBandwidth(long n)
{
var result = GetBandwidthScale(n);
diff --git a/shadowsocks-csharp/shadowsocks-csharp.csproj b/shadowsocks-csharp/shadowsocks-csharp.csproj
index 1a93702b..36f0a9fb 100644
--- a/shadowsocks-csharp/shadowsocks-csharp.csproj
+++ b/shadowsocks-csharp/shadowsocks-csharp.csproj
@@ -255,9 +255,6 @@
Designer
-
- PreserveNewest
-
@@ -273,24 +270,32 @@
PreserveNewest
-
+
PreserveNewest
-
+ libsscrypto.dll
+
PreserveNewest
PreserveNewest
-
+
PreserveNewest
-
-
+ sysproxy.exe
+
+
PreserveNewest
-
-
+ sysproxy64.exe
+
+
PreserveNewest
-
+ user-rule.txt
+
+
+ i18n.csv
+ PreserveNewest
+
Designer