Skip to content

gbans is a global ban tracker application & sourcemod plugin for Team Fortress 2 similar to sourcebans++ but developed with modern practices

License

Notifications You must be signed in to change notification settings

camp3r101/gbans

 
 

Repository files navigation

gbans

gbans is intended to be a more modern & secure replacement for sourcebans / sourcebans++.

Primary differences from sourcebans++

  • No direct SQL queries across networks. Exposing MySQL to the internet is a very poor security practice. You can of course mitigate this with firewalls and sql accounts with ip restrictions or VPNs, but the majority of server admins will not ever do this.
  • Game servers authenticate with the gbans server upon startup of the plugin. Subsequent requests will use the returned authentication token.
  • Communication over HTTPS
  • Discord bot integration for administration & announcements.
  • Built using Go & PostgreSQL. It has a built-in webserver that is safe to directly expose to the internet. This means its not necessary to setup MySQL, Nginx/Apache and PHP on your server.
  • Non-legacy codebase that is (hopefully) not a nightmare to hack on. Sourcebans++, while updated, is still very clearly a legacy PHP codebase. It uses no framework or real conventions, Still uses globals, Mixes PHP/JS code, Uses tables for layout. I am in no way trying to put them down, they have done a good job volunteering their time over the years, But i think its time to move on from this legacy stuff.

Features

  • Import of existing sourcebans database
  • Import/Export of gbans databases
  • Game support
    • Team Fortress 2
  • 3rd party ban lists
    • tf2_bot_detector
    • Known VPN Networks
    • Known non-residential addresses
    • Known proxies
  • Multi server support
  • Global bans
  • Subnet & IP bans (CIDR)
  • Database support
    • Postgresql w/PostGIS
  • (Docker support)[https://hub.docker.com/repository/docker/leighmacdonald/gbans]
  • ACME (Lets encrypt / Zero SSL) protocol support for automatic SSL certificates
  • SourceMod Plugin
    • Game server authentication
    • gb_ban <player_id|steam_id> duration Reason Ban a user
    • gb_unban Unban a previously banned user
    • gb_kick Kick a user
    • mod Call for a mod
  • User Interfaces
    • Discord
    • Web
  • Game server logs
    • Remote relay client gbans relay -h
    • Parsing
    • Indexing
    • Querying

Docker

Docker is recommended to run gbans. You can find the official docker images at (dockerhub)[https://hub.docker.com/repository/docker/leighmacdonald/gbans].

Assuming you have created your config file and have a database setup you can run it using something like:

docker run -it --rm -v `$(pwd)`/gbans.yml:/app/gbans.yml:ro leighmacdonald/gbans:latest

There is also a docker-compose config you can use which provides the database as well.

docker-compose -f docker/docker-compose.yml up --build --remove-orphans --abort-on-container-exit --exit-code-from gbans

Documentation

For installation, configuration and usage instruction, please see the docs directory.

About

gbans is a global ban tracker application & sourcemod plugin for Team Fortress 2 similar to sourcebans++ but developed with modern practices

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 61.1%
  • TypeScript 31.8%
  • SourcePawn 3.8%
  • PLpgSQL 1.3%
  • Makefile 0.7%
  • JavaScript 0.4%
  • Other 0.9%