logo
GeekFormat

Forwarded Header Parser

标准 Forwarded 头

解析 RFC 7239 的 Forwarded 代理链,查看 for / by / host / proto 每一跳的值。

Hop #1
for203.0.113.43
protohttps
hostapp.geekformat.com
Hop #2
for10.0.0.9
byingress

X-Forwarded-* 兼容头

很多网关仍然在用 X-Forwarded-For / Host / Proto。这里会按链路顺序拆出客户端和代理地址。

2 个 X-Forwarded-For 节点这类头部只有在可信代理链中才有意义,不能直接当成真实客户端 IP。
#1203.0.113.43
#210.0.0.9

JSON 预览

{
  "standardized": [
    {
      "index": 0,
      "pairs": {
        "for": "203.0.113.43",
        "proto": "https",
        "host": "app.geekformat.com"
      }
    },
    {
      "index": 1,
      "pairs": {
        "for": "10.0.0.9",
        "by": "ingress"
      }
    }
  ],
  "legacy": {
    "x-forwarded-for": [
      "203.0.113.43, 10.0.0.9"
    ],
    "x-forwarded-proto": [
      "https"
    ],
    "x-forwarded-host": [
      "app.geekformat.com"
    ]
  }
}