Skip to content

Miransas/binboi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

25 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌐 Elasiya Network

Elasiya is an open-source, ngrok-like HTTP tunnel written in Go. It exposes your local services to the internet instantly β€” no configuration needed.


πŸ“‹ Table of Contents

  1. Features
  2. Installation
  3. Quick Start
  4. Usage Guide
  5. Running the Server
  6. Project Structure
  7. Contributing
  8. License

πŸš€ Features

  • Instant tunnels – expose any local port with one command (elasiya http 3000)
  • WebSocket-based – efficient, low-latency bidirectional communication
  • Auto-reconnect – client reconnects automatically on drop
  • Concurrent requests – handles multiple simultaneous HTTP requests per tunnel
  • Token auth – simple token-based access control
  • Dashboard – built-in web dashboard at /dashboard
  • Self-hostable – run your own server with a single binary

πŸ“¦ Installation

Option 1 β€” Homebrew (macOS / Linux)

brew tap sardorazimov/elasiya
brew install elasiya

Option 2 β€” apt (Debian / Ubuntu)

curl -fsSL https://raw.githubusercontent.com/sardorazimov/elasiyanetwork/main/install.sh | sudo bash

Or add the apt repository:

sudo apt update
sudo apt install elasiya

Option 3 β€” Go install

go install github.com/sardorazimov/elasiyanetwork/cmd/elasiya@latest

Make sure $GOPATH/bin (usually ~/go/bin) is in your $PATH.

Option 4 β€” Build from source

# Clone the repository
git clone https://github.com/sardorazimov/elasiyanetwork.git
cd elasiyanetwork

# Download dependencies
go mod download

# Build the client CLI
go build -o elasiya ./cmd/elasiya

# Build the server
go build -o elasiya-server ./cmd/elasiya-server

# (optional) Move to PATH
sudo mv elasiya /usr/local/bin/
sudo mv elasiya-server /usr/local/bin/

Option 5 β€” Quick install script

curl -fsSL https://raw.githubusercontent.com/sardorazimov/elasiyanetwork/main/install.sh | bash

⚑ Quick Start

  1. Start the server (or use a hosted Elasiya server):
elasiya-server
# Server listening on :8080
  1. In another terminal, expose your local service:
# Expose localhost:3000
elasiya http 3000

# Output:
#   πŸš‡ Elasiya Tunnel  v1.0.0
#   ─────────────────────────────────────────
#   Server   ws://localhost:8080
#   Tunnel   http://localhost:8080/ela-ela_fre  β†’  http://localhost:3000
#   ─────────────────────────────────────────
#   Press Ctrl+C to stop

πŸ“– Usage Guide

Client β€” elasiya

elasiya [options] <command> [args]

COMMANDS:
  http <port>   Expose a local HTTP service on <port>
  version       Print version and exit

OPTIONS:
  --server string   Elasiya server WebSocket address
                    Default: ws://localhost:8080
                    Env:     ELASIYA_SERVER

  --token  string   Auth token
                    Default: ela_free_test
                    Env:     ELASIYA_TOKEN

  --host   string   Custom tunnel hostname (optional)

Examples

# Expose port 3000 with default settings
elasiya http 3000

# Use a remote server
elasiya http 3000 --server ws://tunnel.elasiya.network

# Use a custom token
elasiya http 8080 --token my-secret-token

# Custom host name
elasiya http 3000 --host myapp

# Use environment variables
export ELASIYA_SERVER=ws://tunnel.elasiya.network
export ELASIYA_TOKEN=my-secret-token
elasiya http 3000

# Print version
elasiya version

Server β€” elasiya-server

# Start server on default port 8080
elasiya-server

# Override token via environment variable
ELASIYA_TOKEN=my-secret-token elasiya-server

The server exposes:

Endpoint Description
/tunnel WebSocket endpoint for client tunnel handshake
/<anything> Proxies incoming HTTP requests to the tunnel

🐳 Docker

# Build the image
docker build -t elasiyanetwork:latest .

# Run the server
docker run -d -p 8080:8080 --name elasiya-server elasiyanetwork:latest

# Run with a custom token
docker run -d -p 8080:8080 -e ELASIYA_TOKEN=my-token --name elasiya-server elasiyanetwork:latest

# Using Docker Compose
docker compose up -d --build

πŸ“‚ Project Structure

.
β”œβ”€β”€ cmd/
β”‚   β”œβ”€β”€ elasiya/           # Client CLI entry point
β”‚   └── elasiya-server/    # Server entry point
β”œβ”€β”€ internal/
β”‚   β”œβ”€β”€ auth/              # Token verification
β”‚   β”œβ”€β”€ server/            # HTTP proxy + WebSocket handler
β”‚   └── tunnel/            # Tunnel registry
β”œβ”€β”€ protocol/              # Shared message types
β”œβ”€β”€ install.sh             # Quick-install script
β”œβ”€β”€ Dockerfile             # Multi-stage Docker build
β”œβ”€β”€ go.mod
└── LICENSE

πŸ“Έ Architecture

Internet
   β”‚
   β–Ό
elasiya-server (:8080)
   β”‚  WebSocket /tunnel
   β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Ί elasiya client (your machine)
   β”‚                              β”‚
   β”‚  HTTP request arrives        β”‚ forward to localhost:<port>
   β”‚  server sends to client β”€β”€β”€β”€β”€β”˜
   β”‚  client returns response
   β”‚  server writes HTTP response
   β–Ό
Caller gets response

🀝 Contributing

Contributions are welcome! Here's how:

  1. Fork the project
  2. Create your feature branch: git checkout -b feature/my-feature
  3. Commit your changes: git commit -m 'Add my feature'
  4. Push to the branch: git push origin feature/my-feature
  5. Open a Pull Request

πŸ“„ License

MIT License β€” see LICENSE for details.

Copyright Β© 2026 Sardor Azimov

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors