Code Monkey home page Code Monkey logo

source-query-proxy

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

sqproxy's Projects

sqproxy icon sqproxy

Offloading Source Engine query packets (A2S) handling. Rate limits, statistics, customization

sqredirect icon sqredirect

Redirection and filtering Source Engine game traffic in bundle with sqproxy

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.