The MarketShark Server is a NodeJS backend designed to manage connections between the MarketShark clients (Forge and Headless) and Discord for seamless remote control and monitoring. It includes websocket connections for client communication, authentication, and admin functionalities via a Discord bot.
- Websocket connections for Forge and Headless MarketShark clients
- Discord bot integration for real-time command, control, and monitoring
- Key, user, and session management
- Minecraft session authentication
- Admin statistics and status dashboard
-
Configure Env File
- Copy example.env into the file .env
- Set the DISCORD_TOKEN
- Set the Guild ID for your "Admin" server
- Change DOMAIN to one pointing to your IP (Alternatively, your IP)
- If using a DOMAIN, ensure you have the subdomains service.example.com and wss.example.com
- Change ports if needed
- Set 2Captcha key from 2Captcha if wanted (AutoCaptcha is an unfinished feature)
-
Add Headless Executables
- Executables built from MarketSharkHeadless should be added to the
executable
folder in this project. - Rename the
client
file tomarketshark
before placing it in theexecutable
folder.
- Executables built from MarketSharkHeadless should be added to the
-
Recommended Deployment Options
- Use PM2 or Docker to keep the server running persistently and to handle crashes and restarts. For Docker, a Dockerfile can be added based on your deployment needs.
- For PM2, run:
pm2 start src/index.js --name MarketSharkServer
-
Configure NGINX (Optional)
- NGINX configuration files for the server are located in the
nginx
directory. - Replace
DOMAIN
with your domain / IP - Replace
WEBSOCKET_PORT
andSERVICE_PORT
- Add SSL Certificates or route through Cloudflare Proxy (Reccomended)
- Alternatively, switch to using
http
overhttps
andws
overwss
in sources
- Alternatively, switch to using
- NGINX configuration files for the server are located in the
This server manages websocket connections for:
- Forge Client - MarketShark Forge mod connections.
- Headless Client - MarketSharkHeadless connections.
The Discord bot provides:
- Authentication Management - Validates users and sessions.
- Admin Controls - Enables real-time monitoring and control of connected clients.
- Statistics Dashboard - Displays stats and activity for admins.
- Auto Captcha does not work well with 2captcha API, resulting in false solves.
- Various crashes may occur under certain conditions.
- Server could be affected by SQL Injection (SQLi) attacks.
Contributions are welcome! To contribute:
- Fork the repository.
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/MarketSharkServer.git
- Create a new branch for your feature or bug fix:
git checkout -b feature-name
- Commit your changes:
git commit -m "Add new feature"
- Push to your fork:
git push origin feature-name
- Submit a pull request with a description of your changes.
Pull requests will be reviewed and accepted if applicable to the project goals.
Thank you for using MarketShark Server!