ModernUO/Projects/Server.Tests/Tests/Network/Packets/Outgoing
Kamron Batman 04d438239d
feat: Adds robust speed hack detection and movement throttling (#2266)
## Summary

   Server-side movement throttle that prevents speed hacking while accurately identifying cheaters with detection of lagging connections.

   **Key features:**
   - Credit buffer (200ms) absorbs timing jitter from legitimate players
   - Movement queue handles larger bursts, draining at proper game-tick intervals
   - RTT measurement distinguishes network lag from speed hacks
   - Queue depth detection catches ACK-throttled speed hacks (going straight)

   ## How It Works

   **Throttle** (prevention): Movements arriving too early either consume credit or get queued. The queue drains at
   correct intervals, so speed hackers can't move faster regardless of what they send.

   **Detection** (identification): Combines multiple signals to identify cheaters:
   | Signal | What it catches |
   |--------|-----------------|
   | Queue depth ≥4 sustained | ACK-throttled speed hacks (client limits unacked moves to 5) |
   | Movement rate >1.05x | Direction-change speed hacks where timing is visible |
   | Stable RTT + high queue | Eliminates false positives from laggy players |

   **RTT-Aware Logic:**
   - Probes only sent to players actively moving (event-driven, not global loop)
   - Stable low-latency + problems = suspicious
   - Unstable/high-latency + problems = probably just lag, throttle handles it

   ## Configuration

   ```json
   {
     "movementThrottle.maxCredit": 200,
     "movementThrottle.softQueueLimit": 6,
     "movementThrottle.hardQueueLimit": 10,
     "movementThrottle.debugLogging": false
   }
   ```
2026-03-07 11:44:37 -08:00
..
AccountPackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
AccountPacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
AttributeNormalizer.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
CombatPackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
CombatPacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
ContainerPackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
ContainerPacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
DamagePackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
DamagePacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
EffectPackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
EffectPacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
EquipmentPackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
EquipmentPacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
GumpPackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
GumpPacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
ItemPackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
ItemPacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
LightPackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
LightPacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
MapPackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
MapPacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
MenuPackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
MenuPacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
MessagePackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
MessagePacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
MobilePackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
MobilePacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
MovementPackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
MovementPacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
PlayerPackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
PlayerPacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
SecureTradePackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
SecureTradePacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
TargetPackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
TargetPacketsTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
VendorBuyPackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
VendorBuyPacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
VendorSellPackets.cs feat: Adds robust speed hack detection and movement throttling (#2266) 2026-03-07 11:44:37 -08:00
VendorSellPacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00
VirtualHairPackets.cs fix: Exempts localhost from IPLimiter. Preps testing for io_uring (#2316) 2026-01-20 08:54:15 -08:00
VirtualHairPacketTests.cs feat: Upgrades networking to use io_uring. (#2315) 2026-02-01 16:02:32 -08:00