构建 VPN - 如何以及从哪里开始
我想编写一个简单的 VPN 作为我课程作业的一部分。我正在寻找开始的方法。如果你们能帮助我提供资源,将会很有帮助
I want to code a simpe vpn as a part of my course work. I am looking for ways to start. Will be helpful if you guys could help me with resources
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
作为基本起点,您需要能够使用您选择的语言编写通过 IP 传输的客户端/服务器设置。您的 VPN 还必须能够为操作系统提供网络接口。如果您使用 Linux,我建议使用 tun/tap 系统接口。作为参考,您可以查看 qemu 中使用这些操作系统调用的代码。出于加密目的,OpenSSL 库应该能够为您提供所有必要的调用。
我不确定你的课程作业的最终要求是什么。您可以构建任何东西,从可以快速破解的基本共享对称密钥设置到尝试构建值得生产的 VPN 系统的无底洞。你应该提到你的要求。
As a basic starting point, you need to be able to write a client/server setup in your language of choice that will transport over IP. Your VPN must also be able to present the operating system with a network interface. If you are using Linux, I suggest the tun/tap system interface. For reference, you could look at the code in qemu which does make use of those OS calls. For the encryption purposes, the OpenSSL library should be able to provide you with all the calls necessary.
I'm not sure what the ultimate requirements of your coursework are. You can build anything from a basic shared-symmetric key setup that can be quickly hacked up to the bottomless pit of trying to build a production worthy VPN system. You should mention your requirements.