diff --git a/src/resources.ts b/src/resources.ts index c93f52e1dc..dec8fb0a94 100644 --- a/src/resources.ts +++ b/src/resources.ts @@ -4,56 +4,286 @@ import * as utils from "./utils"; export const indexPage: string = `\ - +
-Streaming Data Transfer Server over HTTP/HTTPS
-基于 HTTP/HTTPS 的实时数据中继服务
+${url} 替换为您的服务器地址(如 http://localhost:8080)
+ curl ${url}/mypath
+
+ curl -T myfile ${url}/mypath
+
+ echo '你好!' | curl -T - ${url}/mypath
+
+ # zip 格式
+zip -q -r - ./mydir | curl -T - ${url}/mypath
+
+# tar.gz 格式
+tar zfcp - ./mydir | curl -T - ${url}/mypath
+
+ # 发送加密
+cat myfile | openssl aes-256-cbc | curl -T - ${url}/mypath
+
+# 接收解密
+curl ${url}/mypath | openssl aes-256-cbc -d
+
+ # 发送端指定 3 个接收者
+curl -T video.mp4 "${url}/video?n=3"
+
+# 三个终端同时接收
+curl "${url}/video?n=3" -o part1.mp4 &
+curl "${url}/video?n=3" -o part2.mp4 &
+curl "${url}/video?n=3" -o part3.mp4
+