node-http-proxy
node-http-proxy copied to clipboard
Doesn't it unblock restricted websites?
I have made a simple proxy and using the following code to redirect the requests.
proxy.web(req, res, {changeOrigin: true, target: requested_host})
Whenever I set target a unrestricted site (e.g. https://google.com) it works fine. Everything is as it should be. But when I target a site that is restricted in our country, the proxy also cannot unblock that site.
I am hosting it on Heroku Server
Just some thoughts I have:
- See if you can find out where the Heroku server is located. I think it is either the Americas and Europe. In either case, Heroku should be able to reach the restricted site.
- Check the logs on Heroku and see if you can view raw HTML from the restricted site. This will confirm if Heroku is able to reach the restricted site. You may need to use console.log to output the response Heroku receives.
- Check that you are using HTTPS for everything. It is possible that the response headers are being intercepted and the response to your network blocked due to the response header having the url to the restricted site in it. Check the request headers as well for anything the firewall might be using to block the request.
Depending on what you find from these experiments, you may need to further encrypt the headers or request and response content. If that works, then great. If not, then a VPN may do a much better job at this than a proxy. Also, check out Epic browser. It has a built in encrypted proxy that can circumvent these kinds of things. Also, you can try TOR from the Brave Browser.