public void Start() { WriteTextToConsole("*** Starting up WinTunnel ****"); WriteTextToConsole("Starting thread... "); Logger.initialize(m_strLogFileLocation, m_bLogToFile); m_localEP = new IPEndPoint(IPAddress.Any, Int32.Parse(m_strListeningPort)); m_serverName = m_strForwardAddress; m_serverPort = Int32.Parse(m_strForwardPort); connMgr = new ConnectionManager(); task = new ProxyClientListenerTask(m_localEP, m_serverName, m_serverPort, m_bHttpsClient, m_bHttpsServer); Thread t = new Thread(task.run); t.Start(); }
/// <summary> /// Stop this service. /// </summary> public void Stop() { //close the main listen socket task.stop(); //Shutdown the connection manager connMgr.shutdown(); connMgr = null; WriteTextToConsole("WinTunnel stopped. "); Logger.close(); }