File tree Expand file tree Collapse file tree 5 files changed +57
-0
lines changed
Expand file tree Collapse file tree 5 files changed +57
-0
lines changed Original file line number Diff line number Diff line change 7474## 进度日志
7575
7676- 2026-02-10:创建跟踪文档,完成协议/配置要点摘录(进行中)
77+ - 2026-02-10:新增本地联调用 server 配置与证书生成脚本:` agent-docs/hysteria/ `
Original file line number Diff line number Diff line change 1+ cert.pem
2+ key.pem
3+
Original file line number Diff line number Diff line change 1+ # Local Hysteria v2 server (for dev)
2+
3+ This folder contains a minimal server config and helper scripts for running a ** local** Hysteria v2
4+ server for integration testing.
5+
6+ ## Generate a self-signed cert
7+
8+ ``` bash
9+ cd agent-docs/hysteria
10+ ./gen-cert.sh
11+ ```
12+
13+ This creates ` cert.pem ` and ` key.pem ` (ignored by git).
14+
15+ ## Start server
16+
17+ ``` bash
18+ hysteria server -c agent-docs/hysteria/server.yaml
19+ ```
20+
21+ Default settings in ` server.yaml ` :
22+ - listen: ` 127.0.0.1:18443 `
23+ - auth password: ` test-password `
24+
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+
4+ DIR=" $( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " && pwd) "
5+ cd " $DIR "
6+
7+ if [[ -f cert.pem || -f key.pem ]]; then
8+ echo " cert.pem/key.pem already exist; delete them if you want to regenerate." >&2
9+ exit 1
10+ fi
11+
12+ openssl req -x509 -newkey rsa:2048 -sha256 -days 3650 -nodes \
13+ -keyout key.pem \
14+ -out cert.pem \
15+ -subj " /CN=localhost" \
16+ -addext " subjectAltName=DNS:localhost,IP:127.0.0.1,IP:::1"
17+
18+ echo " generated: cert.pem key.pem"
19+
Original file line number Diff line number Diff line change 1+ listen : 127.0.0.1:18443
2+
3+ tls :
4+ cert : agent-docs/hysteria/cert.pem
5+ key : agent-docs/hysteria/key.pem
6+
7+ auth :
8+ type : password
9+ password : test-password
10+
You can’t perform that action at this time.
0 commit comments