简体   繁体   English

支持 HTTPS 的 nodejs 代理服务器

[英]nodejs proxy server with HTTPS support

I want to create a proxy server with nodejs, it could be a web-proxy(like glype in php) or a proxy which we enter in browser.我想用 nodejs 创建一个代理服务器,它可以是一个网络代理(如 php 中的 glype)或我们在浏览器中输入的代理。

The main motive is to save specific files(that match certain mime type) to HDD.主要动机是将特定文件(匹配特定 mime 类型)保存到 HDD。

First of all I tried to use http-proxy module but it didn't allowed me to create a proxy server that accepts HTTPS.首先,我尝试使用http-proxy模块,但它不允许我创建接受 HTTPS 的代理服务器。 Also I didn't found any way to save files.(please correct me If I'm wrong)我也没有找到任何保存文件的方法。(如果我错了,请纠正我)

Then, I tried node-unblocker , its just perfect but the only problem is its Limitations(listed here ).然后,我尝试了node-unblocker ,它非常完美,但唯一的问题是它的局限性(在此处列出)。

Please, could somebody help me out in doing this.拜托,有人能帮我做这件事吗?

Keep in mind that, by default, your proxy solution wouldn't be able to eavesdrop https traffic as that would be considered a security breach .请记住,默认情况下,您的代理解决方案将无法窃听 https 流量,因为这会被视为安全漏洞 More precisely, you'd be doing #2 of this list .更准确地说,您将执行此列表的#2。

You could theoretically implement a solution where your proxy server has its own SSL certificate and you include it in your trusted CA list in all the devices you plan on using this proxy.理论上,您可以实施一个解决方案,其中您的代理服务器拥有自己的 SSL 证书,并将其包含在您计划使用此代理的所有设备中的受信任 CA 列表中。 Much like Charles Proxy , Fiddler and other proxy programs do for debugging purposes.就像Charles ProxyFiddler和其他代理程序用于调试目的一样。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM