我需要一个与浏览器兼容的代理来执行此操作
我正在寻找可以执行此操作的代理服务器。
如果我将 Firefox 设置设置为该代理,然后转到 google,那么它应该正常“代理”到 google。 只是一个普通的代理。
但我希望有规则。 我想将任何与 http://google.com/... 匹配的内容重定向到 http:// /12.34.56.78/...
我正在考虑写一个,但说实话,必须有一些东西可以做到这一点。
I am looking for a proxy server that can do this.
If I set my firefox settings to that proxy, and go to google, then it should "proxy" to google normally. Just a normal proxy.
But I want there to be rules. I want to redirect anything that matches http://google.com/... to http://12.34.56.78/...
I was thinking about writing one but to be honest there has to be something to do this already built.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Fiddler 应该做你想做的事。 如果您在底部的黑框中输入“overridehost google.com 12.34.56.78”,它应该将所有 Google 请求重定向到指定的 IP。
Fiddler should do what you want. If you type into the black box at the bottom "overridehost google.com 12.34.56.78" it should redirect any Google requests to the specified IP.
本身不是代理,但是编辑本地主机文件怎么样? 如果您是 Windows 用户,只需转到“C:\WINDOWS\system32\drivers\etc”并相应地编辑“hosts”文件。 例如。 添加新行:
我知道使用是有限的,因为您无法进行更复杂的重定向。 不过,这可能足以解决您的问题。 祝你好运! (在 linux/unix 上,该文件通常位于 /etc/hosts 中)。
如果您想要更好的解决方案,向我们提供您的操作系统将会很有帮助。
Not a proxy per se, but what about editing your local host file? If you are a Windows user just go to "C:\WINDOWS\system32\drivers\etc" and edit the "hosts" file accordingly. Eg. add a new line:
I know the use is limited, because you cannot make more complex redirects. However it might be sufficient for your problem. Good luck! (on linux/unix the file is often located in /etc/hosts).
If you want a better solution, it would be helpful to give us your OS.