Code Monkey home page Code Monkey logo

ngrok-lan's Introduction

Ngrok LAN Banner

Ngrok LAN

License GitHub release (latest by date) GitHub code size in bytes GitHub commit activity

Ngrok LAN is a Fabric mod that enables you to share your singleplayer world with your friends across the globe, all via clicking on the new "Open Public Server" button! This mod uses Ngrok, a free service to ease the creation of servers, as the main service to "tunnel" your connection to the internet, and will generate a link for your friends to connect to after you click on "Open Public Server".

For more on how Ngrok-LAN works, check out What is Ngrok.

Network Diagram

Installation/Quick Start

Dependencies

The mod requires the following mods:

Install Fabric Loader and Ngrok-LAN

  1. Go to the FabricMC website and download the latest installer
  2. Run the JAR, a window will pop up. Choose the correct version of Minecraft and loader (this mod currently requires Minecraft v1.18.2 and loader v0.13.3), and click on "Install".
  3. A new game version and profile will be created in the launcher's menu, which you can now use to launch Fabric.
  4. Put the mod JAR (available under Releases) into your "mods" folder, along with the ClothConfig API and ModMenu JARs. (The Fabric API JAR should already be in your mods folder from the previous section)
  5. Run the newly installed profile from step 3, and Ngrok LAN should load

Configuring Ngrok-LAN

Field Description
"Enabled?" This will enable/disable the mod, so you can configure whether the world is shared with Ngrok
"Ngrok Auth Token" This is the field to input your Ngrok auth token, see getting your auth token
"Region" This is where you can select the region of the Ngrok datacenter that you wish to use, use ones that are closest to you to minimise latency
"Require Authentication" Ticking this box will start the server in online mode. If this box is unchecked, the server will be started in offline mode. This is mainly for when the other players are using cracked Minecraft accounts.

Ngrok Regions

Code Region
US United States
EU Europe
AP Asia/Pacific
AU Australia
SA South America
JP Japan
IN India

Starting Ngrok LAN

  1. Make sure that Ngrok LAN is enabled, the auth token is valid, and the correct region is selected
  2. Open a new singleplayer world, and click on Open to LAN
  3. Configure the game mode and whether to allow cheats
  4. Press on "Open Public Server"
  5. The message "Ngrok service initiated successfully" should appear in chat, with a link highlighted in yellow
  6. The link is automatically copied to your clipboard, and can now be shared with your friends
  7. Other people just need to put this as a server IP into their multiplayer list, and join the world

Getting your Ngrok Auth Token

  1. Go to https://ngrok.com/, and sign up for a new free account
  2. On the dashboard, on your left-hand side menu, click on Getting Started > Your Auth Token
  3. Copy the auth token, and put this into Ngrok LAN (don't share this token with other people)

Common Issues

Error Message Resolution
An attempt was made to access a socket in a way forbidden by its access permissions. Restart "Host Network Service" under the "Services" program
The authtoken you specified does not look like a proper ngrok tunnel (ERR_NGROK_105) Check that your auth token is valid, and is correctly inputted into the mod config
Your account is limited to simultaneous ngrok agent session... Check that you are not running any other tunnels with this auth token, try change to regions if you are still getting this error
  • For more errors, error codes and their resolution, check the Ngrok docs

Other Issues

Please open a new issue in Issues

What is Ngrok?

Ngrok is a free service that exposes your applications running locally to the internet, without port forwarding. Usually, when setting up a Minecraft server, you would have to open the server, and "forward" your port through your router. Port forwarding "publishes" your server to the internet, so anyone with you IP can join. Think of this as your router "forwarding" the network packets from your server (part of your local network) to your friends (part of the wider internet).

Using Ngrok, however, we don't need to forward the port. All the internet traffic is routed through an application ( Ngrok-LAN in this case), then their datacentres. Ngrok provides us with a link in return, that we can give to our friends to connect to our server. This doesn't require any other configuration on your side - as long as you have internet, and an Ngrok account, you can host your singleplayer world to your friends across the globe.

Network Diagram

Ngrok Account Requirements

The mod only requires a free Ngrok account. The free tier for Ngrok allows you to have 1 free online tunnel simultaenously, which means that, with one Ngrok free account, you can only host 1 Ngrok-LAN server at the same tiume. The paid tiers allows you to have custom domains and more simultaenous online tunnels, but custom domains are not yet supported in this mod.

More pricing info please refer to Ngrok's website

TODO

  • Add ModRinth and CurseForge integration
  • Add meta description for CurseForge and ModMenu information
  • Specify dependencies
  • Add list of incompatible mods

License

This mod is available under the MIT license.

ngrok-lan's People

Contributors

alujjdnd avatar flooflez avatar imgbotapp 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.