source-query-proxy


Namesource-query-proxy JSON
Version 2.5.0 PyPI version JSON
download
home_pagehttps://github.com/sqproxy/sqproxy
SummaryAsync proxy for Source Engine Query Protocol
upload_time2023-08-26 13:03:00
maintainer
docs_urlNone
authorspumer
requires_python>=3.7,<4.0
licenseGPL-3.0
keywords valve source engine proxy query cache
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            
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 <https://forums.alliedmods.net/showpost.php?p=2518787&postcount=117>`_, 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 <https://github.com/pyenv/pyenv>`_ to install any version of Python without root privileges

Installing
----------

.. code-block:: bash

    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 <examples/conf.d>`_

Run
---

.. code-block:: bash

    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

.. code-block:: bash

    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

.. code-block:: bash

    systemctl enable --now sqproxy.service


Development
-----------

.. code-block:: bash

    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


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/sqproxy/sqproxy",
    "name": "source-query-proxy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "valve,source,engine,proxy,query,cache",
    "author": "spumer",
    "author_email": "spumer-tm@yandex.ru",
    "download_url": "https://files.pythonhosted.org/packages/18/be/1e75af16fb1167dadb331829f288540c9e3086d63c3a38be5308507fb27f/source_query_proxy-2.5.0.tar.gz",
    "platform": null,
    "description": "\nsource-query-proxy\n==================\n\nMotivation\n----------\n\nBasically Source game-servers works in one thread and can't use more than one core for in-game logic.\nFor example - CS:GO, CS:Source, Left 4 Dead 2, etc.\n\nYes, you can use SourceMod to offload calculations (use threading), but we talking about common game logic.\nE.g. you can try use `DoS Protection extension <https://forums.alliedmods.net/showpost.php?p=2518787&postcount=117>`_, but caching is not fast solution, cause server spent time to receiving and sending answer from cache.\n\nThis solution allow redirect some (A2S query) packets to backend and game server don't spent time to answer anymore.\n\n\nIPTables (or any NAT) can't help!\n---------------------------------\n\nIf 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.\n\nWe use right way to redirect - eBPF: https://github.com/sqproxy/sqredirect\n\nPrerequisites\n-------------\n\nPython 3.7 or above\n\nYou can use `pyenv <https://github.com/pyenv/pyenv>`_ to install any version of Python without root privileges\n\nInstalling\n----------\n\n.. code-block:: bash\n\n    pip install source-query-proxy==2.5.0\n\nConfiguring\n-----------\n\nsqproxy search configs in ``/etc/sqproxy/conf.d`` and ``./conf.d`` directories.\nYou should place your config files only in this directories.\n\nFor more info see `examples <examples/conf.d>`_\n\nRun\n---\n\n.. code-block:: bash\n\n    sqproxy run\n\n\nRun with eBPF\n-------------\n\nPlease read the instruction and install: https://github.com/sqproxy/sqredirect\n\n1. Enable eBPF in config (see ``examples/00-globals.yaml``)\n\n2. Run\n\n.. code-block:: bash\n\n    sqproxy run\n\nRun daemonized via systemd\n--------------------------\n\n1. 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)\n\n2. Enable and start the service\n\n.. code-block:: bash\n\n    systemctl enable --now sqproxy.service\n\n\nDevelopment\n-----------\n\n.. code-block:: bash\n\n    git clone https://github.com/spumer/source-query-proxy.git\n    cd source-query-proxy\n    poetry install\n    \n\nCredits\n-------\n\nSource Engine messages inspired by **Python-valve**\nhttps://github.com/serverstf/python-valve\n\n",
    "bugtrack_url": null,
    "license": "GPL-3.0",
    "summary": "Async proxy for Source Engine Query Protocol",
    "version": "2.5.0",
    "project_urls": {
        "Homepage": "https://github.com/sqproxy/sqproxy"
    },
    "split_keywords": [
        "valve",
        "source",
        "engine",
        "proxy",
        "query",
        "cache"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1de4e78f1d712df3ae9a2ac607d111868eee917d247beda68b98f723ba9456a1",
                "md5": "a2961377be3a75147a3ea0ada4a0192a",
                "sha256": "c124406b2e323b498ce267f81dba249b83107238c815687804bedf40a070d97c"
            },
            "downloads": -1,
            "filename": "source_query_proxy-2.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a2961377be3a75147a3ea0ada4a0192a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 36809,
            "upload_time": "2023-08-26T13:02:58",
            "upload_time_iso_8601": "2023-08-26T13:02:58.329985Z",
            "url": "https://files.pythonhosted.org/packages/1d/e4/e78f1d712df3ae9a2ac607d111868eee917d247beda68b98f723ba9456a1/source_query_proxy-2.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "18be1e75af16fb1167dadb331829f288540c9e3086d63c3a38be5308507fb27f",
                "md5": "dca7a43306dfe895f58706cb652a873b",
                "sha256": "8d1fc6fb03ebb160f4ca5a553e37303b3f3fedd22559855b850456dcfce3e7da"
            },
            "downloads": -1,
            "filename": "source_query_proxy-2.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "dca7a43306dfe895f58706cb652a873b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 34308,
            "upload_time": "2023-08-26T13:03:00",
            "upload_time_iso_8601": "2023-08-26T13:03:00.299364Z",
            "url": "https://files.pythonhosted.org/packages/18/be/1e75af16fb1167dadb331829f288540c9e3086d63c3a38be5308507fb27f/source_query_proxy-2.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-26 13:03:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sqproxy",
    "github_project": "sqproxy",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": true,
    "lcname": "source-query-proxy"
}
        
Elapsed time: 0.15125s