记bwh的Hysteria 2配置

记记配置。。。讲真yaml真的比json直观很多,就算是自己用也不太需要一键脚本就能很容易写出不少功能的配置。

工具主页:https://v2.hysteria.network/zh/

安装,升级和卸载:

安装和升级:bash <(curl -fsSL https://get.hy2.sh/)
卸载:bash <(curl -fsSL https://get.hy2.sh/) --remove
配置文件:/etc/hysteria/config.yaml

现在的配置文件(2023.11.8):

/etc/hysteria/config.yaml
listen: :443

acme:
  domains:
    - bwh.luke6887.me
  email: [email protected]

auth:
  type: password
  password: 45WwrUV6bZryL75dYnXsC8EruPnfKJ4V

masquerade:
  type: proxy
  proxy:
    url: https://luke6887.me/
    rewriteHost: true
  listenHTTP: :80
  listenHTTPS: :443
  forceHTTPS: true

bandwidth:
  up: 2 gbps
  down: 2 gbps
  ignoreClientBandwidth: true

outbounds:
  - name: direct
    type: direct
  - name: media_unlock
    type: socks5
    socks5:
      addr: 23.26.217.105:10810

acl:
  inline:
   - media_unlock(geosite:netflix)
   - media_unlock(geosite:bilibili)
   - media_unlock(geosite:disney)
   - media_unlock(geosite:openai)
   - media_unlock(geosite:amazon)
   - media_unlock(geosite:spotify)
   - media_unlock(geosite:steam)
   - direct(all)

然后重启,设置hysteria开机启动:

systemctl restart hysteria-server.service
systemctl enable hysteria-server.service

作为解锁流媒体的分流机安装dnate-server:

安装:apt install dante-server
配置文件:/etc/danted.conf

解锁机的sock5代理(dante-server)配置:

/etc/danted.conf
internal: 0.0.0.0 port = 10810
external: eth0
logoutput: syslog
socksmethod: none
clientmethod: none
client pass {
    from: 0.0.0.0/0 to: 0.0.0.0/0
}

socks pass {
    from: 0.0.0.0/0 to: 0.0.0.0/0

重启一下:

systemctl restart danted

 

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注