Python Create a host-only VPN connection

I want to create a VPN connection with a Python script for only a few Python Sockets. I need to tunnel only the traffic of this script through the VPN, as the proxy does.
Is there an API?

I can’t change the configuration of the machine because the user may not want to create a VPN that tunnels its traffic.

+6
source share
1 answer

What you want is not a VPN, it is an IP forward port, a proxy:

http://voorloopnul.com/blog/a-python-proxy-in-less-than-100-lines-of-code/

If a secure connection between the two hosts is required, you can use the SSH port forward:

http://www.debianadmin.com/howto-use-ssh-local-and-remote-port-forwarding.html

+2
source

Source: https://habr.com/ru/post/950417/


All Articles