Xboard搭建Hysteria2节点

碎碎念

又来水文章了,也有白嫖需求。记录一下自己的Hysteria2节点搭建对接。

安装Certbot

1
apt install cerbot -y

获取证书

1
certbot certonly --standalone --agree-tos -m yourmail -n -d yourdoamin

Docker Compose

这里目前建议用v1.0.7,因为latest有bug

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
version: "3.9"
services:
  hysteria:
    image: ghcr.io/cedar2025/hysteria:v1.0.7
    container_name: hysteria
    restart: always
    network_mode: "host"
    volumes:
      - /etc/letsencrypt/live/your-domain.com/fullchain.pem:/acme/fullchain.pem
      - /etc/letsencrypt/live/your-domain.com/privkey.pem:/acme/privkey.pem
      - ./hysteria.yaml:/etc/hysteria.yaml
    command: ["server", "-c", "/etc/hysteria.yaml"]

hysteria.yaml

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
v2board:
  apiHost: https://114514.15.19
  apiKey: 114514
  nodeID: 1
tls:
  type: tls
  cert: /acme/fullchain.pem
  key: /acme/privkey.pem
auth:
  type: v2board
trafficStats:
  listen: 127.0.0.1:7653
acl:
  inline:
    - reject(10.0.0.0/8)
    - reject(172.16.0.0/12)
    - reject(192.168.0.0/16)
    - reject(127.0.0.0/8)
    - reject(fc00::/7)
comments powered by Disqus
使用 Hugo 构建
主题 StackJimmy 设计