Erlang 中通过代理进行 HTTP 请求
我想编写一个通用服务器,它可以通过代理产生许多 HTTP/HTTPS 请求,其方式是:每个 HTTP 请求都通过不同的代理。我该怎么办?似乎可以通过某个特定代理来隧道所有流量,但我想在每个请求上更改代理(例如从包含“109.121.144.17:8008”等行的文件中读取)。
有人知道该怎么做吗?我尝试了标准 httpc 模块,但我找不到如何以我想要的方式使用它的信息。
I would like to write a generic server that could spawn many HTTP/HTTPS requests through a proxy, in a manner: every HTTP request through different proxy. How can I do it ? It seems that it is possible to tunnel all traffic through some one, specific proxy, but I would like to change proxy on every request (ex. reading from file containing lines like "109.121.144.17:8008").
Does anybody know how to do it ? I tried standard httpc module but I cannot find info how to use it in the way I would like to.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否考虑过使用 ibrowse?您可以在每个请求上指定代理设置,例如:
Have you considered using ibrowse? You can specify the proxy settings on each request like: