Skip to content
Twig6943Public

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

Cypress

Dedicated servers for Plants vs. Zombies: Garden Warfare 1, Garden Warfare 2, and Battle for Neighborville.

Monorepo containing the desktop launcher, server DLL, and backend tools. Server DLL based on KYBER (Star Wars: Battlefront II private servers).

Features

  • Join servers by IP or through the server browser
  • Host dedicated servers with up to 48+ players (vs 24 stock)
  • Server Browser with master server registration and heartbeats
  • Playlist Editor for custom level rotations
  • Relay Support for NAT traversal without port forwarding
  • Moderator Panel for managing players, kicks, and bans
  • MOTD Editor with rich text formatting and color gradients
  • Anticheat server-side cheat detection modules
  • Multi-instance management, run multiple servers/clients from one launcher
  • Side-channel TCP protocol with HMAC challenge-response auth
  • EA Auth-based bans
  • Headless thin-client mode (server without rendering)

Supported Games

Game Version Server DLL
Garden Warfare 1 v1.0.3.0 cypress_GW1.dll
Garden Warfare 2 v1.0.12 (PreEAAC) cypress_GW2.dll
Battle for Neighborville 1.0.55.50001 (PreEAAC) cypress_BFN.dll

Prerequisites

  • Windows 10+ / Ubuntu 24.04+
  • .NET 8.0 Runtime
  • A legally owned copy of the game

Building

Requirements: Visual Studio 2022+ with both the .NET desktop and C++ desktop development workloads.

# Server
cd Server
cmake --fresh -S . -B build -DCYPRESS_GW2=ON
cmake --build build --config Release
# Launcher
cd Launcher
dotnet publish CypressLauncher.csproj -c Release -f net8.0-windows -o build /p:LangVersion=latest

See the workflows for more details.

Server Build Configurations

Each game has its own configuration via preprocessor defines (CYPRESS_GW1, CYPRESS_GW2, CYPRESS_BFN):

Configuration Output
Release - GW1 | x64 cypress_GW1.dll
Release - GW2 | x64 cypress_GW2.dll
Release - BFN | x64 cypress_BFN.dll

How It Works

  1. Server DLL is placed in the game directory as dinput8.dll (DirectInput hijack)
  2. Game loads the DLL, which installs MinHook hooks into Frostbite engine functions
  3. Hooks reimplement dedicated server functionality (player connections, level loading, console commands)
  4. A side-channel TCP protocol provides real-time events to the launcher

Project Structure

Container/                  # Container related files for hosting
Docs/                       # Hosting/joining/playlist guides
Launcher/
  Assets/                   # Assets (images, fonts, translations) used in the launcher
  CypressLauncher/          # C# backend (Photino.NET, .NET 8)
  wwwroot/                  # Frontend (HTML/CSS/JS)
  Server/                   # C++ server DLL injected into the game
  tools/                    # rceedit
Server/
  Source/
    Examples/               # launch script templates
    Core/
      Program.h/cpp         # entry point, DLL lifecycle, stdin command reader
      Server.h/cpp          # server management, player tracking, status UI
      Client.h/cpp          # client state, side-channel TCP, HWID generation
      Logging.h/cpp         # JSON + colored console logging
      Console/              # game-specific console commands
    GameHooks/
      fbMainHooks.*         # core engine hooks (init, main, console)
      fbServerHooks.*       # server lifecycle hooks (start, update, player join/leave)
      fbClientHooks.*       # client state hooks
      fbEnginePeerHooks.*   # Kyber socket manager integration
    GameModules/
      GW1Module.cpp         # GW1-specific patches and hooks
      GW2Module.cpp         # GW2-specific patches and hooks
      BFNModule.cpp         # BFN-specific patches (Lua console, thin-client UI)
    Anticheat/              # server-side cheat detection (GW2)
  include/
    SideChannel.h/cpp       # side-channel TCP server/client/tunnel
    ServerBanlist.h         # ban system with hardware fingerprinting
    ServerPlaylist.h        # playlist rotation logic
    Kyber/                  # socket management (from KYBER project)
    MinHook/                # runtime function hooking
    fb/                     # reverse-engineered Frostbite engine types
tools/
  cypress-servers/          # Master server, relay server (Go)

Credits


KYBER

Frostbite socket manager reimplementation

Andersson799

Frostbite dedicated server reverse engineering

BreakfastBrainz2

GW1 & GW2 dedicated servers, original launcher

Ghup

BFN dedicated servers

Dylan

GW2 anticheat

Gargos69Junior

Continuation of the launcher

v0e

Launcher revamp, side-channel, relay tunnel

RaymondTheJester

Logo

License

GPL-3.0

Terms of Service

Terms Of Service

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages