Skip to content
This repository was archived by the owner on Nov 12, 2023. It is now read-only.
/ LunarSocket Public archive
forked from nealol/LunarSocket

Lunar Client Websocket proxy. Written from scratch in TypeScript and open source

Notifications You must be signed in to change notification settings

Rojta/LunarSocket

 
 

Repository files navigation

❗Notice

I changed the lunar socket so it works on the cracked servers but only for my Minecraft character, the code that I changed is messy, I made it in a hurry, If someone wants to make it work for every cracked account feel free to do so, I currently don't have time to do it the right way.

LunarSocket

Lunar Socket is a Websocket server for Lunar Client. It allows you to proxy the connection between Lunar Client and Lunar Servers. (To give you cosmetics or emotes for example)

Lunar Client <-> Lunar Socket <-> Lunar Servers

It intercepts and edits the data in sent packets.

🔖 Protocol

You can see Lunar Client protocol detailed here

⬇️ Installation

$ git clone https://github.com/Solar-Tweaks/LunarSocket # Clone repo
$ cd LunarSocket # Go to LunarSocket folder
$ npm install # Install dependencies
$ npm run build # Build the project

# For the dashboard
$ cd dashboard # Go to the dashboard folder
$ npm install # Install dependencies
$ npm run build

💻 Installation using Script

$ git clone https://github.com/Solar-Tweaks/LunarSocket # Clone repo
$ cd LunarSocket # Go to LunarSocket folder
$ npm install # Install dependencies
$ npm run init # Execute the init script

or (Linux only)

curl https://raw.githubusercontent.com/Solar-Tweaks/LunarSocket/main/install.sh | bash

or

git clone https://github.com/Solar-Tweaks/LunarSocket && cd LunarSocket && npm install && npm run init
# Do the script installation but with just 1 command

🔧 Configuration

Open the config.example.json file and edit the values. Once you have edited the file, save it as config.json and start the server.

📂 Databases

There are a few types of databases available:

  • instanceStorage - Stores the data in the Lunar Socket instance which means that the data will be deleted when the server is restarted/stopped/updated.
  • mongo - Stores the data in a MongoDB database.
  • fileStorage - Stores the data in the provided json file.
  • Redis - Stores the data in a Redis database; (Requires RedisJson)

Permission system

You can add permissions for roles, the permission is very easy. The permissions for a command is simply command.<NAME> where <NAME> is the command name. For example command.broadcast is the permission for the broadcast command.

Here is a list of the special permissions:

  • * - All permissions
  • customization.displayColor - Let the user put a custom icon color through the API
  • customization.displayIconColor - Let the user put a custom plus color through the API

More the come soon with customization 👀

🚀 Starting the server

$ npm start

About

Lunar Client Websocket proxy. Written from scratch in TypeScript and open source

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 77.8%
  • Vue 17.1%
  • JavaScript 4.0%
  • Other 1.1%