@@ -12,7 +12,6 @@ namespace Shadowsocks.Controller | |||||
class PolipoRunner | class PolipoRunner | ||||
{ | { | ||||
private Process _process; | private Process _process; | ||||
public bool openOnLan; | |||||
public void Start(Configuration configuration) | public void Start(Configuration configuration) | ||||
{ | { | ||||
@@ -32,10 +31,10 @@ namespace Shadowsocks.Controller | |||||
Console.WriteLine(e.ToString()); | Console.WriteLine(e.ToString()); | ||||
} | } | ||||
} | } | ||||
string temppath = Path.GetTempPath(); | |||||
string temppath = Path.GetTempPath(); | |||||
string polipoConfig = Resources.polipo_config; | string polipoConfig = Resources.polipo_config; | ||||
polipoConfig = polipoConfig.Replace("__SOCKS_PORT__", server.local_port.ToString()); | 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.ByteArrayToFile(temppath + "/polipo.conf", System.Text.Encoding.UTF8.GetBytes(polipoConfig)); | ||||
FileManager.UncompressFile(temppath + "/ss_polipo.exe", Resources.polipo_exe); | FileManager.UncompressFile(temppath + "/ss_polipo.exe", Resources.polipo_exe); | ||||
@@ -19,7 +19,6 @@ namespace Shadowsocks.Controller | |||||
private Configuration _config; | private Configuration _config; | ||||
private PolipoRunner polipoRunner; | private PolipoRunner polipoRunner; | ||||
private bool stopped = false; | private bool stopped = false; | ||||
private bool openOnLan; | |||||
public class PathEventArgs : EventArgs | public class PathEventArgs : EventArgs | ||||
{ | { | ||||
@@ -36,12 +35,6 @@ namespace Shadowsocks.Controller | |||||
public ShadowsocksController() | public ShadowsocksController() | ||||
{ | { | ||||
_config = Configuration.Load(); | _config = Configuration.Load(); | ||||
if (_config.enableLog) | |||||
{ | |||||
SetLog(); | |||||
} | |||||
openOnLan = _config.openOnLan; | |||||
polipoRunner = new PolipoRunner(); | polipoRunner = new PolipoRunner(); | ||||
polipoRunner.Start(_config); | polipoRunner.Start(_config); | ||||
local = new Local(_config); | local = new Local(_config); | ||||
@@ -17,8 +17,6 @@ namespace Shadowsocks.Model | |||||
public bool enabled; | public bool enabled; | ||||
public bool shareOverLan; | public bool shareOverLan; | ||||
public bool isDefault; | public bool isDefault; | ||||
public bool openOnLan; | |||||
public bool enableLog; | |||||
public bool noChange; | public bool noChange; | ||||
private static string CONFIG_FILE = "gui-config.json"; | private static string CONFIG_FILE = "gui-config.json"; | ||||
@@ -374,10 +374,5 @@ namespace Shadowsocks.View | |||||
qrCodeForm.Icon = this.Icon; | qrCodeForm.Icon = this.Icon; | ||||
qrCodeForm.Show(); | qrCodeForm.Show(); | ||||
} | } | ||||
private void enableLogBox_CheckedChanged(object sender, EventArgs e) | |||||
{ | |||||
MessageBox.Show("This option only works on next startup."); | |||||
} | |||||
} | } | ||||
} | } |