2024-02-13 19:07:56 +07:00
|
|
|
# Tunnel Config
|
|
|
|
## Server
|
|
|
|
Run the command
|
|
|
|
```
|
|
|
|
cactus-tunnel server
|
|
|
|
```
|
|
|
|
|
|
|
|
## Client
|
|
|
|
Run the command
|
|
|
|
```
|
2024-02-13 19:10:19 +07:00
|
|
|
cactus-tunnel client -v ws://[TUNNEL_SERVER]:[TUNNEL_SERVER_PORT] [HOST_SERVER]:[HOST_SERVER_PORT] -h [CLIENT_TARGET] -p [CLIENT_TARGET_PORT]
|
2024-02-13 19:07:56 +07:00
|
|
|
```
|
|
|
|
### Explanation
|
|
|
|
- `ws://[TUNNEL_SERVER]:[TUNNEL_SERVER_PORT]` - The tunnel server itself
|
|
|
|
- `[HOST_SERVER]:[HOST_SERVER_PORT]` - The thing you want to access (For example: `127.0.0.1:80` is the web server on the host server)
|
|
|
|
- `-h [CLIENT_TARGET] -p [CLIENT_TARGET_PORT]` - Where you want the thing to be tunneled to
|
|
|
|
|
|
|
|
Basically:
|
|
|
|
We are using `TUNNEL_SERVER` to tunnel connection from `HOST_SERVER` to `CLIENT_TARGET`
|