侧边栏壁纸
博主头像
Leuの小站 博主等级

如果呢

  • 累计撰写 23 篇文章
  • 累计创建 6 个标签
  • 累计收到 3 条评论

目 录CONTENT

文章目录

搭建NeZha探针 套CloudFlare ipv6小鸡废物利用

Leu
Leu
2025-03-29 / 0 评论 / 1 点赞 / 94 阅读 / 0 字

1、安装Warp(如果VPS有ipv4忽略此步骤)

wget -N https://gitlab.com/fscarmen/warp/-/raw/main/menu.sh && bash menu.sh [option] [lisence/url/token]

2、安装NeZha

curl -L https://raw.githubusercontent.com/nezhahq/scripts/refs/heads/main/install.sh -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh

3、安装Caddy

apt install caddy

4、Caddy反代(如需Nginx反代请移步官网查看)

nano /etc/caddy/Caddyfile
dashboard.example.com {
    @grpcProto {
        path /proto.NezhaService/*
    }

    reverse_proxy @grpcProto {
        header_up Host {host}
        header_up nz-realip {http.CF-Connecting-IP} # 替换为你的 CDN 提供的私有 header,此处为 CloudFlare 默认
        # header_up nz-realip {remote_host} # 如果你使用caddy作为最外层,就把上面一行注释掉,启用此行
        transport http {
            versions h2c
            read_buffer 4096
        }
        to localhost:8008
    }

    reverse_proxy {
        header_up Host {host}
        header_up Origin https://{host}
        header_up nz-realip {http.CF-Connecting-IP} # 替换为你的 CDN 提供的私有 header,此处为 CloudFlare 默认
        # header_up nz-realip {remote_host} # 如果你使用caddy作为最外层,就把上面一行注释掉,启用此行
        transport http {
            read_buffer 16384
        }
        to localhost:8008
    }
}

5、CloudFlare开启grpc

网络-grpc开启 如图所示

6、对接Agent

NeZha后台要把端口换成443 开启tls 如图所示

1

评论区