diff --git a/CHANGES b/CHANGES index 0a52a4a2..781044c9 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +2.0.7 2014-11-11 +- Use OpenSSL for now + +2.0.6 2014-11-10 +- Minor bug fixes + 2.0.5 2014-11-09 - Fix QRCode size - Share over LAN option diff --git a/shadowsocks-csharp/Controller/Local.cs b/shadowsocks-csharp/Controller/Local.cs index ed769215..8bdbd15f 100755 --- a/shadowsocks-csharp/Controller/Local.cs +++ b/shadowsocks-csharp/Controller/Local.cs @@ -70,7 +70,7 @@ namespace Shadowsocks.Controller { Socket listener = (Socket)ar.AsyncState; Socket conn = listener.EndAccept(ar); - conn.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.NoDelay, true); + conn.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.NoDelay, true); listener.BeginAccept( new AsyncCallback(AcceptCallback), @@ -103,15 +103,14 @@ namespace Shadowsocks.Controller public const int RecvSize = 16384; public const int BufferSize = RecvSize + 32; // remote receive buffer - public byte[] remoteRecvBuffer = new byte[RecvSize]; + private byte[] remoteRecvBuffer = new byte[RecvSize]; // remote send buffer - public byte[] remoteSendBuffer = new byte[BufferSize]; + private byte[] remoteSendBuffer = new byte[BufferSize]; // connection receive buffer - public byte[] connetionRecvBuffer = new byte[RecvSize]; + private byte[] connetionRecvBuffer = new byte[RecvSize]; // connection send buffer - public byte[] connetionSendBuffer = new byte[BufferSize]; + private byte[] connetionSendBuffer = new byte[BufferSize]; // Received data string. - public StringBuilder sb = new StringBuilder(); private bool connectionShutdown = false; private bool remoteShutdown = false; @@ -134,7 +133,7 @@ namespace Shadowsocks.Controller remote = new Socket(ipAddress.AddressFamily, SocketType.Stream, ProtocolType.Tcp); - remote.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.NoDelay, true); + remote.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.NoDelay, true); // Connect to the remote endpoint. remote.BeginConnect(remoteEP, @@ -238,6 +237,7 @@ namespace Shadowsocks.Controller { // reject socks 4 response = new byte[]{ 0, 91 }; + Console.WriteLine("socks 5 protocol error"); } connection.BeginSend(response, 0, response.Length, 0, new AsyncCallback(HandshakeSendCallback), null); } @@ -289,6 +289,7 @@ namespace Shadowsocks.Controller } else { + Console.WriteLine("failed to recv data in handshakeReceive2Callback"); this.Close(); } } diff --git a/shadowsocks-csharp/Controller/PolipoRunner.cs b/shadowsocks-csharp/Controller/PolipoRunner.cs index de1c3c3a..a44e5ea1 100755 --- a/shadowsocks-csharp/Controller/PolipoRunner.cs +++ b/shadowsocks-csharp/Controller/PolipoRunner.cs @@ -60,9 +60,9 @@ namespace Shadowsocks.Controller _process.Kill(); _process.WaitForExit(); } - catch (InvalidOperationException) + catch (Exception e) { - // do nothing + Console.WriteLine(e.ToString()); } _process = null; } diff --git a/shadowsocks-csharp/Data/libeay32.dll.gz b/shadowsocks-csharp/Data/libeay32.dll.gz new file mode 100755 index 00000000..673427ba Binary files /dev/null and b/shadowsocks-csharp/Data/libeay32.dll.gz differ diff --git a/shadowsocks-csharp/Data/ss32.ico b/shadowsocks-csharp/Data/ss32.ico index c454c00c..a68e4dbb 100755 Binary files a/shadowsocks-csharp/Data/ss32.ico and b/shadowsocks-csharp/Data/ss32.ico differ diff --git a/shadowsocks-csharp/Encrypt/EncryptorFactory.cs b/shadowsocks-csharp/Encrypt/EncryptorFactory.cs index 59111a69..dbb45d33 100644 --- a/shadowsocks-csharp/Encrypt/EncryptorFactory.cs +++ b/shadowsocks-csharp/Encrypt/EncryptorFactory.cs @@ -10,7 +10,7 @@ namespace Shadowsocks.Encrypt return new TableEncryptor(method, password); } - return new PolarSSLEncryptor(method, password); + return new OpenSSLEncryptor(method, password); } } } diff --git a/shadowsocks-csharp/Encrypt/OpenSSL.cs b/shadowsocks-csharp/Encrypt/OpenSSL.cs new file mode 100755 index 00000000..8d7c31e4 --- /dev/null +++ b/shadowsocks-csharp/Encrypt/OpenSSL.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Text; + +namespace Shadowsocks.Encrypt +{ + public class OpenSSL + { + const string DLLNAME = "libeay32"; + + [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)] + public extern static void OpenSSL_add_all_ciphers(); + + [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)] + public extern static IntPtr EVP_md5(); + + [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)] + public extern static int EVP_BytesToKey(IntPtr type, IntPtr md, IntPtr salt, byte[] data, int datal, int count, byte[] key, byte[] iv); + + [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)] + public extern static int RAND_bytes(byte[] buf, int num); + + [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)] + public extern static IntPtr EVP_get_cipherbyname(byte[] name); + + [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)] + public extern static IntPtr EVP_CIPHER_CTX_new(); + + [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)] + public extern static int EVP_CipherInit_ex(IntPtr ctx, IntPtr type, IntPtr impl, byte[] key, byte[] iv, int enc); + + [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)] + public extern static int EVP_CIPHER_CTX_cleanup(IntPtr a); + + [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)] + public extern static int EVP_CIPHER_CTX_free(IntPtr a); + + [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)] + public extern static int EVP_CipherUpdate(IntPtr ctx, byte[] outb, out int outl, byte[] inb, int inl); + + [DllImport(DLLNAME, CallingConvention = CallingConvention.Cdecl)] + public extern static IntPtr MD5(byte[] d, long n, byte[] md); + } +} diff --git a/shadowsocks-csharp/Encrypt/OpenSSLEncryptor.cs b/shadowsocks-csharp/Encrypt/OpenSSLEncryptor.cs new file mode 100755 index 00000000..7abdb375 --- /dev/null +++ b/shadowsocks-csharp/Encrypt/OpenSSLEncryptor.cs @@ -0,0 +1,170 @@ +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Text; + +namespace Shadowsocks.Encrypt +{ + public class OpenSSLEncryptor + : EncryptorBase, IDisposable + { + static Dictionary ciphers = new Dictionary { + {"aes-128-cfb", new int[]{16, 16}}, + {"aes-192-cfb", new int[]{24, 16}}, + {"aes-256-cfb", new int[]{32, 16}}, + {"bf-cfb", new int[]{16, 8}}, + {"rc4", new int[]{16, 0}}, + {"rc4-md5", new int[]{16, 16}}, + }; + + static OpenSSLEncryptor() + { + OpenSSL.OpenSSL_add_all_ciphers(); + } + + public OpenSSLEncryptor(string method, string password) + : base(method, password) + { + InitKey(method, password); + } + + + static byte[] tempbuf = new byte[32768]; + + public override void Encrypt(byte[] buf, int length, byte[] outbuf, out int outlength) + { + if (_encryptCtx == IntPtr.Zero) + { + OpenSSL.RAND_bytes(outbuf, ivLen); + InitCipher(ref _encryptCtx, outbuf, true); + outlength = length + ivLen; + OpenSSL.EVP_CipherUpdate(_encryptCtx, tempbuf, out outlength, buf, length); + outlength = length + ivLen; + Buffer.BlockCopy(tempbuf, 0, outbuf, ivLen, outlength); + } + else + { + outlength = length; + OpenSSL.EVP_CipherUpdate(_encryptCtx, outbuf, out outlength, buf, length); + } + } + + public override void Decrypt(byte[] buf, int length, byte[] outbuf, out int outlength) + { + if (_decryptCtx == IntPtr.Zero) + { + InitCipher(ref _decryptCtx, buf, false); + outlength = length - ivLen; + Buffer.BlockCopy(buf, ivLen, tempbuf, 0, length - ivLen); + OpenSSL.EVP_CipherUpdate(_decryptCtx, outbuf, out outlength, tempbuf, length - ivLen); + } + else + { + outlength = length; + OpenSSL.EVP_CipherUpdate(_decryptCtx, outbuf, out outlength, buf, length); + } + } + + private static readonly Dictionary CachedKeys = new Dictionary(); + private byte[] _key; + private IntPtr _encryptCtx; + private IntPtr _decryptCtx; + private IntPtr _cipher; + private string _method; + private int keyLen; + private int ivLen; + + private void InitKey(string method, string password) + { + method = method.ToLower(); + _method = method; + string k = method + ":" + password; + if (method == "rc4-md5") + { + method = "rc4"; + } + _cipher = OpenSSL.EVP_get_cipherbyname(System.Text.Encoding.UTF8.GetBytes(method)); + if (_cipher == null) + { + throw new Exception("method not found"); + } + keyLen = ciphers[_method][0]; + ivLen = ciphers[_method][1]; + if (CachedKeys.ContainsKey(k)) + { + _key = CachedKeys[k]; + } + else + { + byte[] passbuf = Encoding.UTF8.GetBytes(password); + _key = new byte[32]; + byte[] iv = new byte[16]; + OpenSSL.EVP_BytesToKey(_cipher, OpenSSL.EVP_md5(), IntPtr.Zero, passbuf, passbuf.Length, 1, _key, iv); + CachedKeys[k] = _key; + } + } + + private void InitCipher(ref IntPtr ctx, byte[] iv, bool isCipher) + { + ctx = OpenSSL.EVP_CIPHER_CTX_new(); + int enc = isCipher ? 1 : 0; + byte[] realkey; + IntPtr r = IntPtr.Zero; + if (_method == "rc4-md5") + { + byte[] temp = new byte[keyLen + ivLen]; + realkey = new byte[keyLen]; + Array.Copy(_key, 0, temp, 0, keyLen); + Array.Copy(iv, 0, temp, keyLen, ivLen); + r = OpenSSL.MD5(temp, keyLen + ivLen, null); + Marshal.Copy(r, realkey, 0, keyLen); + } + else + { + realkey = _key; + } + OpenSSL.EVP_CipherInit_ex(ctx, _cipher, IntPtr.Zero, realkey, iv, enc); + } + + #region IDisposable + private bool _disposed; + + public override void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + + ~OpenSSLEncryptor() + { + Dispose(false); + } + + protected virtual void Dispose(bool disposing) + { + if (!_disposed) + { + if (disposing) + { + + } + + if (_encryptCtx.ToInt64() != 0) + { + OpenSSL.EVP_CIPHER_CTX_cleanup(_encryptCtx); + OpenSSL.EVP_CIPHER_CTX_free(_encryptCtx); + _encryptCtx = IntPtr.Zero; + } + if (_decryptCtx.ToInt64() != 0) + { + OpenSSL.EVP_CIPHER_CTX_cleanup(_decryptCtx); + OpenSSL.EVP_CIPHER_CTX_free(_decryptCtx); + _decryptCtx = IntPtr.Zero; + } + + _disposed = true; + } + } + #endregion + } +} diff --git a/shadowsocks-csharp/Program.cs b/shadowsocks-csharp/Program.cs index 35356d78..d730419a 100755 --- a/shadowsocks-csharp/Program.cs +++ b/shadowsocks-csharp/Program.cs @@ -36,10 +36,10 @@ namespace Shadowsocks return; } string tempPath = Path.GetTempPath(); - string dllPath = tempPath + "/polarssl.dll"; + string dllPath = tempPath + "/libeay32.dll"; try { - FileManager.UncompressFile(dllPath, Resources.polarssl_dll); + FileManager.UncompressFile(dllPath, Resources.libeay32_dll); } catch (IOException e) { @@ -47,7 +47,9 @@ namespace Shadowsocks } LoadLibrary(dllPath); +#if !DEBUG Logging.OpenLogFile(); +#endif Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); ShadowsocksController controller = new ShadowsocksController(); diff --git a/shadowsocks-csharp/Properties/AssemblyInfo.cs b/shadowsocks-csharp/Properties/AssemblyInfo.cs index b09c3e51..a5fe27d4 100755 --- a/shadowsocks-csharp/Properties/AssemblyInfo.cs +++ b/shadowsocks-csharp/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值, // 方法是按如下所示使用“*”: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.0.6")] +[assembly: AssemblyVersion("2.0.7")] // [assembly: AssemblyFileVersion("2.0.0")] diff --git a/shadowsocks-csharp/Properties/Resources.Designer.cs b/shadowsocks-csharp/Properties/Resources.Designer.cs index d292578d..65b2d0a2 100755 --- a/shadowsocks-csharp/Properties/Resources.Designer.cs +++ b/shadowsocks-csharp/Properties/Resources.Designer.cs @@ -63,6 +63,16 @@ 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[]. + /// internal static byte[] polarssl_dll { get { object obj = ResourceManager.GetObject("polarssl_dll", resourceCulture); @@ -104,5 +114,45 @@ namespace Shadowsocks.Properties { return ((byte[])(obj)); } } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ss16 { + get { + object obj = ResourceManager.GetObject("ss16", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ss20 { + get { + object obj = ResourceManager.GetObject("ss20", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ss24 { + get { + object obj = ResourceManager.GetObject("ss24", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap ssw128 { + get { + object obj = ResourceManager.GetObject("ssw128", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } diff --git a/shadowsocks-csharp/Properties/Resources.resx b/shadowsocks-csharp/Properties/Resources.resx index 14c098ec..f196cbea 100755 --- a/shadowsocks-csharp/Properties/Resources.resx +++ b/shadowsocks-csharp/Properties/Resources.resx @@ -118,6 +118,9 @@ 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 @@ -130,4 +133,16 @@ ..\Data\proxy.pac.txt.gz;System.Byte[], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ..\Resources\ss16.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ss20.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ss24.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\ssw128.png;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/shadowsocks-csharp/Resources/ss16.png b/shadowsocks-csharp/Resources/ss16.png new file mode 100755 index 00000000..eb3aaee2 Binary files /dev/null and b/shadowsocks-csharp/Resources/ss16.png differ diff --git a/shadowsocks-csharp/Resources/ss20.png b/shadowsocks-csharp/Resources/ss20.png new file mode 100755 index 00000000..e0c5dd8a Binary files /dev/null and b/shadowsocks-csharp/Resources/ss20.png differ diff --git a/shadowsocks-csharp/Resources/ss24.png b/shadowsocks-csharp/Resources/ss24.png new file mode 100755 index 00000000..9a155ff1 Binary files /dev/null and b/shadowsocks-csharp/Resources/ss24.png differ diff --git a/shadowsocks-csharp/Resources/ssw128.png b/shadowsocks-csharp/Resources/ssw128.png new file mode 100755 index 00000000..f9676a25 Binary files /dev/null and b/shadowsocks-csharp/Resources/ssw128.png differ diff --git a/shadowsocks-csharp/View/ConfigForm.Designer.cs b/shadowsocks-csharp/View/ConfigForm.Designer.cs index c1187c04..6b246c66 100755 --- a/shadowsocks-csharp/View/ConfigForm.Designer.cs +++ b/shadowsocks-csharp/View/ConfigForm.Designer.cs @@ -29,7 +29,6 @@ private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ConfigForm)); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.RemarksTextBox = new System.Windows.Forms.TextBox(); this.label6 = new System.Windows.Forms.Label(); @@ -91,10 +90,10 @@ this.tableLayoutPanel1.Controls.Add(this.PasswordTextBox, 1, 2); this.tableLayoutPanel1.Controls.Add(this.label5, 0, 3); this.tableLayoutPanel1.Controls.Add(this.EncryptionSelect, 1, 3); - this.tableLayoutPanel1.Location = new System.Drawing.Point(8, 21); - this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(5); + this.tableLayoutPanel1.Location = new System.Drawing.Point(12, 31); + this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(7, 7, 7, 7); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; - this.tableLayoutPanel1.Padding = new System.Windows.Forms.Padding(5); + this.tableLayoutPanel1.Padding = new System.Windows.Forms.Padding(7, 7, 7, 7); this.tableLayoutPanel1.RowCount = 6; this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); @@ -102,15 +101,16 @@ this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); - this.tableLayoutPanel1.Size = new System.Drawing.Size(242, 167); + this.tableLayoutPanel1.Size = new System.Drawing.Size(360, 232); this.tableLayoutPanel1.TabIndex = 0; // // RemarksTextBox // this.RemarksTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.RemarksTextBox.Location = new System.Drawing.Point(74, 139); + this.RemarksTextBox.Location = new System.Drawing.Point(110, 194); + this.RemarksTextBox.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); this.RemarksTextBox.Name = "RemarksTextBox"; - this.RemarksTextBox.Size = new System.Drawing.Size(160, 20); + this.RemarksTextBox.Size = new System.Drawing.Size(238, 26); this.RemarksTextBox.TabIndex = 10; this.RemarksTextBox.WordWrap = false; // @@ -118,9 +118,10 @@ // this.label6.Anchor = System.Windows.Forms.AnchorStyles.Right; this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(19, 142); + this.label6.Location = new System.Drawing.Point(27, 197); + this.label6.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(49, 13); + this.label6.Size = new System.Drawing.Size(73, 20); this.label6.TabIndex = 9; this.label6.Text = "Remarks"; // @@ -128,9 +129,10 @@ // this.label1.Anchor = System.Windows.Forms.AnchorStyles.Right; this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(17, 11); + this.label1.Location = new System.Drawing.Point(26, 15); + this.label1.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(51, 13); + this.label1.Size = new System.Drawing.Size(74, 20); this.label1.TabIndex = 0; this.label1.Text = "Server IP"; // @@ -138,18 +140,20 @@ // this.label2.Anchor = System.Windows.Forms.AnchorStyles.Right; this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(8, 37); + this.label2.Location = new System.Drawing.Point(12, 51); + this.label2.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(60, 13); + this.label2.Size = new System.Drawing.Size(88, 20); this.label2.TabIndex = 1; this.label2.Text = "Server Port"; // // ProxyPortTextBox // this.ProxyPortTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.ProxyPortTextBox.Location = new System.Drawing.Point(74, 113); + this.ProxyPortTextBox.Location = new System.Drawing.Point(110, 158); + this.ProxyPortTextBox.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); this.ProxyPortTextBox.Name = "ProxyPortTextBox"; - this.ProxyPortTextBox.Size = new System.Drawing.Size(160, 20); + this.ProxyPortTextBox.Size = new System.Drawing.Size(238, 26); this.ProxyPortTextBox.TabIndex = 4; this.ProxyPortTextBox.WordWrap = false; // @@ -157,9 +161,10 @@ // this.label4.Anchor = System.Windows.Forms.AnchorStyles.Right; this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(13, 116); + this.label4.Location = new System.Drawing.Point(20, 161); + this.label4.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(55, 13); + this.label4.Size = new System.Drawing.Size(80, 20); this.label4.TabIndex = 3; this.label4.Text = "Proxy Port"; // @@ -167,37 +172,41 @@ // this.label3.Anchor = System.Windows.Forms.AnchorStyles.Right; this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(15, 63); + this.label3.Location = new System.Drawing.Point(22, 87); + this.label3.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(53, 13); + this.label3.Size = new System.Drawing.Size(78, 20); this.label3.TabIndex = 2; this.label3.Text = "Password"; // // IPTextBox // this.IPTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.IPTextBox.Location = new System.Drawing.Point(74, 8); + this.IPTextBox.Location = new System.Drawing.Point(110, 12); + this.IPTextBox.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); this.IPTextBox.Name = "IPTextBox"; - this.IPTextBox.Size = new System.Drawing.Size(160, 20); + this.IPTextBox.Size = new System.Drawing.Size(238, 26); this.IPTextBox.TabIndex = 0; this.IPTextBox.WordWrap = false; // // ServerPortTextBox // this.ServerPortTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.ServerPortTextBox.Location = new System.Drawing.Point(74, 34); + this.ServerPortTextBox.Location = new System.Drawing.Point(110, 48); + this.ServerPortTextBox.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); this.ServerPortTextBox.Name = "ServerPortTextBox"; - this.ServerPortTextBox.Size = new System.Drawing.Size(160, 20); + this.ServerPortTextBox.Size = new System.Drawing.Size(238, 26); this.ServerPortTextBox.TabIndex = 1; this.ServerPortTextBox.WordWrap = false; // // PasswordTextBox // this.PasswordTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right))); - this.PasswordTextBox.Location = new System.Drawing.Point(74, 60); + this.PasswordTextBox.Location = new System.Drawing.Point(110, 84); + this.PasswordTextBox.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); this.PasswordTextBox.Name = "PasswordTextBox"; this.PasswordTextBox.PasswordChar = '*'; - this.PasswordTextBox.Size = new System.Drawing.Size(160, 20); + this.PasswordTextBox.Size = new System.Drawing.Size(238, 26); this.PasswordTextBox.TabIndex = 2; this.PasswordTextBox.WordWrap = false; // @@ -205,9 +214,10 @@ // this.label5.Anchor = System.Windows.Forms.AnchorStyles.Right; this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(11, 90); + this.label5.Location = new System.Drawing.Point(16, 124); + this.label5.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(57, 13); + this.label5.Size = new System.Drawing.Size(84, 20); this.label5.TabIndex = 8; this.label5.Text = "Encryption"; // @@ -218,7 +228,7 @@ this.EncryptionSelect.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.EncryptionSelect.FormattingEnabled = true; this.EncryptionSelect.ImeMode = System.Windows.Forms.ImeMode.NoControl; - this.EncryptionSelect.ItemHeight = 13; + this.EncryptionSelect.ItemHeight = 20; this.EncryptionSelect.Items.AddRange(new object[] { "table", "rc4-md5", @@ -227,16 +237,15 @@ "aes-128-cfb", "bf-cfb", "rc4"}); - this.EncryptionSelect.Location = new System.Drawing.Point(74, 86); + this.EncryptionSelect.Location = new System.Drawing.Point(110, 120); + this.EncryptionSelect.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); this.EncryptionSelect.Name = "EncryptionSelect"; - this.EncryptionSelect.Size = new System.Drawing.Size(160, 21); + this.EncryptionSelect.Size = new System.Drawing.Size(238, 28); this.EncryptionSelect.TabIndex = 3; // // notifyIcon1 // - this.notifyIcon1.Icon = ((System.Drawing.Icon)(resources.GetObject("notifyIcon1.Icon"))); this.notifyIcon1.Text = "Shadowsocks"; - this.notifyIcon1.Visible = true; this.notifyIcon1.DoubleClick += new System.EventHandler(this.notifyIcon1_DoubleClick); // // panel2 @@ -244,7 +253,8 @@ this.panel2.Anchor = System.Windows.Forms.AnchorStyles.Top; this.panel2.AutoSize = true; this.panel2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; - this.panel2.Location = new System.Drawing.Point(164, 175); + this.panel2.Location = new System.Drawing.Point(246, 263); + this.panel2.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); this.panel2.Name = "panel2"; this.panel2.Size = new System.Drawing.Size(0, 0); this.panel2.TabIndex = 1; @@ -252,9 +262,10 @@ // OKButton // this.OKButton.DialogResult = System.Windows.Forms.DialogResult.OK; - this.OKButton.Location = new System.Drawing.Point(4, 4); + this.OKButton.Location = new System.Drawing.Point(6, 6); + this.OKButton.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); this.OKButton.Name = "OKButton"; - this.OKButton.Size = new System.Drawing.Size(75, 23); + this.OKButton.Size = new System.Drawing.Size(113, 35); this.OKButton.TabIndex = 8; this.OKButton.Text = "OK"; this.OKButton.UseVisualStyleBackColor = true; @@ -263,9 +274,10 @@ // MyCancelButton // this.MyCancelButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; - this.MyCancelButton.Location = new System.Drawing.Point(86, 4); + this.MyCancelButton.Location = new System.Drawing.Point(130, 6); + this.MyCancelButton.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); this.MyCancelButton.Name = "MyCancelButton"; - this.MyCancelButton.Size = new System.Drawing.Size(75, 23); + this.MyCancelButton.Size = new System.Drawing.Size(113, 35); this.MyCancelButton.TabIndex = 9; this.MyCancelButton.Text = "Cancel"; this.MyCancelButton.UseVisualStyleBackColor = true; @@ -277,10 +289,10 @@ this.panel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.panel1.Controls.Add(this.MyCancelButton); this.panel1.Controls.Add(this.OKButton); - this.panel1.Location = new System.Drawing.Point(313, 247); + this.panel1.Location = new System.Drawing.Point(469, 371); this.panel1.Margin = new System.Windows.Forms.Padding(0); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(164, 30); + this.panel1.Size = new System.Drawing.Size(248, 46); this.panel1.TabIndex = 1; // // contextMenu1 @@ -373,17 +385,18 @@ this.panel3.AutoSize = true; this.panel3.Controls.Add(this.DeleteButton); this.panel3.Controls.Add(this.AddButton); - this.panel3.Location = new System.Drawing.Point(12, 220); + this.panel3.Location = new System.Drawing.Point(18, 330); this.panel3.Margin = new System.Windows.Forms.Padding(0); this.panel3.Name = "panel3"; - this.panel3.Size = new System.Drawing.Size(192, 30); + this.panel3.Size = new System.Drawing.Size(288, 46); this.panel3.TabIndex = 5; // // DeleteButton // - this.DeleteButton.Location = new System.Drawing.Point(100, 4); + this.DeleteButton.Location = new System.Drawing.Point(150, 6); + this.DeleteButton.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); this.DeleteButton.Name = "DeleteButton"; - this.DeleteButton.Size = new System.Drawing.Size(89, 23); + this.DeleteButton.Size = new System.Drawing.Size(133, 35); this.DeleteButton.TabIndex = 7; this.DeleteButton.Text = "&Delete"; this.DeleteButton.UseVisualStyleBackColor = true; @@ -391,9 +404,10 @@ // // AddButton // - this.AddButton.Location = new System.Drawing.Point(4, 4); + this.AddButton.Location = new System.Drawing.Point(6, 6); + this.AddButton.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); this.AddButton.Name = "AddButton"; - this.AddButton.Size = new System.Drawing.Size(89, 23); + this.AddButton.Size = new System.Drawing.Size(133, 35); this.AddButton.TabIndex = 6; this.AddButton.Text = "&Add"; this.AddButton.UseVisualStyleBackColor = true; @@ -402,9 +416,11 @@ // ServerGroupBox // this.ServerGroupBox.Controls.Add(this.tableLayoutPanel1); - this.ServerGroupBox.Location = new System.Drawing.Point(222, 12); + this.ServerGroupBox.Location = new System.Drawing.Point(334, 18); + this.ServerGroupBox.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); this.ServerGroupBox.Name = "ServerGroupBox"; - this.ServerGroupBox.Size = new System.Drawing.Size(255, 205); + this.ServerGroupBox.Padding = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.ServerGroupBox.Size = new System.Drawing.Size(383, 307); this.ServerGroupBox.TabIndex = 6; this.ServerGroupBox.TabStop = false; this.ServerGroupBox.Text = "Server"; @@ -412,27 +428,29 @@ // ServersListBox // this.ServersListBox.FormattingEnabled = true; - this.ServersListBox.Location = new System.Drawing.Point(12, 12); + this.ServersListBox.ItemHeight = 20; + this.ServersListBox.Location = new System.Drawing.Point(18, 18); + this.ServersListBox.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); this.ServersListBox.Name = "ServersListBox"; - this.ServersListBox.Size = new System.Drawing.Size(192, 186); + this.ServersListBox.Size = new System.Drawing.Size(286, 264); this.ServersListBox.TabIndex = 5; this.ServersListBox.SelectedIndexChanged += new System.EventHandler(this.ServersListBox_SelectedIndexChanged); // // ConfigForm // this.AcceptButton = this.OKButton; - this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); + this.AutoScaleDimensions = new System.Drawing.SizeF(144F, 144F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.AutoSize = true; this.CancelButton = this.MyCancelButton; - this.ClientSize = new System.Drawing.Size(489, 286); + this.ClientSize = new System.Drawing.Size(733, 430); this.Controls.Add(this.ServersListBox); this.Controls.Add(this.ServerGroupBox); this.Controls.Add(this.panel1); this.Controls.Add(this.panel3); this.Controls.Add(this.panel2); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; - this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "ConfigForm"; diff --git a/shadowsocks-csharp/View/ConfigForm.cs b/shadowsocks-csharp/View/ConfigForm.cs index 2629dc13..f992222a 100755 --- a/shadowsocks-csharp/View/ConfigForm.cs +++ b/shadowsocks-csharp/View/ConfigForm.cs @@ -7,6 +7,7 @@ using System.Windows.Forms; using System.Diagnostics; using Shadowsocks.Controller; using Shadowsocks.Model; +using Shadowsocks.Properties; namespace Shadowsocks.View { @@ -23,6 +24,7 @@ namespace Shadowsocks.View public ConfigForm(ShadowsocksController controller) { InitializeComponent(); + LoadTrayIcon(); notifyIcon1.ContextMenu = contextMenu1; this.controller = controller; @@ -37,6 +39,32 @@ namespace Shadowsocks.View LoadCurrentConfiguration(); } + private void LoadTrayIcon() + { + int dpi; + Graphics graphics = this.CreateGraphics(); + dpi = (int)graphics.DpiX; + graphics.Dispose(); + Bitmap icon = null; + if (dpi < 97) + { + // dpi = 96; + icon = Resources.ss16; + } + else if (dpi < 121) + { + // dpi = 120; + icon = Resources.ss20; + } + else + { + icon = Resources.ss24; + } + notifyIcon1.Icon = Icon.FromHandle(icon.GetHicon()); + notifyIcon1.Visible = true; + this.Icon = Icon.FromHandle(Resources.ssw128.GetHicon()); + } + private void controller_ConfigChanged(object sender, EventArgs e) { LoadCurrentConfiguration(); diff --git a/shadowsocks-csharp/View/ConfigForm.resx b/shadowsocks-csharp/View/ConfigForm.resx index 2d2ffed5..dc4a77ba 100755 --- a/shadowsocks-csharp/View/ConfigForm.resx +++ b/shadowsocks-csharp/View/ConfigForm.resx @@ -120,127 +120,7 @@ 17, 17 - - - - AAABAAEAEBAAAAAAIABoBAAAFgAAACgAAAAQAAAAIAAAAAEAIAAAAAAAQAQAAAAAAAAAAAAAAAAAAAAA - AAD///8B////Af///wH///8B////Af///wH///8BBAQIcf///wH///8B////Af///wH///8B////Af// - /wH///8B////Af///wH///8B////Af///wH///8B////ARQUF/8EBAgx////Af///wH///8B////Af// - /wH///8B////Af///wH///8B////Af///wH///8B////Af///wFycnT/Kysuz////wH///8B////Af// - /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8BUlJV/zY2Oe8EBAgx////AQQE - CFEEBAifBAQIMf///wH///8B////Af///wH///8B////Af///wH///8B////AQQECGEEBAhhMjI1r3Jy - dP+xsbL/4ODg/wQECIH///8B////Af///wH///8B////Af///wEEBAgxBAQIcQQECCEVFRjv0NDR//// - //////////////////8yMjWv////Af///wH///8BBAQIIQQECI9eXmDfoaGi/8DAwf8XFxvPBAQIQWJi - Zf//////////////////////aGhr7////wH///8BBAQIgTMzNv/g4OD/////////////////7+/w/z4+ - Qc8EBAiPoaGi/////////////////6Ghov8EBAgx////Af///wEEBAhBLi4xv6Ghov////////////// - ///v7/D/WFha7wQECL/AwMH////////////g4OD/BAQIcf///wH///8B////Af///wEEBAhBLi4xv6Gh - ov////////////////9ycnT/FBQX/9DQ0f///////////zIyNa////8B////Af///wH///8B////Af// - /wEEBAhBLi4xv6Ghov///////////6Ghov8jIyf/7+/w//////9YWFrv////Af///wH///8B////Af// - /wH///8B////Af///wEEBAhBLi4xv6Ghov//////wMDB/2JiZf//////kZGT/wQECCH///8B////Af// - /wH///8B////Af///wH///8B////Af///wEEBAhBLi4xv6Ghov///////////9DQ0f8EBAhh////Af// - /wH///8B////Af///wH///8B////Af///wH///8B////Af///wEEBAhBLi4xv6Ghov//////HR0hn/// - /wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wEEBAhBLi4xvygo - K9////8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af///wH///8B////Af// - /wEEBAhBAAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA//8AAP//AAD//wAA - //8AAP//AAD//w== - - 146, 19 - - - AAABAAIAEBAAAAEAIABoBAAAJgAAACAgAAABACAAqBAAAI4EAAAoAAAAEAAAACAAAAABACAAAAAAAAAE - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAMuVRDDDhimvwH8c/799Gf+/fRn/xIYq5wAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADSpF48x402v8B+G/+/fRr/2bF2JAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1alnQMeN - Nr/Jkj5gAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAObMpAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - AAAAAAAAAAAAAAAAAAAAAAAAAAAAAP///////f////z////8f////H////w////8H////Dwf//3gH/// - AB///AAf/4wAD/wGAA/gAwAPgACAD4AAQAfgAAAH+AAAB/4AAAf/gAAD/+AAA//4AAP//gAD//+AA/// - 4AH///gB///+Af///4H////g////+P////7///// - - \ No newline at end of file diff --git a/shadowsocks-csharp/app.manifest b/shadowsocks-csharp/app.manifest new file mode 100755 index 00000000..2f6c64aa --- /dev/null +++ b/shadowsocks-csharp/app.manifest @@ -0,0 +1,16 @@ + + + + + + + + + + + + + true + + + \ No newline at end of file diff --git a/shadowsocks-csharp/shadowsocks-csharp.csproj b/shadowsocks-csharp/shadowsocks-csharp.csproj index b648b831..7629f4fc 100755 --- a/shadowsocks-csharp/shadowsocks-csharp.csproj +++ b/shadowsocks-csharp/shadowsocks-csharp.csproj @@ -58,6 +58,9 @@ ManagedMinimumRules.ruleset false + + app.manifest + @@ -73,6 +76,8 @@ + + @@ -116,6 +121,10 @@ QRCodeForm.cs + + Designer + + @@ -130,6 +139,10 @@ + + + + diff --git a/shadowsocks-csharp/ssnoti.ico b/shadowsocks-csharp/ssnoti.ico deleted file mode 100755 index ee963675..00000000 Binary files a/shadowsocks-csharp/ssnoti.ico and /dev/null differ