Please be aware that there are no Brute Force or Denial of Service security actually implemented !
Even then you should only open access to this Service through a regular HTTP Server Secured Tunnel (Apache/IIS/Nginx)
Some may have wondered why I upgraded the Game Server Scripts features recently (Data Table, Server Properties, Third Party Library support, etc...)
Here is the reply, I finally have the ability to embed a third party library (NancyFX / Nancy) inside Game Server Scripts, thus being optional to DOL Runtime, and add just any weird~crazy~experimental features to Dawn of Light, here in the shape of an Embedded Web Server being able to run concurrently with DOL Server and offering dynamic page rendering based on current Server Status !
DOLNancyWeb
- An ugly name for a wonderful framework...
So here is a totally new and independent GSS package that just need to be copied to your DOL working directory, that will then enable an "On-Demand" Web Server features to your Shard, this web server comes with default security based on Form-Login querying the existing DOL "Account" Table to match players/gamemasters/admins Account, it can serve static content for images, styles sheets, javascripts designs, and you can route any query to a dedicated Object Module that runs in your shard process and can gather or edit data from GameServer Instance and Database Objects !
Actual code base is not finished, I tried to mimic a Model View Controller (MVC) paradigm so that most Web Developer feel at home, but the actual framework is not limited to this coding style and I still have some bad habit from PHP/CGI developments...
The Nancy Framework offer different View engine (Razor, SSVE and others) that can use pseudo-HTML template to build the resulting page, this is pretty easy to use and only a few keywords should be needed, most work is around "Model" and CSS Style Sheet to improve display experience.
Model are "dynamic" "ExpandoObject" / "IDictionary", this means : mostly ANY Objects ! (A GameServer Instance or a Player Instance can Fit nicely in there !) but the View engine expect Public Members or Public Properties (Properties are pretty good to call a runtime method inside getter/setter) so it's rather hard to query any Methods or Functions, it would also be ugly to subclass these objects to had "web oriented" properties...
The path I took for "Models" is a "Default" Class that implements most needed properties for a "Home Page" (Page Title / Constants, User Authentication, Server Info), then each module needing other data just need to subclass this object to keep the page display nice, and add his own Members/Properties to display additional data ! (this allow to display the "Frame" of the Home page in every modules)
Finally "Controllers" are pure C# NancyModule subclass that are needed to implement "Routes" (The URL where you want your page) with parameters customizing (pretty much like Mod_Rewrite for Apache) and that trigger user-made methods on different queries (GET/POST/HEAD...) to finally provide a "Model" object with every Members populated with Data to display (Controller can also handle Server Response, authentication requirements, specific AJAX queries, and will mostly need to implement GameServer objects Editors to be able to have any effect on current game...)
Available Documentation on Nancy is pretty "thin" there are some replies to beginner pitfall available on StackOverflow, and a wiki can help you get your hands Dirty : https://github.com/NancyFx/Nancy/wiki
Server Properties Switch
- Code: Select all
[ServerProperty("dolnancyweb", "enable_web_server", "Enable/Disable Embedded Nancy Web Server", true)]
- Code: Select all
[ServerProperty("dolnancyweb", "web_server_listen_uri", "Embedded Nancy Web Server Listen URI", "http://localhost:10200")]
- Code: Select all
[ServerProperty("dolnancyweb", "web_server_cookie_crypt_secret", "Embedded Web Server Cookie Encryption Secret (If Empty will be auto set on first start)", "")]
- Code: Select all
[ServerProperty("dolnancyweb", "web_server_cookie_crypt_hash_secret", "Embedded Web Server Cookie Encryption Hash Secret (If Empty will be auto set on first start)", "")]
- Form Based Authentication
- GameServer / GamePlayer Queries
- Master/Partial Layout for "Frame Like" Design
- Static Content for Images, Scripts, CSS or anything (Streaming ? Flash ? Future Asm.js/WebGL DAOC client ? )
- Ugly Hand-Made "Developer" Style
This kind of project can take great advantage of community work, each page can be independently coded by anyone, on any "bugs" user can disable the plugin entirely with a delete key press on their keyboard !
Some Screenshots :