You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

VPNocchio

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

VPNocchio

Just a Python module suitable to use multiple OpenVPN connections at same time

0.0.24
pipPyPI
Maintainers
1

How to use::

from vpnocchio import VPN, init_logging
from threading import Thread

init_logging()

# set your dir with ovpn files, default is:
VPN.conf_dir = '/etc/openvpn
# set minimum seconds must elapse between reconnects
VPN.min_time_before_reconnect = 30

credentials = [('usr1', 'pwd1', 'Germany'),
               ('usr1', 'pwd2', 'Spain')]

def do_something(*args):
    vpn = VPN(*args)
    for one in range(2):
        # it has requests inside
        response = vpn.get('http://ip.barjomet.com')
        vpn.log.info('Hooray, here is desired data: %s',  response.text)
        vpn.new_ip()
    vpn.disconnect()

for username, password, match_config_name in credentials:
    Thread(target=do_something,
           args=(username,
                 password,
                 match_config_name)).start()

Keywords

vpn

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.