Highly Performant & Scalable Ultima Online Server Emulator https://www.modernuo.com
Find a file
Kamron Batman 4cd668ef61
feat: Moves TcpServer to another thread. Rewrites Firewall (#1660)
## Breaking Changes
* The Firewall and IP Limiter have been rewritten. Please read the notes carefully!
* `TcpServer.Instances` moved back to `NetState.Instances` - sorry - it was stupid to move it to begin with.

> [!Note]
> Sockets that fail the IP Limiter or Firewall will be immediately and forcibly disconnected.
> This means they will be stuck at "Verifying account..." if it was a real client.

### Summary
- Removes firewall wildcard support.
- Removes `AccessRestrictions`.
- Moves Firewall/IPLimiter to the core.
- Moves `TcpServer` to its own thread.
- Removes the `SocketConnect` and `SocketDisconnect` event sinks.
- Moves `Instances` back to `NetState.Instances`.
- Fixes a long standing bug with bad handling of duplicate listener addresses.

#### Firewall
The firewall has been completely rewritten. There is now an "Admin Firewall" which saves to the config file. Secondarily, there is an internal firewall used exclusively by the TcpServer while processing sockets. The Admin firewall mirrors it's additions/deletions to the internal firewall by adding requests to a queue.

> [!IMPORTANT]  
> **Wildcard firewall entries, such as `X`, `*`, `?` are not allowed.**
> **Ranges in between IP classes or sextets are not allowed.**
> **Please make sure to use one of the following:**
> * IP Address - `192.168.1.1`
> * CIDR - `192.168.1.0/24`
> * Range - `192.168.1.1-192.168.1.100`

#### IP Limiter
The IP Limiter has been completely rewritten. The available configurations are:
```json
"ipLimiter.enable": "True",
"ipLimiter.maxConnectionsPerIP": 10,
"ipLimiter.clearConnectionAttemptsDuration": "00:00:00:10",
"ipLimiter.clearThrottledDuration": "00:00:02:00",
```

The IP Limiter is set up to prevent spamming connections from the same IP. Every time an IP connects, it is added to a connection list. After 10 attempts, the IP is added to the throttle list. To keep the system fast, the connection list is entirely wiped every 10 seconds, and the throttle list is entirely wiped every 2 minutes.
2024-01-20 14:25:12 -08:00
.config fix: Adds missing migration files. (#1642) 2023-12-20 13:02:01 -08:00
.github fix: Fixes migration check (#1626) 2023-12-02 12:50:42 -08:00
Distribution/Data feat: Adds configurable skill and stat gain (#1489) 2023-10-14 12:02:36 -07:00
docs feat: Updates to .NET 8. (#1542) 2023-11-14 17:08:09 -08:00
Projects feat: Moves TcpServer to another thread. Rewrites Firewall (#1660) 2024-01-20 14:25:12 -08:00
.editorconfig Adds ModernUO docs skeleton (#243) 2020-09-13 15:21:28 -07:00
.gitattributes fix: Adds migration checks to CICD, updates dependencies, adds Fedora 37, alpine 3.17 support (#1309) 2022-12-22 12:12:47 -08:00
.gitignore fix: Fixes ML Escortables and codegens (#1525) 2023-09-30 14:11:48 -07:00
azure-pipelines.yml fix: Fixes migration check (#1626) 2023-12-02 12:50:42 -08:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2020-05-05 08:51:39 -07:00
CONTRIBUTING.md chore: Updates discord links (#394) 2021-01-07 01:04:05 -08:00
Directory.Build.props chore(deps): Bump Serilog.Sinks.Console from 5.0.0 to 5.0.1 (#1632) 2023-12-08 16:02:37 -08:00
FAQ.md docs: Updates FAQ for time zone issues. (#1368) 2023-03-10 00:18:36 -08:00
global.json feat: Updates to .NET 8. (#1542) 2023-11-14 17:08:09 -08:00
LICENSE Fixes more line ending issues (#267) 2020-09-27 13:54:56 -07:00
mkdocs.yml docs: Updates serialization docs (#1327) 2023-02-02 19:37:18 -08:00
ModernUO.sln fix: Replaces FindItem(s)ByType(s) implementation with BFS strategy (#1454) 2023-08-18 22:05:28 -07:00
publish.cmd fix: Removes echo in publish that is not needed (#1477) 2023-08-29 07:53:10 -07:00
publish.sh feat: Adds .NET 7 & Arm64 support (#1229) 2022-11-06 09:59:11 -08:00
README.md chore: Update README.md (#1661) 2024-01-20 14:24:44 -08:00
rider-settings.zip Cleanup/Housekeeping (#242) 2020-09-12 15:31:21 -07:00
Rules.ruleset Cleanup & Fixes for .NET 5 (#309) 2020-11-15 10:03:50 -08:00
RUNUO_TO_MODERNUO.md fix: Update RUNUO_TO_MODERNUO.md (#1613) 2023-11-24 23:49:43 -08:00
SPONSORS.md Adds Chia to sponsors page 2023-02-24 19:16:27 -08:00
stylecop.json Updates formatting rules (#199) 2020-08-25 18:00:51 -07:00
THIRD-PARTY-NOTICES chore: Updates 3rd party notices (#1042) 2022-06-01 09:42:11 -07:00
version.json feat: Moves TcpServer to another thread. Rewrites Firewall (#1660) 2024-01-20 14:25:12 -08:00

ModernUO Discord Subreddit subscribers Twitter Follow

Ultima Online Server Emulator for the modern era!

GitHub license GitHub stars GitHub issues
GitHub build Azure Pipelines build

Requirements

Supported Operating Systems

Windows 10/11/2019/2022 MacOS 11+ Debian 11+ Ubuntu 20+ LTS
Alpine 3.18+ Fedora 37+ RedHat 7/8 CentOS 7/8/9 openSUSE 15+ SUSE Enterprise 12 SP2+ Linux Mint 17+ Arch

Required Frameworks

All Operating Systems

.NET

Windows

VC++ Redistributable 17

Development

git .NET

Supported IDEs

Jetbrains Rider 2023.2+spaceVSCodespaceVisual Studio 2022 v17.7+

Getting Started

  • Install prerequisite requirements
  • Clone this repository (or download the latest):
    • git clone https://github.com/modernuo/ModernUO.git
  • Open ModernUO.sln to start developing

Building/Publishing

  • Run ./publish.cmd [release|debug (default: release)] [os] [arch (default: x64)]
    • os - Supported operating systems
      • win - Windows 10/11/2019/2022
      • osx - MacOS 11/12/13 (Big Sur, Monterey, Ventura)
      • linux - Linux
    • arch
      • x64 - Intel 64-bit
      • arm64 - ARM 64-bit (Windows Arm64 not supported)

Linux Prerequisites

Fedora, CentOS, RHEL, etc

dnf upgrade --refresh -y
# CentOS does not come with EPEL enabled
dnf install -y epel-release epel-next-release
dnf install -y findutils libicu zlib-devel zstd libargon2-devel tzdata

Ubuntu, Debian, etc

apt-get update -y
apt-get install -y libicu-dev libz-dev zstd libargon2-dev tzdata

Running the Server

  • Follow the publish instructions
  • Run ModernUO.exe or dotnet ModernUO.dll from the Distribution directory on the

Troubleshooting / FAQ

Want to sponsor?

Thank you for supporting us! You can find out how by visiting the sponsors page.

Collaborators

Kamron Batman Mark1145

Thanks

  • RunUO Team & Community
  • Voxpire, the ServUO Team & Community
  • Karasho, Jaedan and the ClassicUO Community



Development Tools & Plugins provided with ♥ by
JetBrains Material Theme