V
V
Vasily Ivanov2021-04-15 14:01:23
Python
Vasily Ivanov, 2021-04-15 14:01:23

How to connect to vpn server?

I have a script that fetches https://www.vpngate.net/en/ HostName, IP,Score, Ping, Speed, CountryLong, CountryShort, NumVpnSessions, Uptime, TotalUsers, TotalTraffic, LogType, Operator, Message, OpenVPN_ConfigData_Base64

servers = []
    list_cvs = str(urllib.request.urlopen("http://www.vpngate.net/api/iphone/").read())
    list_cvs = list_cvs.replace("\\r", "").split('\\n')[2:-2]

    for server in list_cvs:
        vpn_server = server.split(',')
        tmp = {
            'HostName': vpn_server[0],
            'IP': vpn_server[1],
            'Score': vpn_server[2],
            'Ping': vpn_server[3],
            'Speed': vpn_server[4],
            'CountryLong': vpn_server[5],
            'CountryShort': vpn_server[6],
            'NumVpnSessions': vpn_server[7],
            'Uptime': vpn_server[8],
            'TotalUsers': vpn_server[9],
            'TotalTraffic': vpn_server[10],
            'LogType': vpn_server[11],
            'Operator': vpn_server[12],
            'Message': vpn_server[13],
            'OpenVPN_ConfigData_Base64': vpn_server[14]
        }
        servers.append(tmp)
    return servers


How can I connect to a vpn server without openvpn. In the future, I want to use the received ip to send requests to other resources (for parsers).

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Tikhonov, 2021-04-15
@tumbler

OpenVPN_ConfigData_Base64

This directly hints at the use of OpenVPN. And a quick search on SO hints that other than calling the child process of connection, there is no particular possibility.
Yes, and I would not hope, OpenVPN creates a separate network interface in the system and forwards the necessary routes through it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question