Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 1 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.4%) to scientific vocabulary
Repository
Simple IP rotation using python.
Basic Info
- Host: GitHub
- Owner: ivory-tower-private-power
- License: apache-2.0
- Language: Python
- Default Branch: main
- Size: 252 KB
Statistics
- Stars: 2
- Watchers: 0
- Forks: 1
- Open Issues: 2
- Releases: 4
Metadata Files
README.md
![]()
sirup: simple IP rotation using python
A wrapper around the openvpn CLI to connect to VPN servers and rotate the IP address in python programs.
What is required
- An account with a VPN service that supports openvpn (for instance ProtonVPN or surfshark).
- A linux OS with superuser rights.
openvpnfor linux. See here for installation instructions.
How to install
To install from pip, do:
console
python -m pip install sirup
To install sirup from GitHub repository, do:
console
python -m pip install 'sirup @ git+https://github.com/ivory-tower-private-power/sirup'
How to use sirup
The package has two functionalities: connecting to a VPN server, and rotating the IP address.
1. Start up
This step is necessary for both functionalities.
```python import os import getpass import time
seed = 123 mypass = "/path/to/credentials.txt" # the user name and password credentials from your user account with the VPN service config_path = "/path/to/config/files/" # the .opvn configuration files from your VPN service ```
Functionality 1: Connecting to a single VPN server
The sirup.VPNConnector.VPNConnector class has two methods: connect and disconnect. They are used as follows.
```python from sirup.VPNConnector import VPNConnector
configfile = os.path.join(configpath, "name-of-one-config-file.ovpn") pwd = getpass.getpass()
connector = VPNConnector(authfile=mypass, configfile=config_file)
connector.connect(pwd=pwd)
time.sleep(10) connector.disconnect(pwd=pwd) ```
Functionality 2: Using the IP rotation feature
The sirup.IPRotator.IPRotator class has three methods: connect(), rotate(), disconnect(). They are used as follows.
```python from sirup.IPRotator import IPRotator
rotator = IPRotator(authfile=mypass, configlocation=config_path, seed=seed) # will ask for the sudo password
rotator.connect() print(rotator.connector.current_ip)
rotator.rotate() print(rotator.connector.current_ip)
rotator.disconnect() ```
Note
Before using the package, have a look at "Making sure the VPN connection works correctly" to make sure the VPN service works properly.
Documentation
The documentation of sirup can be found on Read the Docs.
Contributing
If you want to contribute to the development of sirup, have a look at the contribution guidelines.
Credits
This package was created with Cookiecutter and the NLeSC/python-template.
The logo was generated using Chat-GPT and Micorosoft Co-Pilot on July 18th 2024 at 9:32am using this prompt.
Owner
- Name: ivory-tower-private-power
- Login: ivory-tower-private-power
- Kind: organization
- Location: Netherlands
- Repositories: 1
- Profile: https://github.com/ivory-tower-private-power
Citation (CITATION.cff)
# YAML 1.2
---
cff-version: "1.2.0"
title: "sirup"
authors:
-
family-names: Hafner
given-names: Flavio
orcid: "https://orcid.org/0009-0000-5893-9000"
date-released: 2024-03-21
doi: 10.5281/zenodo.10261948
version: "0.2.4"
repository-code: "git@github.com:ivory-tower-private-power/sirup"
keywords:
- ip-rotation
- openvpn
message: "If you use this software, please cite it using these metadata."
license: Apache-2.0
GitHub Events
Total
Last Year
Packages
- Total packages: 1
-
Total downloads:
- pypi 39 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 4
- Total maintainers: 1
pypi.org: sirup
Simple IP rotation using python.
- Homepage: https://github.com/ivory-tower-private-power/sirup
- Documentation: https://sirup.readthedocs.io/
- License: Apache Software License
-
Latest release: 0.2.4
published almost 2 years ago
Rankings
Maintainers (1)
Dependencies
- actions/checkout v3 composite
- actions/setup-python v3 composite
- actions/checkout v3 composite
- citation-file-format/cffconvert-github-action main composite
- actions/checkout v2 composite
- actions/setup-python v2 composite
- actions/checkout v3 composite
- gaurav-nelson/github-action-markdown-link-check v1 composite
- SonarSource/sonarcloud-github-action master composite
- actions/checkout v3 composite
- actions/setup-python v3 composite
- actions/checkout v4 composite
- actions/download-artifact v3 composite
- actions/setup-python v4 composite
- actions/upload-artifact v3 composite
- pypa/gh-action-pypi-publish release/v1 composite