Coder Social home page Coder Social logo

shimmymysherbet / unturnedhttpserver Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 1.94 MB

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

C# 100.00%
unturned unturned-plugin unturnedplugin rocketmod rocketmod-plugin http http-server

unturnedhttpserver's Introduction

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.

unturnedhttpserver's People

Contributors

shimmymysherbet avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.