fix table and rc4; fix exception when shutdown; log to file

This commit is contained in:
clowwindy
2013-06-17 00:09:51 +08:00
parent 804d0fed55
commit 5dc798511b
3 changed files with 40 additions and 5 deletions
+17
View File
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Windows.Forms;
namespace shadowsocks_csharp
@@ -12,9 +13,25 @@ namespace shadowsocks_csharp
[STAThread]
static void Main()
{
try
{
FileStream fs = new FileStream("shadowsocks.log", FileMode.Append);
TextWriter tmp = Console.Out;
StreamWriter sw = new StreamWriter(fs);
sw.AutoFlush = true;
Console.SetOut(sw);
Console.SetError(sw);
}
catch (IOException e)
{
Console.WriteLine(e.ToString());
}
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}