Beispiel #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="logger">The logger</param>
        /// <param name="config">Configuration for the server</param>
        public FullHttpProxyServer(HttpProxyServerConfig config, Logger logger)
            : base(logger)
        {
            _config = config;

            NetGraphBuilder builder = new NetGraphBuilder();

            ClientEndpointFactory client = builder.AddClient("Client", Guid.NewGuid());
            ServerEndpointFactory server = builder.AddServer("Server", Guid.NewGuid());

            DirectNodeFactory nop = builder.AddNode(new DirectNodeFactory("NOP", Guid.NewGuid()));

            builder.AddLines(client, nop, server, client);

            _factory = builder.Factory;
        }
Beispiel #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="logger">The logger</param>
        /// <param name="config">Configuration for the server</param>
        public FullHttpProxyServer(HttpProxyServerConfig config, Logger logger)
            : base(logger)
        {
            _config = config;

            NetGraphBuilder builder = new NetGraphBuilder();

            ClientEndpointFactory client = builder.AddClient("Client", Guid.NewGuid());
            ServerEndpointFactory server = builder.AddServer("Server", Guid.NewGuid());

            DirectNodeFactory nop = builder.AddNode(new DirectNodeFactory("NOP", Guid.NewGuid()));

            builder.AddLines(client, nop, server, client);

            _factory = builder.Factory;
        }
Beispiel #3
0
        public HttpProxyOptionsForm(FullHttpProxyDocument document)
        {
            _document = document;
            _config = _document.Config.Clone();

            InitializeComponent();
            sslConfigControl.Config = _config.SslConfig;
            checkBoxEnableAuth.Checked = _config.RequireAuth;
            textBoxUsername.Text = _config.ProxyUsername;
            textBoxPassword.Text = _config.ProxyPassword;
            checkBoxHttp10.Checked = _config.Version10Proxy;

            if (document is HttpReverseProxyDocument)
            {
                tabControl.TabPages.Remove(tabPageOptions);
            }
        }
Beispiel #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="config"></param>
 /// <param name="logger"></param>
 public ReverseHttpProxyServer(HttpProxyServerConfig config, Logger logger)
     : base(logger)
 {
     _config = config;
 }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="config"></param>
 /// <param name="logger"></param>
 public ReverseHttpProxyServer(HttpProxyServerConfig config, Logger logger)
     : base(logger)
 {
     _config = config;
 }
 /// <summary>
 /// Constructor
 /// </summary>
 public FullHttpProxyDocument()
 {
     _port = 3128;
     _config = new HttpProxyServerConfig();
 }
        /// <summary>
        /// On deserialization callback
        /// </summary>
        protected override void OnDeserialization()
        {
            base.OnDeserialization();

            if (_config == null)
            {
                _config = new HttpProxyServerConfig();
            }

            if (_sslConfig != null)
            {
                _config.SslConfig = _sslConfig;
                _sslConfig = null;
            }
        }