Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
127 commits
Select commit Hold shift + click to select a range
0284fee
hello API 8 !
imayushsaini Aug 13, 2023
83a81c1
ci
imayushsaini Aug 13, 2023
1d9d692
ci path fix
imayushsaini Aug 13, 2023
c014f14
aah wrong file name
imayushsaini Aug 13, 2023
1a0a23e
:(
imayushsaini Aug 13, 2023
4ab42f1
save in artifiact
imayushsaini Aug 13, 2023
62e44e7
fixed playlist error
imayushsaini Aug 13, 2023
26f73fb
increase time maybe it will work
imayushsaini Aug 13, 2023
e0149a6
changed build fail param
imayushsaini Aug 13, 2023
f0a4269
success check in ci
imayushsaini Aug 13, 2023
751f87e
again wrong file name
imayushsaini Aug 13, 2023
985fe8c
fixed message
imayushsaini Aug 13, 2023
d119302
added mini games
imayushsaini Aug 13, 2023
99cec14
syncing binary
imayushsaini Aug 13, 2023
ecc4d84
updating mods to api8
imayushsaini Aug 14, 2023
7d5eb76
adding mods , modified ba_data
imayushsaini Aug 14, 2023
5e1ab24
code refactoring , mod update fix
imayushsaini Aug 15, 2023
2e6f150
deleting different case folder names
imayushsaini Aug 15, 2023
665f15f
adding back
imayushsaini Aug 15, 2023
1c4fda9
code refactoring
imayushsaini Aug 15, 2023
3fb68bf
updating gitignore
imayushsaini Aug 15, 2023
2c39bae
Update README.md
imayushsaini Aug 15, 2023
3c986df
aarch64 support
imayushsaini Aug 15, 2023
463c3f9
Merge branch 'api8' of https://github.com/imayushsaini/Bombsquad-Ball…
imayushsaini Aug 15, 2023
4cebf90
mods fix
imayushsaini Aug 18, 2023
2137cdd
Update ci.yaml
imayushsaini Aug 18, 2023
0608333
Update .gitignore
imayushsaini Aug 19, 2023
73b1385
Merge branch 'api8' of https://github.com/imayushsaini/Bombsquad-Ball…
imayushsaini Aug 19, 2023
e40f147
Update ci.yaml
imayushsaini Aug 19, 2023
6216752
more bug fix and security update
imayushsaini Aug 19, 2023
ac44a78
syncing ba_data
imayushsaini Aug 19, 2023
7e9cb03
added dummy internal modules
imayushsaini Aug 20, 2023
8beb334
removed account files
imayushsaini Aug 20, 2023
bf2f252
update from origin
imayushsaini Sep 30, 2023
15393d5
1.7.32 ba_data update
imayushsaini Dec 21, 2023
3e11413
updating headless
imayushsaini Dec 21, 2023
5109028
Update bombsquad_headless_aarch64
imayushsaini Dec 21, 2023
2174ae5
updating dummy modules
imayushsaini Dec 21, 2023
7ba24ec
ba_data update
imayushsaini Jan 27, 2024
0aad008
syncing 1.7.33 changes
imayushsaini Jan 27, 2024
371d4b1
playlist fetch fallback
imayushsaini Feb 25, 2024
6eeb637
nv setting time format check before commit
imayushsaini Feb 25, 2024
ea0d105
1.7.33 sync
imayushsaini Mar 10, 2024
d6f1236
updating dummy modules
imayushsaini Mar 10, 2024
16570cd
syncing mods change from #public-server branch
imayushsaini Mar 10, 2024
d6e457c
adding block dash, canon fight mini games
imayushsaini Mar 16, 2024
853dde3
Update Management.py
vishal332008 Apr 10, 2024
2c50929
Merge pull request #90 from vishal332008/patch-1
imayushsaini Apr 13, 2024
582e24d
updating Management.py
vishal332008 Apr 19, 2024
ed672a6
Merge pull request #91 from vishal332008/patch-1
imayushsaini May 18, 2024
ae30ed1
updating ba_data to 1.7.35
imayushsaini May 19, 2024
1119710
updating dummymodules
imayushsaini May 19, 2024
7d21296
updating headless
imayushsaini May 19, 2024
553e6ca
bug fix
imayushsaini May 19, 2024
1af2eee
adding dependencies
imayushsaini May 19, 2024
a4a1431
updating ci to python3.12
imayushsaini May 19, 2024
f1b9b7b
added more maps and mini games
imayushsaini Aug 4, 2024
8de2a67
added flappy bird mini game
imayushsaini Aug 19, 2024
e113b58
Update and rename config.yaml to config.toml
vishal332008 Nov 18, 2024
c73d926
few api 8 minigames
vishal332008 Nov 18, 2024
b22ea22
Adding more api 8 games
vishal332008 Nov 21, 2024
49055eb
Merge pull request #98 from vishal332008/api8
imayushsaini Nov 22, 2024
cc7c745
Merge branch 'public-server' of https://github.com/imayushsaini/Bombs…
imayushsaini Nov 22, 2024
c371158
updated ci
imayushsaini Nov 22, 2024
638e381
syncing from public-server branch
imayushsaini Nov 22, 2024
78638d0
fixed bombsquad_server import order
imayushsaini Nov 22, 2024
1aef4af
updated server update checker version
imayushsaini Nov 22, 2024
48108df
Merge pull request #86 from imayushsaini/api8
imayushsaini Nov 22, 2024
2833fa6
Update README.md
imayushsaini Nov 22, 2024
4ae54fb
Update ci.yaml
imayushsaini Nov 22, 2024
b0b6865
updating aarch64 and x86_64 binaries
imayushsaini Nov 27, 2024
48af420
updating ba_data
imayushsaini Nov 27, 2024
9536e26
fixed next line character , updated config.toml
imayushsaini Nov 29, 2024
b0e113e
A small warning fix
vishal332008 Dec 8, 2024
f4669cc
Small change
vishal332008 Dec 8, 2024
8c5e213
Similar small changes
vishal332008 Dec 8, 2024
d5957ad
Updating defaults
vishal332008 Dec 8, 2024
cdf4717
Another small fix to remove port.py warning.
vishal332008 Dec 8, 2024
9db5fc0
Fixing a small thing
vishal332008 Dec 9, 2024
0c649da
Reverting to old code
vishal332008 Jan 25, 2025
2a07c0c
Merge pull request #105 from vishal332008/public-server
imayushsaini Feb 8, 2025
8913080
syncing changes from ballistica/master
imayushsaini Feb 8, 2025
02205dc
enable ci on api9 branch
imayushsaini Feb 8, 2025
c9190b1
including server start msg log level
imayushsaini Feb 8, 2025
be5a8f6
ci
imayushsaini Feb 15, 2025
28dbe5f
fixing bcs web plugin
imayushsaini Feb 22, 2025
e5d4bfc
updating aarch binary
imayushsaini Feb 22, 2025
5d7585f
Update README.md
imayushsaini Feb 22, 2025
88129dc
fixed end, nv n tint cmd
HeyFang Feb 22, 2025
f644d6a
Update management.py
HeyFang Feb 22, 2025
a334c32
Merge pull request #108 from HeyFang/public-server
imayushsaini Feb 22, 2025
c0722a6
added unban command
imayushsaini Feb 22, 2025
e5b46f2
fixed context errors in votingmachine and reordered installation cmds…
HeyFang Feb 23, 2025
9c57ee1
fix spaz mod default bomb type
imayushsaini Feb 24, 2025
f45bd5e
Merge pull request #107 from imayushsaini/api9
imayushsaini Apr 6, 2025
a748699
syncing with ballisitca/master
imayushsaini Apr 6, 2025
4627e3d
Update README.md
imayushsaini Apr 6, 2025
a600b37
Update spaz_effects.py
SenjuZoro Apr 12, 2025
6669428
Merge pull request #112 from imayushsaini/api9
imayushsaini Apr 12, 2025
3d8121c
updated dummy modules
imayushsaini Apr 12, 2025
039c7d3
Merge branch 'api9' of https://github.com/imayushsaini/Bombsquad-Ball…
imayushsaini Apr 12, 2025
a2cf2bf
bug fixes, servermanager link in stats, toml to json config
imayushsaini Apr 13, 2025
dc5a16f
Merge pull request #115 from imayushsaini/api9
imayushsaini Apr 13, 2025
8eb65b2
Merge pull request #113 from SenjuZoro/patch-8
imayushsaini Apr 13, 2025
427209b
updating aarch binary
imayushsaini Apr 13, 2025
b6982f7
Merge pull request #116 from imayushsaini/api9
imayushsaini Apr 13, 2025
2d322e2
fixed default settings and config.json
imayushsaini May 4, 2025
56d0aa7
Merge pull request #117 from imayushsaini/api9
imayushsaini May 4, 2025
38797c6
updating to 1.7.41
imayushsaini May 25, 2025
1fd456d
Update ci.yaml python3.13
imayushsaini May 25, 2025
eef4aa2
Update bombsquad_server
imayushsaini May 25, 2025
62156c8
updating binary
imayushsaini May 25, 2025
4de315c
Merge branch 'api9' of https://github.com/imayushsaini/Bombsquad-Ball…
imayushsaini May 25, 2025
0da2cf2
version update
imayushsaini May 25, 2025
6053065
remove unused code
imayushsaini May 25, 2025
05eb9df
Merge branch 'api9' of https://github.com/imayushsaini/Bombsquad-Ball…
imayushsaini May 25, 2025
38f4655
cleaning up logs
imayushsaini May 25, 2025
8e2153f
Merge pull request #118 from imayushsaini/api9
imayushsaini Jun 15, 2025
91fde7f
Fix: Correct Bomb init arguments and animate_array parameter in elPat…
Guggs0408 Jun 18, 2025
cadec2e
update readme to only fetch latest changes
Loup-Garou911XD Jun 18, 2025
2ddb003
Merge pull request #119 from Guggs0408/Guggs0408-patch-1
imayushsaini Jun 19, 2025
09d98aa
Merge pull request #120 from Loup-Garou911XD/public-server
imayushsaini Jul 5, 2025
b7ac3dd
added banned ip blocker
imayushsaini Jul 5, 2025
6b278b1
Merge remote-tracking branch 'origin/public-server' into public-server
imayushsaini Jul 5, 2025
db2f2d0
Updated py cmds
hypervortex Jul 23, 2025
cc65813
Merge pull request #124 from hypervortex/patch-1
imayushsaini Sep 7, 2025
dd4dfed
Merge branch 'public-server' of https://github.com/imayushsaini/Bombs…
imayushsaini Sep 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
44 changes: 44 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: CI

on:
push:
branches:
- public-server
- api9

jobs:
run_server_binary:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.13'
- name: Set execute permissions for wrapper
run: chmod +x ./bombsquad_server

- name: Set execute permissions for binary
run: chmod +x ./dist/bombsquad_headless

- name: Run server binary and capture output
run: |
./bombsquad_server > server-output.log 2>&1 &
SERVER_PID=$!
sleep 30 # let it run for 30 seconds
kill $SERVER_PID # terminate the server
- name: Check server output for success message
run: |
if grep -E "Exception|RuntimeError" server-output.log; then
echo "Error message found. Check server-output.log for details."
exit 1
elif ! grep -q "Server started" server-output.log; then
echo "Success message not found in server's output."
exit 1
fi
- name: Upload server output as artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: server-output
path: ./server-output.log
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ __pycache__/
*.py[cod]
*$py.class
.mypy_cache/
dist/ba_root/mods/playerdata/*.json*
.bsuuid
.bsac2
dist/ba_root/mods/playersdata/*.json*
dist/ba_root/mods/serverdata/*.log
dist/ba_root/mods/serverdata/*.log*
dist/ba_root/mods/serverdata/*.json
dist/ba_root/mods/stats/*.json

File renamed without changes.
21 changes: 21 additions & 0 deletions .idea/Bombsquad-Ballistica-Modded-Server.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"python.analysis.extraPaths": [
"./dist/ba_data/python",
"./dist/dummymodules",
"./dist/ba_data/python-site-packages"
]
}
27 changes: 16 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,54 @@
# Bombsquad-Ballistica-Modded-Server

Modded server scripts to host ballistica (Bombsquad) server. Running on BS1.7.19.
Modded server scripts to host ballistica (BombSquad) server. Running on BS1.7.41 (API 9)

``
We started working on API 8 , help us to test out and fix bugs
Migrated from API 7 TO API 9 , this might be unstable and missing some features. Use API 7 from this tag
``
[API8 BRANCH](https://github.com/imayushsaini/Bombsquad-Ballistica-Modded-Server/tree/api8)
[API7 ](https://github.com/imayushsaini/Bombsquad-Ballistica-Modded-Server/releases/tag/1.7.26)

# Prerequisites
- Basic knowledge of Linux
- A VPS (e.g. [Amazon Web Services](https://aws.amazon.com/), [Microsoft Azure](https://portal.azure.com/))
- Any Linux distribution.
- It is recommended to use Ubuntu.
- Python 3.10
- It is recommended to use Ubuntu (minimum Ubuntu 22).
- Python 3.13
- 1 GB free Memory (Recommended 2 GB)

## Getting Started
This assumes you are on Ubuntu or an Ubuntu based distribution.

Update and install `software-properties-common`
Install `software-properties-common`
```
sudo apt update; sudo apt install software-properties-common -y
sudo apt install software-properties-common -y
```
Add python Deadsnakes PPA
```
sudo add-apt-repository ppa:deadsnakes/ppa
```
Install Python 3.10
Install Python 3.13
```
sudo apt install python3-pip python3.10-dev python3.10-venv
sudo apt install python3.13 python3.13-dev python3.13-venv python3-pip -y
```
Update installed and existing packages
```
sudo apt update && sudo apt upgrade
```
Create a tmux session.
```
tmux new -s 43210
```
Download server files.
```
git clone https://github.com/imayushsaini/Bombsquad-Ballistica-Modded-Server
git clone --depth=1 https://github.com/imayushsaini/Bombsquad-Ballistica-Modded-Server
cd Bombsquad-Ballistica-Modded-Server
```
Now edit config.yaml in root dir change server name, port, admins, playlist, team name etc..
Making the server files executable.
```
chmod 777 bombsquad_server
chmod 777 dist/bombsquad_headless
chmod 777 dist/bombsquad_headless_aarch64
```
Starting the server
```
Expand Down Expand Up @@ -85,7 +90,7 @@ Here you can ban players, mute them, or disable their kick votes.
- Allow server owners to join even when server is full by looking owner IP address which was used earlier(don't join by queue).
- Auto kick fake accounts (unsigned/not verified by master server).
- Auto enable/disable public queue when server is full.
- Auto night mode .
- Auto night mode.
- Transparent Kickvote , can see who started kick vote for whom.
- Kickvote msg to chat/screen , can choose to show kickvote start msg either as screen message or chat message.
- Players IP Address and Device UUID tracking and banning.
Expand Down
65 changes: 65 additions & 0 deletions block_banned_ips.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import urllib.request
import json
import subprocess
import threading

# URL to fetch banned IPs
BAN_LIST_URL = "https://bcsservers.ballistica.workers.dev/fetchbannedips"


def fetch_banned_ips():
"""Fetch the list of banned IPs from the server using urllib."""
try:
with urllib.request.urlopen(BAN_LIST_URL) as response:
data = response.read().decode('utf-8')
return json.loads(data)
except urllib.error.URLError as e:
print(f"Error fetching banned IPs: {e}")
return {}


def is_ip_blocked(ip):
"""Check if the IP is already blocked in iptables."""
try:
result = subprocess.run(
["iptables", "-L", "-n", "-v"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
)
return ip in result.stdout
except Exception as e:
print(f"Error checking iptables for IP {ip}: {e}")
return False


def block_ip(ip):
"""Block the given IP for UDP traffic using iptables."""
try:
subprocess.run(
["iptables", "-A", "INPUT", "-s", ip, "-p", "udp", "-j", "DROP"],
check=True,
)
print(f"Blocked IP: {ip}")
except subprocess.CalledProcessError as e:
print(f"Error blocking IP {ip}: {e}")


def main():
"""Main function to fetch banned IPs and block them."""
banned_ips = fetch_banned_ips()
for ip, details in banned_ips.items():
if not is_ip_blocked(ip):
print(
f"Blocking IP: {ip} (Reason: {details.get('reason', 'No reason provided')})")
block_ip(ip)
else:
print(f"IP {ip} is already blocked.")


def schedule_main():
"""Schedule the main function to run every hour."""
main()
print("Scheduled to run again in 1 hour...")
# Schedule to run after 1 hour
threading.Timer(3600, schedule_main).start()
Loading