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:
Section titled “Installation:”Install From Source:
Section titled “Install From Source:”Clone the repository and cd into it, then run the following commands:
python3 -m venv .venv
source .venv/bin/activate
pip3 install -e .
Install From PyPI:
Section titled “Install From PyPI:”Run the following command to install this program:
pip3 install wisp-python
Running the Server:
Section titled “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.1)
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:
Section titled “Roadmap:”Rate limits- JSON based config files
UDP supportAbility to block local addresses- Wisp v2 support