简体   繁体   中英

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. Much like a VPN client such as Hotspot Shield or CyberGhost, but a custom-build client using the Python language?

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 . 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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