private void StartServer(object sender, EventArgs e)
        {
            try
            {
                if (_checkUserTrafficFromCurrentFile.Checked)
                {
                    _proxy = new TrafficStoreProxy(TrafficViewer.Instance.TrafficViewerFile,
                                                   TrafficViewer.Instance.TrafficViewerFile,
                                                   _textAttackHost.Text,
                                                   80,
                                                   int.Parse(_textAttackPort.Text));
                }
                else
                {
                    _proxy = new ReverseProxy(
                        _textAttackHost.Text,
                        80,
                        int.Parse(_textAttackPort.Text),
                        TrafficViewer.Instance.TrafficViewerFile);
                    _proxy.ExtraOptions[ReverseProxy.FORWARDING_HOST_OPT] = _textTargetHost.Text;
                    _proxy.ExtraOptions["ForwardingPort"] = _textHostPort.Text;

                    _proxy.NetworkSettings.CertificateValidationCallback = new RemoteCertificateValidationCallback(SSLValidationCallback.ValidateRemoteCertificate);
                }

                _proxy.Start();
            }
            catch (Exception ex)
            {
                ErrorBox.ShowDialog(ex.ToString());
            }
        }
Beispiel #2
0
 private void StartProxy()
 {
     _buttonStart.Enabled = false;
     _proxy.Start();
     _labelMessage.Text     = String.Format(Resources.ExternalBrowserTextStarted, _proxy.Host, _proxy.Port);
     _buttonStart.Text      = Resources.Stop;
     _buttonStart.Enabled   = true;
     _textTrapMatch.Enabled = false;
 }