No project description provided
Project description
sqredirect
Redirection and filtering Source Engine game traffic in a bundle with sqproxy
How it Works?
sqredirect attach eBPF filter(s) to network interface and manipulate with traffic targeting to game ports
eBPF is more efficient way to check/accept/drop packets in Linux
Requirements
- Linux
- Kernel version >= 4.4, check your by command: uname -r
- python2 or python3
Installation
Step 1: Install bcc-tools
- bcc-tools >= 0.10.0 (depends on Kernel version, see https://github.com/iovisor/bcc/releases)
- Install instruction (non-Debian 10)
- Install instruction (Debian 10)
- You can check the current version via
python -c 'import bcc; print(bcc.__version__);'
Usage
Automatically
Only by SQProxy
Non-root running
bcc-tools can't be used w/o root, see https://github.com/iovisor/bcc/issues/1166
But you can use this snippet to restrict usage only to specified user/group:
TL;DR: move python redirect.py $@
to command and add permissions in /etc/sudoers
-
Copy content of this folder to
/usr/src/sqredirect
-
Create file in
/usr/local/bin/sqredirect
with content:#!/bin/bash cd /usr/src/sqredirect exec python2 /usr/src/sqredirect/redirect.py $@
-
chmod +x /usr/local/bin/sqredirect
-
Create group network and add user to group
addgroup network usermod -aG network <user-which-should-it-run>
-
Allow run
sqredirect
command w/o root privilegesecho "%network ALL=(root) NOPASSWD: /usr/local/bin/sqredirect" > /etc/sudoers.d/network
More about sudoers: https://www.digitalocean.com/community/tutorials/how-to-edit-the-sudoers-file
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sqredirect-1.1.1.tar.gz
.
File metadata
- Download URL: sqredirect-1.1.1.tar.gz
- Upload date:
- Size: 18.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.7.8 Darwin/20.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e872297c0cc5499a83be7485bba3543d75a7d3ae029b6238da51d03c9b3e057c |
|
MD5 | 08be86af558d4815ac8b9562b1220dbe |
|
BLAKE2b-256 | 87aa858a439d0b177ff65d43d91706d904f5c851d41633b7c7fbb15caa0e0636 |
File details
Details for the file sqredirect-1.1.1-py2.py3-none-any.whl
.
File metadata
- Download URL: sqredirect-1.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 19.1 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.7.8 Darwin/20.3.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83056ac12e5a22ce40f993d5702de0d0995848869e76d7fa84835718301ea966 |
|
MD5 | a3610a03c92678d57ed8f7836536d174 |
|
BLAKE2b-256 | 4dd2987fd19ea63548b0a0b687fdc2e50cc8cfaafa7d94d5afb56d526e8e1c5a |