private DefaultProxy createProxy() { var dialog = new DefaultProxyDialog(); dialog.ShowDialog(); if (dialog.DialogResult == DialogResult.OK) { var clFactory = new TcpClientFactory(dialog.TcpClientFactorySettings); var srv = new TcpServer(dialog.TcpServerSettings); return(new DefaultProxy(new DefaultProxySettings { Server = srv, ClientFactory = clFactory })); } return(null); }
private DefaultProxy createProxy(InstanceLogger logger) { var dialog = new DefaultProxyDialog(); dialog.ShowDialog(); if (dialog.DialogResult == DialogResult.OK) { var clFactory = new HttpClientFactory(dialog.TcpClientFactorySettings, logger); var srv = new HttpServer(new HttpServerSettings { TcpSettings = dialog.TcpServerSettings }, logger); return(new DefaultProxy(new DefaultProxySettings { Server = srv, ClientFactory = clFactory })); } return(null); }