Giter Club home page Giter Club logo

random_mullvad_endpoints's Introduction

random_mullvad_endpoints

random_mullvad_endpoints reads JSON created by Mullvad's /relays/wireguard/v2 API endpoint and filters based on specified criteria. These include regular expressions for the location and provider. To present the final list of hostnames in a random order, it uses weighted random sampling without replacement.

Example usage

First, clone the repository and download the necessary JSON data.

$ git clone https://github.com/maybebyte/random_mullvad_endpoints
$ cd random_mullvad_endpoints
$ curl -o mullvad-wireguard-relays.json https://api.mullvad.net/public/relays/wireguard/v2

Now random_mullvad_endpoints can process the JSON. Here is a basic example that prints out only the hostnames of five active servers anywhere in the world:

$ ./random_mullvad_endpoints.py -aN mullvad-wireguard-relays.json
us-mia-wg-103
de-dus-wg-002
fr-par-wg-004
nl-ams-wg-101
nl-ams-wg-001

It's also possible to send the data directly to random_mullvad_endpoints:

$ curl -s https://api.mullvad.net/public/relays/wireguard/v2 | ./random_mullvad_endpoints.py -aN
es-vlc-wg-001
de-fra-wg-304
rs-beg-wg-101
sg-sin-wg-002
nl-ams-wg-006

More examples are available in the man page.

Running tests

To run tests, execute this in the root of the project directory:

$ python3 -m pytest

Documentation

You can use mandoc to read the manual page provided in the docs directory.

$ mandoc -l docs/random_mullvad_endpoints.1

There is also a generated Markdown file in the same directory so you can read the man page on GitHub.

random_mullvad_endpoints's People

Contributors

maybebyte avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.