Skip to main content

Motivation

Basically Source game-servers works in one thread and can’t use more than one core for in-game logic. For example - CS:GO, CS:Source, Left 4 Dead 2, etc.

Yes, you can use SourceMod to offload calculations (use threading), but we talking about common game logic. E.g. you can try use DoS Protection extension, but caching is not fast solution, cause server spent time to receiving and sending answer from cache.

This solution allow redirect some (A2S query) packets to backend and game server don’t spent time to answer anymore.

IPTables (or any NAT) can’t help!

If you use IPTables (NAT) to redirect queries to proxy, this rule will be remembered in routing table and if client try to connect - connection will be redirected to proxy too.

We use right way to redirect - eBPF: https://github.com/sqproxy/sqredirect

Prerequisites

Python 3.7 or above

You can use pyenv to install any version of Python without root privileges

Installing

pip install source-query-proxy==2.5.0

Configuring

sqproxy search configs in /etc/sqproxy/conf.d and ./conf.d directories. You should place your config files only in this directories.

For more info see examples

Run

sqproxy run

Run with eBPF

Please read the instruction and install: https://github.com/sqproxy/sqredirect

  1. Enable eBPF in config (see examples/00-globals.yaml)

  2. Run

sqproxy run

Run daemonized via systemd

  1. Copy the systemd unit file examples/systemd/system/sqproxy.service to /etc/systemd/system/sqproxy.service (Optional: Adjust the ExecStart path if you have installed sqproxy into a different directory)

  2. Enable and start the service

systemctl enable --now sqproxy.service

Development

git clone https://github.com/spumer/source-query-proxy.git
cd source-query-proxy
poetry install

Credits

Source Engine messages inspired by Python-valve https://github.com/serverstf/python-valve

Metadata

Release files for source-query-proxy 2.5.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 source-query-proxy 2.5.0
File Size Uploaded Provenance
source_query_proxy-2.5.0.tar.gz 34.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for source-query-proxy 2.5.0
File Interpreter ABI Platform
source_query_proxy-2.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 71.1 kB

Release files / source_query_proxy-2.5.0.tar.gz

Download URL source_query_proxy-2.5.0.tar.gz
Size 34.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8d1fc6fb03ebb160f4ca5a553e37303b3f3fedd22559855b850456dcfce3e7da
BLAKE2b-256 checksum
How to use checksums
18be1e75af16fb1167dadb331829f288540c9e3086d63c3a38be5308507fb27f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.11.4 Darwin/22.5.0

Release files / source_query_proxy-2.5.0-py3-none-any.whl

Download URL source_query_proxy-2.5.0-py3-none-any.whl
Size 36.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c124406b2e323b498ce267f81dba249b83107238c815687804bedf40a070d97c
BLAKE2b-256 checksum
How to use checksums
1de4e78f1d712df3ae9a2ac607d111868eee917d247beda68b98f723ba9456a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.11.4 Darwin/22.5.0

Security for source-query-proxy 2.5.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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