aiohttp==3.11.12 # Async HTTP for Discorduvloop==0.21.0 # Fast I/O loop (Linux/macOS)# ... and supporting libraries
4
Configure proxy
Copy and edit config.py to match your setup:
config.py
from logging import DEBUG, WARN, INFO, CRITICAL# Logging LevelLOGGING_LEVEL = INFO # Use DEBUG for troubleshooting# Server ConfigurationSERVER_HOST = "127.0.0.1" # YSFlight server IPSERVER_PORT = 7915 # YSFlight server portPROXY_PORT = 9000 # Proxy listening port# YSFlight Server VersionYSF_VERSION = 20150425 # CRITICAL: Must match server# Enable ViaVersionVIA_VERSION = True # Allow newer clients# G-LimiterG_LIM = 4 # Kill at |g| >= 4# Welcome messageWELCOME_MESSAGE = "Welcome {username} to the server!"# Command prefixPREFIX = "/"# Health hack detection messageHEALTH_HACK_MESSAGE = "Detected for health hack"# Smoke on damageSMOKE_PLANE = TrueSMOKE_LIFE = 5 # Smoke when life < 5# Discord integration (optional)DISCORD_ENABLED = FalseDISCORD_TOKEN = "DISCORD_BOT_TOKEN"CHANNEL_ID = 0
Critical: Set YSF_VERSION to your exact YSFlight server version. Incorrect values cause connection failures.
5
Start the proxy
Run the proxy server:
python proxy.py
Expected output:
INFO: Welcome to Sakuya ACINFO: Perfect and Elegant Proxy for your YSFlight ServerINFO: Licensed under GPLv3INFO: Press CTRL+C to stop the proxyINFO: uvloop found! Using uvloop for fast I/O # Linux onlyINFO [proxy.py:371]: Proxy server listening on port 9000
6
Configure clients
Point YSFlight clients to the proxy:
Host: Your proxy server IP
Port: PROXY_PORT (default: 9000)
Clients connect to the proxy, which forwards to your YSFlight server.
YSF_VERSION = 20150425 # Server versionVIA_VERSION = True # Allow different client versions
YSF_VERSION: Must match your YSFlight server version
VIA_VERSION: When True, allows post-20150425 clients to connect
ViaVersion is experimental. Some features may not work correctly with version mismatches.
When a client with a different version connects:
# In proxy.py:172-175if player.version != YSF_VERSION and VIA_VERSION: info(f"ViaVersion enabled : Porting {player.username} from {player.version} to {YSF_VERSION}") message_to_client.append(YSchat.message(f"Porting you to YSFlight {YSF_VERSION}, This is currently Experimental"))
Message broadcast when health hacking detected (proxy.py:193-196):
if player.aircraft.prev_life < player.aircraft.life and player.aircraft.prev_life != -1: cheatingMsg = YSchat.message(f"{HEALTH_HACK_MESSAGE} by {player.username}") warning(f"Health hack detected for {player.username}, Connected from {player.ip}")
[Unit]Description=Sakuya AC Proxy ServerAfter=network.target[Service]Type=simpleUser=your-userWorkingDirectory=/path/to/sakuya-acExecStart=/usr/bin/python3 proxy.pyRestart=always[Install]WantedBy=multi-user.target
Enable and start:
sudo systemctl enable sakuya-acsudo systemctl start sakuya-acsudo systemctl status sakuya-ac