Skip to content

Kazik24/server_share

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Server share

Utility to share your local server without public IP address. Built with iroh library which uses QUIC peer-to-peer holepunching.

Installation

  1. You need Rust Programming Language, install it from https://www.rust-lang.org/tools/install
  2. In terminal run:
    cargo install --git https://github.com/Kazik24/server_share.git
    This will compile and install server_share binary to use from your terminal (it may take few minutes).

Usage

Starting server:

To enable other users to connect yo your locally running server (e.g minecraft server on localhost:25565), open terminal on machine with your server and run:

server_share serve localhost:25565

This will display a ticket that can be used by other users to connect to your locally running server:

Use this ticket to connect: sp2p4zvwRjXUKGfvwnParsHAS3HuSVzV5cA4McphgmoCtajS

Connecting to server:

To connect to your locally running server from different computer, open terminal on other machine and run:

server_share listen --from localhost:25565 sp2p4zvwRjXUKGfvwnParsHAS3HuSVzV5cA4McphgmoCtajS

This will listen on port 25565 (you can specify other port or bind address) and forward all connections from this port to server running at the first machine with given ticket.

Making ticket persistent:

Sometimes you want to keep your server ticket stable, for example to not reshare it with other users every time you start your server. To make your ticket persistent, generate a config.toml file with your secret key by running command:

server_share prepare

This will generate a config.toml file in current directory that will look something like this:

[config]
# of course you will have a different key here every time you run this command
secret_key = "11111111111111111111111111111111"

After that you can run server_share serve ... and it will present you the same ticket every time.

Warning: Do not share this key with other users, it can be used to impersonate your address.

About

Utility to share your local server without public IP address.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages