Skip to main content

PadRelay

Forward physical gamepad input to a virtual Xbox 360 or DualShock 4 controller on a Windows PC. The client reads input with pygame; the server uses vgamepad and ViGEmBus. Requires Python 3.11+.

Mode Input Control and login Firewall
TCP (default) Ordered JSON stream over TLS Same TLS stream TCP port
UDP v2 AES-256-GCM datagrams with replay checks Verified TLS on the same port number TCP and UDP port

One server process owns one virtual gamepad and admits one pending or authenticated client. UDP still requires a password and server certificate trust; legacy bearer tokens and unauthenticated UDP are rejected. See the 3.0.0 migration notes before upgrading older peers.

Install

In an activated Python environment:

python -m pip install padrelay

On the Windows server, install the server extra and the ViGEmBus driver:

python -m pip install "padrelay[server]"

See the installation guide for source installs, drivers and environment checks. Current repository behavior may differ from an older published package; use compatible builds on both peers.

First Connection

  1. Follow the quick start with separate server and client INI files. For remote clients, bind the server to its LAN address or 0.0.0.0; the built-in default is local-only.
  2. Start the server. Copy its public server.crt to the client through a trusted channel; keep server.key on the server.
  3. Set the client's ca_path to that trusted copy. With the generated localhost certificate reached through a LAN IP, set server_hostname = localhost.
  4. Run padrelay-client --config client.ini and check the virtual device in Windows joy.cpl.

The server's default identity lives in ~/.padrelay/certs/. Both peers use the same password, or the client uses the server's exact encoded hash. Credential precedence and INI migration are in the configuration reference.

For UDP, change both peers to protocol = udp, allow both port protocols and set a suitable server packet budget, normally max_requests = 6000 at 60 Hz. An explicit TCP value of 100 in a copied INI is not replaced automatically. Sessions reconnect after ten minutes with a new key. TLS cannot be disabled for UDP, even over a VPN.

Documentation

SDL-recognized controllers map automatically. For custom bindings or calibration, run padrelay-keymapper --joystick-index 0 --output controller_profile.json, then select it with padrelay-client --controller-profile controller_profile.json. Profiles belong on the client. Protocol 2.0 requires updating both peers; legacy server mapping/calibration sections are rejected. D-pad hats and DS4 PS are handled through the canonical state and output adapter.

Logs default to ~/.padrelay/logs/padrelay.log. Set PADRELAY_DEBUG=1 for diagnostics or PADRELAY_LOG_DIR to change the directory. The CLI has no --version flag; use python -m pip show padrelay.

Development

From an activated .venv in a checkout:

python -m pip install -e ".[dev]"

The development guide lists the checks and documentation build commands. Run Tests checks Python 3.11 when started manually through Run workflow or after a maintainer approves the current PR commit. Pushes and opening a PR do not trigger tests. Documentation and package publishing are manual workflows.

PadRelay is licensed under the MIT License. Report vulnerabilities privately through the contribution guide.

Metadata

Release files for padrelay 3.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for padrelay 3.0.0
File Size Uploaded Provenance Actions
padrelay-3.0.0.tar.gz 78.1 kB With provenance Details for padrelay-3.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for padrelay 3.0.0
File Interpreter ABI Platform Actions
padrelay-3.0.0-py3-none-any.whl Python 3 none any Details for padrelay-3.0.0-py3-none-any.whl

Total release size: 127.5 kB

Release files / padrelay-3.0.0.tar.gz

Download URL padrelay-3.0.0.tar.gz
Size 78.1 kB
Tags Source
SHA-256 checksum
How to use checksums
857b126b2abd745d46dca5cdbd4b919599504aaea97f5bdcc009d49aae96ff5b
BLAKE2b-256 checksum
How to use checksums
2c92d2f9fcaedf412aeb5b74c9bf1d7ae54cf5c7473c5e095ba7e333e0556073
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Release files / padrelay-3.0.0-py3-none-any.whl

Download URL padrelay-3.0.0-py3-none-any.whl
Size 49.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3e5cc5001f58cc765cc761493d6ef224afb3fac1669a05777f14771c6482e205
BLAKE2b-256 checksum
How to use checksums
80fe14e72c18fe993704ff0cfccc05813667fa7d4dd08993836a12b00cebf6d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

Security for padrelay 3.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for padrelay-3.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page