Skip to main content

An implementation of a Wisp proxy server in Python

Project description

Python Wisp Server

This is an implementation of a Wisp server, written in Python. It follows the Wisp v1 spec completely, including support for UDP connections.

Installation:

Install From Source:

Clone this repository and cd into it, then run the following commands:

python3 -m venv .venv
source .venv/bin/activate
pip3 install -e .

Install From PyPI:

Run the following command to install this program:

pip3 install wisp-python

Running the Server:

For the best performance use CPython 3.11 or newer. PyPy is not recommended as it is a lot slower than CPython here.

To start the server, run python3 -m wisp.server. The program accepts the following arguments:

usage: wisp-server-python [-h] [--host HOST] [--port PORT] [--static STATIC] [--limits] [--bandwidth BANDWIDTH] [--connections CONNECTIONS] [--window WINDOW] [--allow-loopback] [--allow-private] [--log-level LOG_LEVEL]
                          [--threads THREADS] [--proxy PROXY] [--block-udp] [--block-tcp]

A Wisp server implementation, written in Python (v0.8.3)

options:
  -h, --help            show this help message and exit
  --host HOST           The hostname the server will listen on.
  --port PORT           The TCP port the server will listen on.
  --static STATIC       Where static files are served from.
  --limits              Enable rate limits.
  --bandwidth BANDWIDTH
                        Bandwidth limit per IP, in kilobytes per second.
  --connections CONNECTIONS
                        New connections limit per IP.
  --window WINDOW       Fixed window length for rate limits, in seconds.
  --allow-loopback      Allow connections to loopback IP addresses.
  --allow-private       Allow connections to private IP addresses.
  --log-level LOG_LEVEL
                        The log level (either debug, info, warning, error, or critical).
  --threads THREADS     The number of threads to run the server on. By default it uses all CPU cores. (Linux only)
  --proxy PROXY         The url of the socks5h, socks5, sock4a, socks4 or http proxy to use.
  --block-udp           Block UDP streams.
  --block-tcp           Block TCP streams.

Roadmap:

  • Rate limits
  • JSON based config files
  • UDP support
  • Ability to block local addresses
  • Wisp v2 support

Copyright:

This repository is licensed under the GNU AGPL v3.

A few third party libraries are used. See LICENSE_third_party.md.

Copyright Notice:

wisp-server-python: a Wisp server implementation written in Python
Copyright (C) 2025 Mercury Workshop

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wisp_python-0.8.3.tar.gz (26.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wisp_python-0.8.3-py3-none-any.whl (28.0 kB view details)

Uploaded Python 3

File details

Details for the file wisp_python-0.8.3.tar.gz.

File metadata

  • Download URL: wisp_python-0.8.3.tar.gz
  • Upload date:
  • Size: 26.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for wisp_python-0.8.3.tar.gz
Algorithm Hash digest
SHA256 caeb755bceda4b392b0e330d5859986bfc9cf198615a31df4eb9b2c4409baaad
MD5 b6c1fd9ab93d56a60181454fc8922e5b
BLAKE2b-256 95db4f760d5e55f198b5c739335dc8ea92331fb09f72b6e3a0133ff6eb777ad2

See more details on using hashes here.

File details

Details for the file wisp_python-0.8.3-py3-none-any.whl.

File metadata

  • Download URL: wisp_python-0.8.3-py3-none-any.whl
  • Upload date:
  • Size: 28.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for wisp_python-0.8.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9b1f9d9b9b4161ecf671c1c65fbdabf8bebdd43cb98f02d13bfe614e03c65fdb
MD5 5e47ea6d852bec97f2288c43a457355a
BLAKE2b-256 d9d3567af4cd2874a6a495aa3bbae8aa8b6a76363645348ada7a354f5ea6c1e1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page