Browse Source

add about form

Version now change with AssemblyVersion

add open on lan option

Add an option to choose whether to open on lan or not.

add log switch and modify detector

Add an option to select whether to open log or not.
Add a detector to check whether the server setting changed.

small bug

Fix a small bug

add modify detector

Don't reload server if config not change.

add about form

Add an about form instead of just open link.

add log switch and modify detector

Add an option to select whether to open log or not.
Add a detector to check whether the server setting changed.

small bug

Fix a small bug

add modify detector

Don't reload server if config not change.
pull/45/head
wzxjohn 10 years ago
parent
commit
76732f383f
6 changed files with 10 additions and 7 deletions
  1. +1
    -0
      shadowsocks-csharp/Controller/PACServer.cs
  2. +3
    -2
      shadowsocks-csharp/Controller/PolipoRunner.cs
  3. +1
    -0
      shadowsocks-csharp/Controller/ShadowsocksController.cs
  4. +2
    -2
      shadowsocks-csharp/Program.cs
  5. +2
    -2
      shadowsocks-csharp/View/QRCodeForm.cs
  6. +1
    -1
      shadowsocks-csharp/shadowsocks-csharp.csproj

+ 1
- 0
shadowsocks-csharp/Controller/PACServer.cs View File

@@ -15,6 +15,7 @@ namespace Shadowsocks.Controller
{
private static int PORT = 8090;
private static string PAC_FILE = "pac.txt";
public bool openOnLan;
Socket _listener;
FileSystemWatcher watcher;


+ 3
- 2
shadowsocks-csharp/Controller/PolipoRunner.cs View File

@@ -12,6 +12,7 @@ namespace Shadowsocks.Controller
class PolipoRunner
{
private Process _process;
public bool openOnLan;
public void Start(Configuration configuration)
{
@@ -31,10 +32,10 @@ namespace Shadowsocks.Controller
Console.WriteLine(e.ToString());
}
}
string temppath = Path.GetTempPath();
string temppath = Path.GetTempPath();
string polipoConfig = Resources.polipo_config;
polipoConfig = polipoConfig.Replace("__SOCKS_PORT__", server.local_port.ToString());
polipoConfig = polipoConfig.Replace("__POLIPO_BIND_IP__", configuration.shareOverLan ? "0.0.0.0" : "127.0.0.1");
polipoConfig = polipoConfig.Replace("__POLIPO_BIND_IP__", configuration.shareOverLan ? "0.0.0.0" : "127.0.0.1");
FileManager.ByteArrayToFile(temppath + "/polipo.conf", System.Text.Encoding.UTF8.GetBytes(polipoConfig));
FileManager.UncompressFile(temppath + "/ss_polipo.exe", Resources.polipo_exe);


+ 1
- 0
shadowsocks-csharp/Controller/ShadowsocksController.cs View File

@@ -35,6 +35,7 @@ namespace Shadowsocks.Controller
public ShadowsocksController()
{
_config = Configuration.Load();
polipoRunner = new PolipoRunner();
polipoRunner.Start(_config);
local = new Local(_config);


+ 2
- 2
shadowsocks-csharp/Program.cs View File

@@ -46,8 +46,8 @@ namespace Shadowsocks
Console.WriteLine(e.ToString());
}
LoadLibrary(dllPath);
Logging.OpenLogFile();
Logging.OpenLogFile();
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
ShadowsocksController controller = new ShadowsocksController();


+ 2
- 2
shadowsocks-csharp/View/QRCodeForm.cs View File

@@ -24,12 +24,12 @@ namespace Shadowsocks.View
private void GenQR(string ssconfig)
{
string qrText = ssconfig;
string qrText = ssconfig;
QRCode4CS.Options options = new QRCode4CS.Options();
options.Text = qrText;
QRCode4CS.QRCode qrCoded = null;
bool success = false;
foreach (var level in new QRErrorCorrectLevel[]{QRErrorCorrectLevel.H, QRErrorCorrectLevel.Q, QRErrorCorrectLevel.M, QRErrorCorrectLevel.L})
foreach (var level in new QRErrorCorrectLevel[]{QRErrorCorrectLevel.H, QRErrorCorrectLevel.Q, QRErrorCorrectLevel.M, QRErrorCorrectLevel.L})
{
for (int i = 3; i < 10; i++)
{


+ 1
- 1
shadowsocks-csharp/shadowsocks-csharp.csproj View File

@@ -60,7 +60,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.XML" />


Loading…
Cancel
Save