Sto cercando di implementare un server SSL in-sistema usando FiddlerCore:SSL ha ricevuto un record che ha superato la lunghezza massima consentita quando si modifica richiesta con violinista
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace fiddlerCoreTest
{
using System.IO;
using System.Threading;
using Fiddler;
class Program
{
static Proxy oSecureEndpoint;
static string sSecureEndpointHostname = "localhost";
static int iSecureEndpointPort = 7777;
static void Main(string[] args)
{
//var tt = Fiddler.CertMaker.GetRootCertificate().GetRawCertData();
//File.WriteAllBytes("root.crt",tt);
Fiddler.FiddlerApplication.BeforeRequest += delegate(Fiddler.Session oS)
{
oS.bBufferResponse = false;
if ((oS.hostname == sSecureEndpointHostname)&&oS.port==7777)
{
oS.utilCreateResponseAndBypassServer();
oS.oResponse.headers.HTTPResponseStatus = "200 Ok";
oS.oResponse["Content-Type"] = "text/html; charset=UTF-8";
oS.oResponse["Cache-Control"] = "private, max-age=0";
oS.utilSetResponseBody("<html><body>Request for httpS://" + sSecureEndpointHostname + ":" + iSecureEndpointPort.ToString() + " received. Your request was:<br /><plaintext>" + oS.oRequest.headers.ToString());
}
};
FiddlerCoreStartupFlags oFCSF = FiddlerCoreStartupFlags.Default;
oFCSF = (oFCSF & ~FiddlerCoreStartupFlags.RegisterAsSystemProxy);
Fiddler.FiddlerApplication.Startup(8877, oFCSF);
oSecureEndpoint = FiddlerApplication.CreateProxyEndpoint(iSecureEndpointPort, true, sSecureEndpointHostname);
if (null != oSecureEndpoint)
{
FiddlerApplication.Log.LogFormat("Created secure end point listening on port {0}, using a HTTPS certificate for '{1}'", iSecureEndpointPort, sSecureEndpointHostname);
}
Console.WriteLine("Press any key to exit");
Console.ReadKey();
}
}
}
in Firefox, GET http://localhost:7777/
funziona bene, ma quando oTTENGO https://localhost:7777/
, rapporti firefox seguente errore:
Perché ottengo questo, e come posso risolvere il problema?
UPDATE Questo accade solo quando uso il violinista come proxy con firefox. Quando rimuovo il proxy del fiddler, posso accedere a https://localhost:7777/
. Tuttavia, vorrei anche poter accedere a https://localhost:7777/
tramite il proxy
Torniamo indietro un po '. Quando Fiddler * non è impostato come proxy in Firefox, è possibile visitare https: // localhost: 7777? Inoltre, qual è la versione esatta di Firefox che stai utilizzando? Viene mai colpito un breakpoint su utilCreateResponseAndBypassServer? – EricLaw
Sto usando ff17.0.1. Quando visito 'https: // localhost: 7777' senza proxy, funziona. 'oS.utilCreateResponseAndBypassServer();' viene colpito, e la funzione restituisce una risposta al nucleo del violinista. –