Skip to main content

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()

Metadata

Release files for VPNocchio 0.0.24

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for VPNocchio 0.0.24
File Size Uploaded
VPNocchio-0.0.24.tar.gz 5.0 kB Details

Release files / VPNocchio-0.0.24.tar.gz

Download URL VPNocchio-0.0.24.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2c7e8897ad6b4cde943b4019ae8480cdfd4960fd6dfcf3844e3ac43eacbc9a00
BLAKE2b-256 checksum
How to use checksums
7a2b4ea8e2ecd65061995d9adb8d1ba859162cc136072e917b8344d1dc366dc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.24 This release

1 release file

0.0.23

1 release file

0.0.22

1 release file

0.0.21

1 release file

0.0.20

1 release file

0.0.19

1 release file

0.0.18

1 release file

0.0.17

1 release file

0.0.16

1 release file

0.0.15

1 release file

0.0.14

1 release file

0.0.13

1 release file

0.0.12

1 release file

0.0.7

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page