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 2.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

To configure a controller, run padrelay-keymapper --output controller.ini and merge its mapping sections into the server configuration. Hat-only D-pads are not currently applied to virtual output; see the mapping guide for limits.

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 2.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 2.0.0
File Size Uploaded Provenance Actions
padrelay-2.0.0.tar.gz 70.2 kB With provenance Details for padrelay-2.0.0.tar.gz

Built distribution (wheel)

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

Total release size: 119.4 kB

Release files / padrelay-2.0.0.tar.gz

Download URL padrelay-2.0.0.tar.gz
Size 70.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c3b8c9d3d7831e17fabecc2b3b47c95ce7372dde08200de802a747e1702dddb0
BLAKE2b-256 checksum
How to use checksums
1bd003884f132d8e3d2daf4d9d901cb139563e470eeda1d4186c802b4adda1dc
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-2.0.0-py3-none-any.whl

Download URL padrelay-2.0.0-py3-none-any.whl
Size 49.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
78b8162cefdf29e0e5360e6fe576a2b312d89300ab2c2c21db93246bb1d6d13d
BLAKE2b-256 checksum
How to use checksums
a9099e711abf2f6d08ca988af0aa1e55754bd3f07fa4b73d802f1e36b60df979
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 2.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-2.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