Skip to content

A simple HTTP server that runs as a plugin, allowing you to run a website off your server!

Notifications You must be signed in to change notification settings

ShimmyMySherbet/UnturnedHTTPServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Notice: This was my first ever C# project and the code quality sucks ass.

UnturnedHTTPServer

A simple HTTP server that runs as a plugin, allowing you to run a website off your server!

With this plugin, you can run a simple HTTP server off your Unturned Server. You can also manage/check the status of the http server in-game.

Permission Nodes:

Permission Node Related Permission
httpserver Base Permission Node to run /HttpServer
httpserver.start Allows the user to Start the HTTP server
httpserver.stop Allows the user to Stop the HTTP Server
httpserver.status Allows the user to check the status of the HTTP Server

Commands:

/HTTPServer is the command you use to control the HTTP Server in-game. With it, you can Start, Stop, and Check the status of the HTTP Server.

Starting the Server: (Using settings in the config)

/HTTPServer Start

Starting the Server: (Using the specified port)

/HTTPServer Start (Port)

Stopping the Server:

/HTTPServer Stop

Checking the Server's Status:

/HTTPServer Status

Config

Settings Key Relevant Setting
HTTPServerAddress The Prefix for the HTTP Server (See below)
AutostartHTTPServer Specifies if the HTTP Server should start when the Unturned Server Starts
AllowHTTPControls Specifies if the HTTP Server Start/Stop Commands are enabled.
VerboseOutput Enables/Disables Verbose Output (Verbose output can get spamy on large servers)
HTTPServerDirectory The Directory (folder) that contains the files/folders to host, Defaults to the 'Server" folder inside of the Plugin's config folder
RootServerFile Specifies the root file (e.g., the file you get when going to www.domain.com), set it do %auto for auto-detect

Server Prefix:

The server prefix specifies how the server runs. It must end in a forward slash, specify the method (http or https), the scope, and the port.

Method

Most people will just use https. But you can use https, but you need an SSL certificate to be installed on the host computer.

Scope

The 3 most common scopes are Local, Specific, and All.

Scope Key Info Example
All * Allows the server to be connected to from any domain http://*:80/
Specific (Server IP or Domain) Allows the server to be only connected to via the key http://domain.com:80/
Local Localhost Only allows the server to be connected to via localhost (The host pc) http://localhost:80/

Most People will just want to use the default, All (*).

Setup; Basic

This HTTP server can run off the main port of your Unturned Server. Since the ports for your server (Your base port, though to your base port + 2) are commonly TCP/UDP, this plugin can utilise the TCP connection for your server to run a http server. This also means you can use this plugin even if you’re not using a dedicated server.

Note: I have not Thoroughly tested this for issues, but basic tests have shown no issue with running the http server on the same port as your base server itself. (I believe the base port uses UDP to query the server, so TCP is left open for the HTTP server)

Setup; Alternate Port.

For hosting the server on an alternate port, you will need to open that port and port-forward it.

Port Forward

Port forward the TCP port the HTTP server is running off

Open the port

See this Article for info on how to do this on Windows.

About

A simple HTTP server that runs as a plugin, allowing you to run a website off your server!

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages