# client
go install github.com/deepsquare-io/proxy/cmd/dpsproxy@latest
# server
go install github.com/deepsquare-io/proxy/cmd/dpsproxy-server@latest
Manually:
git clone https://github.com/deepsquare-io/proxy.git
cd proxy
make # outputs are located in the bin/ directory
Usage
Server
Create a .env or .env.local or set these environment variables:
## A 32 bytes hex secret (openssl rand -out - 32 | xxd -p -c 0)
CSRF_SECRET=cc15bd16819c6c9ab96f161dfab1adcf6ba98ccaf627a0d7de486d713341162c
## JWT secret for session tokens
JWT_SECRET=random
## Domain name used for HTTP redirections. (<subdomain>.example.com)
PUBLIC_DOMAIN=example.com
## Contains the SSH host keys
KEYS_DIR=./
#SSH_LISTEN_ADDRESS=:2200
#HTTP_LISTEN_ADDRESS=:3000
Run the binary:
./dpsproxy-server
The SSH server is running on 2200/tcp and HTTP on 3000/tcp.
You must use reverse proxy to add a SSL layer and forward to :80 and :443. If not, run with the --insecure to pass the CSRF token. I recommend to use Caddy as it is easy to use:
Login with MetaMask and generate a route. You can retrieve the route too.
Expected routes will be shown:
Copy the token. This token will be used for login. Note that the allocation of the route doesn't expires, it is just the authentication token which only have 10 minutes.
If the token has expired, just "Retrieve Route" again.