简体   繁体   English

如何通过Python连接到VPN /代理服务器?

[英]How to connect to a VPN/Proxy server via Python?

Okay so i know that you can route web-requests through a proxy in Python, is there any way to route ALL traffic from your system through a server. 好的,我知道您可以通过Python中的代理路由Web请求,有没有办法通过服务器路由来自系统的所有流量。 Much like a VPN client such as Hotspot Shield or CyberGhost, but a custom-build client using the Python language? 与VPN客户端(例如Hotspot Shield或Cyber​​Ghost)非常相似,但是使用Python语言的自定义客户端?

Any links/help is greatly appreciated. 任何链接/帮助,不胜感激。

Thanks. 谢谢。

The short answer is no. 最简洁的答案是不。

The long answer is: network routing is managed by OS and could be managed by other utilities, like iptables . 长答案是:网络路由由OS管理,并且可以由其他实用程序(如iptables Adding such capabilities to standard libraries is out of the scope of programming language. 将此类功能添加到标准库超出了编程语言的范围。 So, what you are probably looking for is a binding of a VPN library (eg libpptp) or making syscalls in Cython, which is not much different than writing in C. 因此,您可能正在寻找的是绑定VPN库(例如libpptp)或在Cython中进行系统调用,这与用C编写没有太大区别。

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

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