2024-11-12 22:59:37 +09:00
|
|
|
|
2024-11-23 14:49:04 +09:00
|
|
|
## normal operation
|
2025-01-07 23:59:39 +09:00
|
|
|
- ./hodu server --rpc-on=0.0.0.0:9999 --ctl-on=0.0.0.0:8888 --pxy-on=0.0.0.0:9998 --wpx-on=0.0.0.0:9997
|
2025-01-07 13:44:37 +09:00
|
|
|
- ./hodu client --rpc-to=127.0.0.1:9999 --ctl-on=127.0.0.1:7777 192.168.1.130:8000
|
2024-11-20 00:31:14 +09:00
|
|
|
|
|
|
|
## server.json
|
|
|
|
```
|
|
|
|
{
|
|
|
|
"server-addr": "127.0.0.1:9999",
|
|
|
|
"peer-addrs": [
|
|
|
|
"127.0.0.1:22",
|
|
|
|
"127.0.0.1:80"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2025-01-07 13:44:37 +09:00
|
|
|
|
2024-11-23 14:49:04 +09:00
|
|
|
## client control channel
|
|
|
|
|
2025-01-07 13:44:37 +09:00
|
|
|
|
|
|
|
### Add a new route
|
|
|
|
|
|
|
|
|
|
|
|
`clinet-route.json` contains the following text:
|
|
|
|
|
|
|
|
```
|
|
|
|
{
|
2025-01-07 23:59:39 +09:00
|
|
|
"id": 0,
|
2025-01-07 13:44:37 +09:00
|
|
|
"client-peer-addr": "192.168.1.104:22",
|
|
|
|
"client-peer-name": "Star gate",
|
|
|
|
"server-peer-option": "tcp4 ssh",
|
|
|
|
"server-peer-service-addr": "0.0.0.0:0",
|
|
|
|
"server-peer-service-net": "",
|
2025-01-07 15:23:05 +09:00
|
|
|
"lifetime": "0"
|
2025-01-07 13:44:37 +09:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
Run this command:
|
2024-11-20 00:31:14 +09:00
|
|
|
```
|
2025-01-07 13:44:37 +09:00
|
|
|
curl -X POST --data-binary @client-route.json http://127.0.0.1:7777/_ctl/client-conns/0/routes
|
2024-11-20 00:31:14 +09:00
|
|
|
```
|