In my network environment, I cannot access unpkg.com, which causes some of my web pages to load improperly. I can access unpkg.zhimg.com, which can replace unpkg.com. Therefore, I'm wondering if I can use Fiddler to replace all accesses to unpkg.com with accesses to unpkg.zhimg.com. To do this, I used the following code in FiddlerScript:
if (oSession.HTTPMethodIs("CONNECT") && (oSession.PathAndQuery == "unpkg.com:443")) { oSession.PathAndQuery = "unpkg.zhimg.com:443"; } if (oSession.HostnameIs("unpkg.com")) oSession.hostname = "unpkg.zhimg.com";
When I try to access unpkg.com, I encounter the following error:
"fiddler.network.https> HTTPS handshake to unpkg.com (for #2) failed. System.Security.Authentication.AuthenticationException."
From the error message, it seems like Fiddler is still attempting to establish a connection with unpkg.com before accessing unpkg.zhimg.com. Is it possible to configure Fiddler to directly access unpkg.zhimg.com without attempting to connect to unpkg.com first?