sirup

Simple IP rotation using python.

https://github.com/ivory-tower-private-power/sirup

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
Last synced: 9 months ago · JSON representation ·

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
Created almost 3 years ago · Last pushed almost 2 years ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation Zenodo

README.md

build Documentation Status workflow scc badge fair-software badge DOI

icon

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.
  • openvpn for 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

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.

  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 39 Last month
Rankings
Dependent packages count: 10.1%
Average: 38.7%
Dependent repos count: 67.2%
Maintainers (1)
Last synced: 10 months ago

Dependencies

.github/workflows/build.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
.github/workflows/cffconvert.yml actions
  • actions/checkout v3 composite
  • citation-file-format/cffconvert-github-action main composite
.github/workflows/documentation.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
.github/workflows/markdown-link-check.yml actions
  • actions/checkout v3 composite
  • gaurav-nelson/github-action-markdown-link-check v1 composite
.github/workflows/sonarcloud.yml actions
  • SonarSource/sonarcloud-github-action master composite
  • actions/checkout v3 composite
  • actions/setup-python v3 composite
.github/workflows/release.yml actions
  • 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