我们在 europe-west6(苏黎世)部署了一个 Google Cloud Function,它可以对 API 进行 HTTP 调用。在我们的服务器日志中,这些 HTTP 调用源自 IP 地址 35.203.247.36,该地址显示美国为来源。我期待来自瑞士的源 IP 地址。这会导致地理封锁配置出现一些问题。
我发现这个相关线程https://issuetracker.google.com/issues/72263361#comment91,它指出这应该按预期工作,但链接的 IP 范围似乎与我们的观察不同:
{
"ipv4Prefix": "34.65.0.0/16",
"service": "Google Cloud",
"scope": "europe-west6"
}, {
"ipv4Prefix": "34.104.110.0/23",
"service": "Google Cloud",
"scope": "europe-west6"
}, {
"ipv4Prefix": "34.124.46.0/23",
"service": "Google Cloud",
"scope": "europe-west6"
}, {
"ipv4Prefix": "35.216.128.0/17",
"service": "Google Cloud",
"scope": "europe-west6"
}, {
"ipv4Prefix": "35.220.44.0/24",
"service": "Google Cloud",
"scope": "europe-west6"
}, {
"ipv4Prefix": "35.235.216.0/21",
"service": "Google Cloud",
"scope": "europe-west6"
}, {
"ipv4Prefix": "35.242.44.0/24",
"service": "Google Cloud",
"scope": "europe-west6"
}, {
"ipv6Prefix": "2600:1900:4160::/44",
"service": "Google Cloud",
"scope": "europe-west6"
}
为什么我们的 API 调用不是源自这些 IP 范围之一?