折腾啥
有些用户在 Agent 服务器上开启了代理, 这可能会导致哪吒管理面板中显示的 IP 和 Agent 实际 IP 不一致 🏊🏻方案1: 可尝试配置分流(但是可能国内使用这些接口也很蛋疼) 查看 https://github.com/nezhahq/agent/blob/main/pkg/monitor/myip.go 中的接口 1. 以 Surge macOS 为例(仅对 nezha-agent 的 IP 查询接口进行分流) AND,((PROCESS-NAME,nezha-agent), (OR…
更新: 哪吒管理面板中显示的 IP 和 Agent 实际 IP 不一致

🆕 更新方案2 自建 IP 查询接口并配置 Agent

👨🏻‍💻方案2: 自建接口直连

Nginx 为例:
location /ip {
  return 200 'ip=$remote_addr';
  add_header Content-Type text/plain;
}


Agent 配置( /opt/nezha/agent/config.yml ):

custom_ip_api:
  - 'https://a.com/ip'
  - 'https://b.com/ip'


原消息