Skip to content

Commit 8250c3b

Browse files
committed
fix: recording and playback doc
1 parent ab9ed62 commit 8250c3b

File tree

7 files changed

+1033
-858
lines changed

7 files changed

+1033
-858
lines changed

.github/workflows/deploy.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,12 @@ jobs:
3232
run: pnpm run build
3333

3434
- name: Deploy to server via SFTP
35-
uses: SamKirkland/[email protected]
35+
uses: appleboy/[email protected]
3636
with:
37-
server: ${{ secrets.SFTP_HOST }}
37+
host: ${{ secrets.SFTP_HOST }}
3838
username: ${{ secrets.SFTP_USERNAME }}
3939
password: ${{ secrets.SFTP_PASSWORD }}
4040
port: ${{ secrets.SFTP_PORT }}
41-
protocol: sftp
42-
local-dir: ./.vitepress/dist/
43-
server-dir: ${{ secrets.SFTP_SERVER_DIR }}
44-
exclude: |
45-
**/.git*
46-
**/.git*/**
47-
**/node_modules/**
48-
.env
41+
source: ".vitepress/dist/*"
42+
target: ${{ secrets.SFTP_SERVER_DIR }}
43+
strip_components: 2

docs/en/features/cascade.md

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ The cascade feature consists of two core components:
3535
Configure the cascade server in the configuration file:
3636

3737
```yaml
38-
cascade-server:
38+
cascadeserver:
3939
# QUIC listening address configuration
4040
quic:
4141
listenaddr: ":44944" # Cascade server listening port
@@ -45,18 +45,21 @@ cascade-server:
4545

4646
# Access control configuration
4747
relayapi:
48-
enable: true # Whether to enable API forwarding
49-
whitelist: # IP whitelist
48+
allow: # Allowed IP addresses/networks
5049
- "192.168.1.0/24"
5150
- "10.0.0.0/8"
51+
deny: [] # Denied IP addresses/networks
5252
```
5353
5454
### Cascade Client Configuration
5555
5656
Configure the cascade client in the configuration file:
5757
5858
```yaml
59-
cascade-client:
59+
cascadeclient:
60+
# Whether to enable cascade client
61+
enable: true
62+
6063
# Upper-level server address
6164
server: "192.168.1.100:44944"
6265

@@ -66,11 +69,15 @@ cascade-client:
6669
# Whether to automatically push streams to upper level
6770
autopush: true
6871

72+
# On-demand pull configuration
73+
onsub:
74+
pull: "live/.*" # Regex pattern for streams to pull on subscription
75+
6976
# Access control configuration
7077
relayapi:
71-
enable: true
72-
whitelist:
78+
allow: # Allowed IP addresses/networks
7379
- "192.168.1.0/24"
80+
deny: [] # Denied IP addresses/networks
7481
```
7582
7683
### Detailed Configuration Options
@@ -81,18 +88,20 @@ cascade-client:
8188
|--------|------|----------|---------|-------------|
8289
| quic.listenaddr | string | Yes | ":44944" | QUIC protocol listening address and port |
8390
| autoregister | boolean | No | true | Whether to allow automatic registration of lower-level nodes |
84-
| relayapi.enable | boolean | No | false | Whether to enable API forwarding functionality |
85-
| relayapi.whitelist | string array | No | [] | IP address whitelist for access |
91+
| relayapi.allow | string array | No | [] | Allowed IP addresses/networks for access |
92+
| relayapi.deny | string array | No | [] | Denied IP addresses/networks for access |
8693
8794
#### Cascade Client Configuration Options
8895
8996
| Option | Type | Required | Default | Description |
9097
|--------|------|----------|---------|-------------|
98+
| enable | boolean | No | false | Whether to enable cascade client |
9199
| server | string | Yes | - | Upper-level server address (IP:port) |
92100
| secret | string | No | - | Connection secret for authentication |
93101
| autopush | boolean | No | false | Whether to automatically push streams to upper-level node |
94-
| relayapi.enable | boolean | No | false | Whether to enable API forwarding functionality |
95-
| relayapi.whitelist | string array | No | [] | IP address whitelist for access |
102+
| onsub.pull | string | No | - | Regex pattern for streams to pull on subscription |
103+
| relayapi.allow | string array | No | [] | Allowed IP addresses/networks for access |
104+
| relayapi.deny | string array | No | [] | Denied IP addresses/networks for access |
96105
97106
## Deployment Architecture Examples
98107
@@ -109,15 +118,16 @@ Configuration example:
109118

110119
**Upper Node Configuration:**
111120
```yaml
112-
cascade-server:
121+
cascadeserver:
113122
quic:
114123
listenaddr: ":44944"
115124
autoregister: true
116125
```
117126
118127
**Lower Node Configuration:**
119128
```yaml
120-
cascade-client:
129+
cascadeclient:
130+
enable: true
121131
server: "192.168.1.100:44944"
122132
autopush: true
123133
```
@@ -140,17 +150,17 @@ Headquarters Node (HQ)
140150

141151
When a lower-level node is configured with `autopush: true`, all streams published to the lower-level node will be automatically forwarded to the upper-level node.
142152

143-
#### Manual Pull
153+
#### On-demand Pull
144154

145-
Lower-level nodes can also pull specific streams from upper-level nodes:
155+
Lower-level nodes can also configure regex patterns to automatically pull specific streams from upper-level nodes when they are subscribed to:
146156

147157
```yaml
148-
cascade-client:
158+
cascadeclient:
159+
enable: true
149160
server: "192.168.1.100:44944"
150-
# Configure pull rules
151-
pull:
152-
- streampath: "live/camera1"
153-
pullurl: "cascade://live/camera1"
161+
# Configure on-demand pull rules using regex patterns
162+
onsub:
163+
pull: "live/.*" # Pull any stream matching this pattern when subscribed
154164
```
155165
156166
### API Forwarding
@@ -236,7 +246,8 @@ curl -X POST http://server:8080/api/cascade/clients \
236246

237247
**Client-side corresponding key configuration:**
238248
```yaml
239-
cascade-client:
249+
cascadeclient:
250+
enable: true
240251
server: "server:44944"
241252
secret: "unique-secret-key"
242253
```

0 commit comments

Comments
 (0)