public static bool startWebProxy(this O2_Web_Proxy o2WebProxy, int port)
 {
     o2WebProxy.Port = port;
     ProxyServer.Server.ListeningPort = o2WebProxy.Port;
     o2WebProxy.setBrowserProxy();
     if (ProxyServer.Server.Start(o2WebProxy.CertLocation))
     {
         "Proxy started Ok on ip:port: {0}".info(o2WebProxy.proxyLocation());
         return(true);
     }
     "Proxy failed to start on ip:port: {0}".error(o2WebProxy.proxyLocation());
     return(false);
 }
Exemplo n.º 2
0
        public static Panel add_Proxy_ActionsPanel(this O2_Web_Proxy o2WebProxy, Control topPanel)
        {
            var actionsPanel = topPanel.insert_Above(40, "actions");

            actionsPanel.add_Label("O2 Proxy")
            .append_Link("View Proxy Object", () => o2WebProxy.details())
            .append_Link("Proxy Start", () => o2WebProxy.startWebProxy())
            .append_Link("Proxy Stop", () => o2WebProxy.stopWebProxy())
            .append_Link("Set Browser Proxy", () => o2WebProxy.setBrowserProxy())
            .append_Link("Clear Browser Proxy", () => o2WebProxy.clearBrowserProxy())
            .append_Link("Stop Current Process", () => Processes.getCurrentProcess().stop());
            return(actionsPanel);
        }