beaver

module
v0.0.0-...-08f68e1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 12, 2023 License: MIT

README

Beaver

GitHub Workflow Status GitHub GitHub release (latest by date)

Warning ⚠️⚠️ This project is in a very early stage, the APIs might break during the alpha stage. Please use with caution ⚠️⚠️

Client

Install

Using homebrew

➜ brew tap amalshaji/taps
➜ brew install beaver

Or, download the binary from the releases page

Usage

Once the client is installed, run:

➜ beaver config --init

This creates a basic config at $HOME/.beaver/beaver_client.yaml,

target: 
secretkey: 
tunnels:
  - name: tunnel-1
    subdomain: subdomain-1
    port: 8000

Update your target and secretKey, and you're ready to go.

Server

Deploying the server using caddy and cloudflare

Deploy
  1. Using docker

    docker run \
      -v $PWD/docs/beaver_server.yaml:/app/config/beaver_server.yaml \
      -v $PWD/data:/app/data/ \
      -p 8080:8080 --restart unless-stopped amalshaji/beaver:0.3.0-alpha.1
    

    Replace $PWD/docs/beaver_server.yaml with path to your config file

  2. Using docker compose

    services:
      beaver:
        image: amalshaji/beaver:0.3.0-alpha.1
        volumes:
          - ./docs/beaver_server.yaml:/app/config/beaver_server.yaml
          - ./data:/app/data/
        ports:
          - 8080:8080
        restart: unless-stopped
    

    Start the server:

    docker compose up -d
    
Config
# beaver_server.yaml

host : 0.0.0.0                  # Address to bind the HTTP server
port : 8080                     # Port to bind the HTTP server
domain: localhost               # Domain on which the server will be running (eg: tunnel.example.com)            
secure: false                   # Whether the server runs under https
timeout : 3000                  # Time to wait before acquiring a WS connection to forward the request (milliseconds)
idletimeout : 60000             # Time to wait before closing idle connection when there is enough idle connections (milliseconds)

Credits

This project is a fork of hgsgtk/wsp

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL