I am using fiddler as reverse proxy, my query is how we can change the https request to http using fiddler. I am trying to create a rule which can change the incoming request which is https and return as http.
Is this possible by editing rules in fiddler? Any suggestions?
You didn't say what you tried already? It's not clear what you mean by "return as HTTP"-- a HTTPS request can be easily routed to a HTTP endpoint, but when the client gets the response, it's going to be over HTTPS.
You can easily change the scheme of a request:
if (!oSession.isHTTPS && !oSession.HTTPMethodIs("CONNECT") &&
oSession.HostnameIs("myServer"))
{
oSession.oRequest.headers.UriScheme = "https";
}
I assume you've already figured out how to get Fiddler to act as a reverse proxy for HTTPS. It's non-obvious, but well-covered in the new Fiddler book.
Related
I want to set up a custom proxy that proxies connections to some destinations (inside a network) but not other destinations (in the global internet). Is there any HTTP response the proxy server can send to make the browser connect directly to the requested destination?
For example, I request redirection to Google to my proxy server. The proxy server decides not to proxy, so I get this HTTP response, and my browser connects directly to Google.
You could send a redirect http response code like 302 to redirect the client directly to the website. See: https://moz.com/learn/seo/redirection
Just sending a simple POST request to https://httpbin.org/post.
Fiddler captures the request when I send it from Postman, but doesn't when I send it from Insomnia.
Is there some setting I need to enable either in Fiddler or Insomnia?
By default, Fiddler changes the system proxy to point to the port it's listening onto, http://localhost:8888. Contrary, Insomnia doesn't use the system proxy, but could be manually configured to use a specified proxy:
Choose Settings -> HTTP Proxy and set http://localhost:8888 (or whatever Fiddler is using).
Got a problem with squid. I'm using 3.1 version with my own redirector.
My problem was when a client for example request https://twitter.com (with https) but somehow got a logic with my redirector that twitter.com is invalid page so i redirected this request to my invalid page. Let say 302:http://mydomain.com?invalid=twitter.com, in this stage process will not continue and browser will say "HTTP gateway failed".
So, my theory is when a request is https redirected to http, squid will not work. Is there any configuration i need to be done so that it will work?
Thank you guys..
RFC 2817 isn't very clear about the behavior of CONNECT and redirect. I think that most of the browser won't accept a redirect as a reply to the CONNECT method. So, there is no way to do what you want.
Is not an Squid issue, is a protocol/browser issue.
well, i think the best way to redirect is when:
- if the request is https the response should be https
- and if the request if http response should be http
that's the best way i can't think at the moment...
i'm trying to capture node.js http traffic with a protocol analyser (Charles) but can't get node to use the proxy. Is there some way to get nodes http and https modules to use a proxy?
I'm using OSX by the way
Thanks Chris in my case I was using Charles and Request module. There is a handle proxy option to put your charles port.
So to find your port in the Charles menu Proxy->Proxy Settings->Http Proxy
Use this port number in any request eg:
request.get(url, {
'proxy': 'http://localhost:<charles-proxy-port>'
}, function (error, response, body) {
//did you see me in Charles??
});
Figured it out. I was following the instructions from How can I use an http proxy with node.js http.Client?
And i thought i needed to use https to access the proxy. But if i use http to access the proxy, and pass eg 'path: 'https://www.google.com/accounts/OAuthGetRequestToken', then it works...
I tried writing a simple proxy in node.js today with a basic HTTP server, I realized in Firefox when I reload the proxy, I can see a request. However, when I load any page, it doesn't seem to be going through my proxy. I can curl the server, and it works fine. But why is the browser not using my proxy?
The code just looks like:
var http = require('http');
var listener = function(request, response) {
console.log('hi');
response.write("200");
response.end();
};
var server = http.createServer(listener);
server.listen(8000, undefined, function() {
console.log('Server has started on 8000');
});
I'm just looking for something that changes the header of the request, though a reverse proxy would also be cool.
Edit: This is how I'm pointing my browser to my proxy. In Firefox, preferences -> advanced -> Network -> Settings
I tried to setting the HTTP Proxy under "Manual proxy configuration" to 127.0.0.1:8000 - that seems to do something, cuz all my pages fail to load, but I don't see any activity on my proxy server.
I also tried to just put 127.0.0.1:8000 under "Automatic proxy configuration URL" which sends a request when I just configure it, but nothing is proxied afterwards. I'm wonder what kind of response the "automatic" configuration is looking for...
The code you have written isn't a proxy server? It's just an HTTPd responder, which is why your curl script 'works' but firefox doesn't
Taking an example already online, http://catonmat.net/http-proxy-in-nodejs, you will see that as well as setting up the HTTPd in node, you have the dispatch HTTP calls to the server being proxied and drain that output back into the response to your browser.
In firefox, you want to set Manual Proxy configuration -> Http Proxy: 127.0.0.1 and your Port 8000
Check "Use this proxy server for all protocols"
That works for me :)
Maybe you have another server running on 8000 ?
To use Charles to capture traffic to localhost you need to use http://localhost./ (yes, with a dot on the end).
See the documentation here:
http://www.charlesproxy.com/documentation/faqs/localhost-traffic-doesnt-appear-in-charles