Skip to content

An easy-to-use tunnel to localhost built in Rust. An alternative to ngrok and frp.

License

Notifications You must be signed in to change notification settings

bonaysoft/rslocal

Repository files navigation

rslocal

English | 中文

What is rslocal?

Rslocal is like ngrok built in Rust, it builds a tunnel to localhost.

Project status

  • support http
  • support tcp
  • support udp
  • support token login
  • support oidc login
  • disconnection reconnect
  • access log for client

Rslocal

A client program that runs locally to receive server requests and forward them to local services

Installation

MacOS

brew install saltbo/bin/rslocal

OtherOS (Does not support Windows for the time being. You need to download it manually.)

curl -sSf https://raw.githubusercontent.com/saltbo/rslocal/master/install.sh | sh

Usage

rslocal config
rslocal http 8000
rslocal http 8000 --subdomain test
rslocal tcp 8000

Rslocald

Server program that receives external requests and forwards them to rslocal

Cloud-service

Visit localtest.rs

Self-hosted

mkdir /etc/rslocal
touch /etc/rslocal/rslocald.toml
#edit your config like example configfile

docker run -it -p 8422:8422 -p 8423:8423 -v /etc/rslocal:/etc/rslocal saltbo/rslocald

Configfile

The rslocald.toml file is required for rslocald.

[core]
debug = false
bind_addr = "0.0.0.0:8422"
auth_method = "token"  # token, oidc
allow_ports = "18000-19500"

[http]
bind_addr = "0.0.0.0:8423"
default_domain = "example.com"
# default_static = "/etc/rslocal/webroot" # support later

[tokens]
bob = "rslocald_abc11"
alice = "rslocald_abc32"

#[oidc]
#issuer = ""
#audience = ""

Contributing

  1. write code for the todo and fixme tag
  2. implement the unchecked item of the Project status

Special thanks

License

rslocal is under the Apache-2.0 license. See the LICENSE file for details.

Stargazers over time