洋芋笔记

安装带端口跳跃的hy2

首先安装必须的服务

apt update && apt install -y curl wget unzip nftables && bash <(curl -fsSL https://get.hy2.sh/)

获取我提供的伪装站点和一些配置

cd /etc/hysteria/ && wget https://blog.0112233.xyz/static/hy2.zip -O hy2.zip && unzip -o hy2.zip

然后启动hy2服务

systemctl enable --now hysteria-server.service

添加端口监听规则

cat << EOF >> /etc/nftables.conf
define INGRESS_INTERFACE="eth0"
define PORT_RANGE=41000-49000
define HYSTERIA_SERVER_PORT=9443

table inet hysteria_porthopping {
  chain prerouting {
    type nat hook prerouting priority dstnat; policy accept;
    iifname $INGRESS_INTERFACE udp dport $PORT_RANGE counter redirect to :$HYSTERIA_SERVER_PORT
  }
}
EOF