Skip to content

Commit

Permalink
chore: upgrade deps (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
embbnux authored Feb 27, 2023
1 parent 08bc33f commit 05e92b9
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 56 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@ Firstly please deploy this project to your own web host with public internet acc

[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy)

#### Get JWT Token
#### JWT Token generator environment variables

In first deployment, you need to provide `JWT_GENERATOR_USERNAME` and `JWT_GENERATOR_PASSWORD` environment variables, then you can access `https://your_web_host_domain/tunnel_jwt_generator?username=your_generator_username&password=your_generator_password` to get `JWT Token`. After you get `JWT Token`, you can remove `JWT_GENERATOR_USERNAME` and `JWT_GENERATOR_PASSWORD` environment variables to remove `/tunnel_jwt_generator` access.

You can also generate JWT Token in your local by following code [here](https://github.com/embbnux/lite-http-tunnel/blob/main/server.js#L71).
In first deployment, you need to provide `JWT_GENERATOR_USERNAME` and `JWT_GENERATOR_PASSWORD` environment variables. We will use those values to auth and get JWT token at client side. After you get `JWT Token`, you can remove `JWT_GENERATOR_USERNAME` and `JWT_GENERATOR_PASSWORD` environment variables to keep safe.

### Setup Client

Expand All @@ -45,17 +43,19 @@ $ lite-http-tunnel -h
$ lite-http-tunnel config server https://your_web_host_domain
```

#### Config jwt token that you got from server:
#### Auth with server:

```shell
$ lite-http-tunnel config jwt your_jwt_token
$ lite-http-tunnel auth $JWT_GENERATOR_USERNAME $JWT_GENERATOR_PASSWORD
```

> Replace `$JWT_GENERATOR_USERNAME` and `$JWT_GENERATOR_PASSWORD` with values that you provide at tunnel server
#### Or With specified profile

```shell
$ lite-http-tunnel config server https://your_web_host_domain -p profile1
$ lite-http-tunnel config jwt your_jwt_token -p profile1
$ lite-http-tunnel auth $JWT_GENERATOR_USERNAME $JWT_GENERATOR_PASSWORD -p profile1
```

#### Start client
Expand Down
88 changes: 40 additions & 48 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"express": "^4.17.3",
"jsonwebtoken": "^8.5.1",
"morgan": "^1.10.0",
"socket.io": "^4.4.1",
"socket.io": "^4.6.1",
"uuid": "^8.3.2"
}
}

0 comments on commit 05e92b9

Please sign in to comment.