From ed2722a993bddf6f72d9ada1e0c0415045ccb5d9 Mon Sep 17 00:00:00 2001 From: clowwindy Date: Wed, 12 Nov 2014 02:24:50 +0800 Subject: [PATCH] back to polarssl --- shadowsocks-csharp/Controller/Local.cs | 26 +++++++++---------- shadowsocks-csharp/Program.cs | 6 ++--- .../Properties/Resources.Designer.cs | 10 ------- shadowsocks-csharp/Properties/Resources.resx | 3 --- 4 files changed, 16 insertions(+), 29 deletions(-) diff --git a/shadowsocks-csharp/Controller/Local.cs b/shadowsocks-csharp/Controller/Local.cs index 8bdbd15f..73c78021 100755 --- a/shadowsocks-csharp/Controller/Local.cs +++ b/shadowsocks-csharp/Controller/Local.cs @@ -141,7 +141,7 @@ namespace Shadowsocks.Controller } catch (Exception e) { - Console.WriteLine(e.Message); + Console.WriteLine(e); this.Close(); } } @@ -173,7 +173,7 @@ namespace Shadowsocks.Controller } catch (Exception e) { - Console.WriteLine(e.Message); + Console.WriteLine(e); } } if (remote != null) @@ -185,7 +185,7 @@ namespace Shadowsocks.Controller } catch (SocketException e) { - Console.WriteLine(e.Message); + Console.WriteLine(e); } } ((IDisposable)encryptor).Dispose(); @@ -205,7 +205,7 @@ namespace Shadowsocks.Controller } catch (Exception e) { - Console.WriteLine(e.Message); + Console.WriteLine(e); this.Close(); } } @@ -219,7 +219,7 @@ namespace Shadowsocks.Controller } catch (Exception e) { - Console.WriteLine(e.Message); + Console.WriteLine(e); this.Close(); } } @@ -248,7 +248,7 @@ namespace Shadowsocks.Controller } catch (Exception e) { - Console.WriteLine(e.Message); + Console.WriteLine(e); this.Close(); } } @@ -271,7 +271,7 @@ namespace Shadowsocks.Controller } catch (Exception e) { - Console.WriteLine(e.Message); + Console.WriteLine(e); this.Close(); } } @@ -295,7 +295,7 @@ namespace Shadowsocks.Controller } catch (Exception e) { - Console.WriteLine(e.Message); + Console.WriteLine(e); this.Close(); } } @@ -313,7 +313,7 @@ namespace Shadowsocks.Controller } catch (Exception e) { - Console.WriteLine(e.Message); + Console.WriteLine(e); this.Close(); } } @@ -341,7 +341,7 @@ namespace Shadowsocks.Controller } catch (Exception e) { - Console.WriteLine(e.Message); + Console.WriteLine(e); this.Close(); } } @@ -368,7 +368,7 @@ namespace Shadowsocks.Controller } catch (Exception e) { - Console.WriteLine(e.Message); + Console.WriteLine(e); this.Close(); } } @@ -383,7 +383,7 @@ namespace Shadowsocks.Controller } catch (Exception e) { - Console.WriteLine(e.Message); + Console.WriteLine(e); this.Close(); } } @@ -398,7 +398,7 @@ namespace Shadowsocks.Controller } catch (Exception e) { - Console.WriteLine(e.Message); + Console.WriteLine(e); this.Close(); } } diff --git a/shadowsocks-csharp/Program.cs b/shadowsocks-csharp/Program.cs index df44a09e..2115c77a 100755 --- a/shadowsocks-csharp/Program.cs +++ b/shadowsocks-csharp/Program.cs @@ -36,16 +36,16 @@ namespace Shadowsocks return; } string tempPath = Path.GetTempPath(); - string dllPath = tempPath + "/libeay32.dll"; + string dllPath = tempPath + "/polarssl.dll"; try { - FileManager.UncompressFile(dllPath, Resources.libeay32_dll); + FileManager.UncompressFile(dllPath, Resources.polarssl_dll); } catch (IOException e) { Console.WriteLine(e.ToString()); } - //LoadLibrary(dllPath); + LoadLibrary(dllPath); #if !DEBUG Logging.OpenLogFile(); diff --git a/shadowsocks-csharp/Properties/Resources.Designer.cs b/shadowsocks-csharp/Properties/Resources.Designer.cs index 65b2d0a2..4f9edeba 100755 --- a/shadowsocks-csharp/Properties/Resources.Designer.cs +++ b/shadowsocks-csharp/Properties/Resources.Designer.cs @@ -60,16 +60,6 @@ namespace Shadowsocks.Properties { } } - /// - /// Looks up a localized resource of type System.Byte[]. - /// - internal static byte[] libeay32_dll { - get { - object obj = ResourceManager.GetObject("libeay32_dll", resourceCulture); - return ((byte[])(obj)); - } - } - /// /// Looks up a localized resource of type System.Byte[]. /// diff --git a/shadowsocks-csharp/Properties/Resources.resx b/shadowsocks-csharp/Properties/Resources.resx index f196cbea..a644b5f9 100755 --- a/shadowsocks-csharp/Properties/Resources.resx +++ b/shadowsocks-csharp/Properties/Resources.resx @@ -118,9 +118,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ..\Data\libeay32.dll.gz;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - ..\Data\polarssl.dll.gz;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089