diff --git a/CHANGES b/CHANGES index 5c5aba5f..ac759625 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,9 @@ +2.5.8 2015-09-20 +- Update GFWList url + +2.5.7 2015-09-19 +- Fix repeated IV + 2.5.6 2015-08-19 - Add portable mode. Create shadowsocks_portable_mode.txt to use it - Support server reorder diff --git a/README.md b/README.md index 83bff1ef..b4952dd8 100644 --- a/README.md +++ b/README.md @@ -75,8 +75,8 @@ Visual Studio 2015 is required. GPLv3 -[Appveyor]: https://ci.appveyor.com/project/clowwindy/shadowsocks-csharp -[Build Status]: https://ci.appveyor.com/api/projects/status/gknc8l1lxy423ehv/branch/master +[Appveyor]: https://ci.appveyor.com/project/icylogic/shadowsocks-windows-l9mwe +[Build Status]: https://ci.appveyor.com/api/projects/status/ytllr9yjkbpc2tu2/branch/master [latest release]: https://github.com/shadowsocks/shadowsocks-csharp/releases [GFWList]: https://github.com/gfwlist/gfwlist [Servers]: https://github.com/shadowsocks/shadowsocks/wiki/Ports-and-Clients#linux--server-side diff --git a/shadowsocks-csharp/Controller/Service/GfwListUpdater.cs b/shadowsocks-csharp/Controller/Service/GfwListUpdater.cs index 70720fb9..493defa4 100644 --- a/shadowsocks-csharp/Controller/Service/GfwListUpdater.cs +++ b/shadowsocks-csharp/Controller/Service/GfwListUpdater.cs @@ -12,7 +12,7 @@ namespace Shadowsocks.Controller { public class GFWListUpdater { - private const string GFWLIST_URL = "https://autoproxy-gfwlist.googlecode.com/svn/trunk/gfwlist.txt"; + private const string GFWLIST_URL = "https://raw.githubusercontent.com/gfwlist/gfwlist/master/gfwlist.txt"; private static string PAC_FILE = PACServer.PAC_FILE; @@ -97,4 +97,4 @@ namespace Shadowsocks.Controller return valid_lines; } } -} \ No newline at end of file +} diff --git a/shadowsocks-csharp/Controller/Service/UpdateChecker.cs b/shadowsocks-csharp/Controller/Service/UpdateChecker.cs index b2ef20dc..d48c0aae 100644 --- a/shadowsocks-csharp/Controller/Service/UpdateChecker.cs +++ b/shadowsocks-csharp/Controller/Service/UpdateChecker.cs @@ -18,7 +18,7 @@ namespace Shadowsocks.Controller public string LatestVersionURL; public event EventHandler NewVersionFound; - public const string Version = "2.5.6"; + public const string Version = "2.5.8"; public void CheckUpdate(Configuration config) { diff --git a/shadowsocks-csharp/Encryption/IVEncryptor.cs b/shadowsocks-csharp/Encryption/IVEncryptor.cs index 32948d6b..b82d3adf 100755 --- a/shadowsocks-csharp/Encryption/IVEncryptor.cs +++ b/shadowsocks-csharp/Encryption/IVEncryptor.cs @@ -88,7 +88,8 @@ namespace Shadowsocks.Encryption protected static void randBytes(byte[] buf, int length) { byte[] temp = new byte[length]; - new Random().NextBytes(temp); + RNGCryptoServiceProvider rngServiceProvider = new RNGCryptoServiceProvider(); + rngServiceProvider.GetBytes(temp); temp.CopyTo(buf, 0); } diff --git a/shadowsocks-csharp/View/ConfigForm.cs b/shadowsocks-csharp/View/ConfigForm.cs index d7d5c1f3..dc290249 100755 --- a/shadowsocks-csharp/View/ConfigForm.cs +++ b/shadowsocks-csharp/View/ConfigForm.cs @@ -146,6 +146,28 @@ namespace Shadowsocks.View } + private void ConfigForm_KeyDown(object sender, KeyEventArgs e) + { + // Sometimes the users may hit enter key by mistake, and the form will close without saving entries. + + if (e.KeyCode == Keys.Enter) + { + Server server = controller.GetCurrentServer(); + if (!SaveOldSelectedServer()) + { + return; + } + if (_modifiedConfiguration.configs.Count == 0) + { + MessageBox.Show(I18N.GetString("Please add at least one server")); + return; + } + controller.SaveServers(_modifiedConfiguration.configs, _modifiedConfiguration.localPort); + controller.SelectServerIndex(_modifiedConfiguration.configs.IndexOf(server)); + } + + } + private void ServersListBox_SelectedIndexChanged(object sender, EventArgs e) { if (!ServersListBox.CanSelect)