开发代码时如何模拟防火墙和代理?
我正在编写经常必须在受限环境中工作的代码。我有时在家里编码,它运行得很好,但当我在工作中测试它时,McAfee 或其他一些防火墙会阻止它。 有时无法禁用此类保护。
我需要一个适合我的家庭开发环境的测试套件,我可以在其中模拟所有这些限制,而无需自己安装所有这些限制(例如,根据我的经验,一旦安装了 mcafee,就很难/不可能清除它的所有痕迹)。我还需要模拟代理服务器。
如果有帮助的话,我正在用 Java 编写代码。
[编辑:所以一些 Java 库会很棒]
I am writing code that often has to work in restricted environment. I sometimes code at home, where it works nicely and the moment I put it to test at work, McAfee or some other firewall blocks it.
Sometimes it is not possible to disable such protection.
I need a test suite for my home development environment where I can simulate all these restrictions without having to install all of them myself (for instance it is my experience that it is very hard/impossible to clean all traces of mcafee once you have installed it). I also need to simulate proxy servers.
I am writing code in Java if it helps.
[EDIT: so some Java library for this would be great]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用 VMware(或 VirtualBox)进行不同的测试设置。
You could use VMware (or VirtualBox) with different test-setups.
尝试 node.js。另请查看示例代理实现
Try node.js. Also have a look at a sample proxy implementation