简体   繁体   English

Erlang中的反向代理/转发HTTP请求

[英]Reverse Proxy/Forward HTTP Requests in Erlang

I have searched the web and found inets and mod_esi, however I need to build a module that takes a HTTP request to http://localhost:8000 and then reverse proxies it to http://localhost:9000 without doing a HTTP forward, as I need the proxied server to be anonymous to the requester at all times. 我已经在网上搜索并找到了inets和mod_esi,但是我需要构建一个模块,该模块将HTTP请求发送到http://localhost:8000 ,然后将其反向代理到http://localhost:9000而无需进行HTTP转发,因为我需要代理服务器始终对请求者匿名。

Something similar implemented in Node.JS can be found: https://github.com/nodejitsu/node-http-proxy . 可以在Node.JS中实现类似的东西: https : //github.com/nodejitsu/node-http-proxy

Can anybody point me in the right direction? 有人能指出我正确的方向吗?

The Yaws web server supports both forward and reverse proxies. Yaws Web服务器支持正向和反向代理。 Maybe you can have a look at the Yaws source code for inspiration. 也许您可以查看Yaws源代码以获得灵感。

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

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