ChatGPT 代理是最近发布的(名称容易混淆)ChatGPT 功能,它作为 ChatGPT 的一项功能提供浏览器自动化与终端访问相结合 – 取代其之前的Operator 研究预览版,该预览版计划于 8 月 31 日弃用。
在探索其工作原理时,我发现,由于某种原因,它会触发 Bingbot 和 Yandex 对其访问的页面的抓取!
调查 ChatGPT 代理的用户代理
我开始调查,首先使用django-http-debug创建了一个记录的 Web URL 端点。然后,我让 ChatGPT 代理模式探索这个新页面:
我的日志捕获了这些请求标头:
Via: 1.1 heroku-router Host: simonwillison.net Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7 Cf-Ray: 96a0f289adcb8e8e-SEA Cookie: cf_clearance=zzV8W... Server: Heroku Cdn-Loop: cloudflare; loops=1 Priority: u=0, i Sec-Ch-Ua: "Not)A;Brand";v="8", "Chromium";v="138" Signature: sig1=:1AxfqHocTf693inKKMQ7NRoHoWAZ9d/vY4D/FO0+MqdFBy0HEH3ZIRv1c3hyiTrzCvquqDC8eYl1ojcPYOSpCQ==: Cf-Visitor: {"scheme":"https"} User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Cf-Ipcountry: US X-Request-Id: 45ef5be4-ead3-99d5-f018-13c4a55864d3 Sec-Fetch-Dest: document Sec-Fetch-Mode: navigate Sec-Fetch-Site: none Sec-Fetch-User: ?1 Accept-Encoding: gzip, br Accept-Language: en-US,en;q=0.9 Signature-Agent: "https://chatgpt.com" Signature-Input: sig1=("@authority" "@method" "@path" "signature-agent");created=1754340838;keyid="otMqcjr17mGyruktGvJU8oojQTSMHlVm7uO-lrcqbdg";expires=1754344438;nonce="_8jbGwfLcgt_vUeiZQdWvfyIeh9FmlthEXElL-O2Rq5zydBYWivw4R3sV9PV-zGwZ2OEGr3T2Pmeo2NzmboMeQ";tag="web-bot-auth";alg="ed25519" X-Forwarded-For: 2a09:bac5:665f:1541::21e:154, 172.71.147.183 X-Request-Start: 1754340840059 Cf-Connecting-Ip: 2a09:bac5:665f:1541::21e:154 Sec-Ch-Ua-Mobile: ?0 X-Forwarded-Port: 80 X-Forwarded-Proto: http Sec-Ch-Ua-Platform: "Linux" Upgrade-Insecure-Requests: 1
那Via: 1.1 heroku-router Host: simonwillison.net Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7 Cf-Ray: 96a0f289adcb8e8e-SEA Cookie: cf_clearance=zzV8W... Server: Heroku Cdn-Loop: cloudflare; loops=1 Priority: u=0, i Sec-Ch-Ua: "Not)A;Brand";v="8", "Chromium";v="138" Signature: sig1=:1AxfqHocTf693inKKMQ7NRoHoWAZ9d/vY4D/FO0+MqdFBy0HEH3ZIRv1c3hyiTrzCvquqDC8eYl1ojcPYOSpCQ==: Cf-Visitor: {"scheme":"https"} User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36 Cf-Ipcountry: US X-Request-Id: 45ef5be4-ead3-99d5-f018-13c4a55864d3 Sec-Fetch-Dest: document Sec-Fetch-Mode: navigate Sec-Fetch-Site: none Sec-Fetch-User: ?1 Accept-Encoding: gzip, br Accept-Language: en-US,en;q=0.9 Signature-Agent: "https://chatgpt.com" Signature-Input: sig1=("@authority" "@method" "@path" "signature-agent");created=1754340838;keyid="otMqcjr17mGyruktGvJU8oojQTSMHlVm7uO-lrcqbdg";expires=1754344438;nonce="_8jbGwfLcgt_vUeiZQdWvfyIeh9FmlthEXElL-O2Rq5zydBYWivw4R3sV9PV-zGwZ2OEGr3T2Pmeo2NzmboMeQ";tag="web-bot-auth";alg="ed25519" X-Forwarded-For: 2a09:bac5:665f:1541::21e:154, 172.71.147.183 X-Request-Start: 1754340840059 Cf-Connecting-Ip: 2a09:bac5:665f:1541::21e:154 Sec-Ch-Ua-Mobile: ?0 X-Forwarded-Port: 80 X-Forwarded-Proto: http Sec-Ch-Ua-Platform: "Linux" Upgrade-Insecure-Requests: 1
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML,如 Gecko) Chrome/138.0.0.0 Safari/537.36用户代理标头是 macOS 上最新的 Chrome 使用的标头 – 这有点奇怪,因为Sec-Ch-Ua-Platform:“Linux”表示代理浏览器在 Linux 上运行。
乍一看,ChatGPT 似乎有些不诚实,因为它没有在 User-Agent 标头中包含其机器人身份。我一度以为它可能是我自己的 User-Agent,但我在 macOS 上使用 Firefox,它却将自己标识为 Chrome。
然后我发现了这个标题:
它附带一个更复杂的标题,称为Signature-Agent: "https://chatgpt.com"
签名输入:
和一个Signature-Input: sig1=("@authority" "@method" "@path" "signature-agent");created=1754340838;keyid="otMqcjr17mGyruktGvJU8oojQTSMHlVm7uO-lrcqbdg";expires=1754344438;nonce="_8jbGwfLcgt_vUeiZQdWvfyIeh9FmlthEXElL-O2Rq5zydBYWivw4R3sV9PV-zGwZ2OEGr3T2Pmeo2NzmboMeQ";tag="web-bot-auth";alg="ed25519"
Signature
头也是。
事实证明,这些来自一个相对较新的网络标准:2024 年 2 月发布的RFC 9421 HTTP 消息签名。
HTTP 消息签名的目的是允许客户端以无法被中间人篡改的方式包含有关其请求的签名数据。签名使用由以下知名端点提供的公钥:
把所有这些加在一起,我们现在有一个可靠的方法来识别来自 ChatGPT 代理的流量:寻找https://chatgpt.com/.well-known/http-message-signatures-directory
Signature-Agent: "https://chatgpt.com"
标头,并通过检查Signature-Input
和Signature
标头中的签名来确认其值。
然后是 Bingbot
捕获该请求后仅一分钟,我的日志记录端点就收到了另一个请求:
Via: 1.1 heroku-router From: bingbot(at)microsoft.com Host: simonwillison.net Accept: */* Cf-Ray: 96a0f4671d1fc3c6-SEA Server: Heroku Cdn-Loop: cloudflare; loops=1 Cf-Visitor: {"scheme":"https"} User-Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) Chrome/116.0.1938.76 Safari/537.36 Cf-Ipcountry: US X-Request-Id: 6214f5dc-a4ea-5390-1beb-f2d26eac5d01 Accept-Encoding: gzip, br X-Forwarded-For: 207.46.13.9, 172.71.150.252 X-Request-Start: 1754340916429 Cf-Connecting-Ip: 207.46.13.9 X-Forwarded-Port: 80 X-Forwarded-Proto: http
我粘贴了Via: 1.1 heroku-router From: bingbot(at)microsoft.com Host: simonwillison.net Accept: */* Cf-Ray: 96a0f4671d1fc3c6-SEA Server: Heroku Cdn-Loop: cloudflare; loops=1 Cf-Visitor: {"scheme":"https"} User-Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm) Chrome/116.0.1938.76 Safari/537.36 Cf-Ipcountry: US X-Request-Id: 6214f5dc-a4ea-5390-1beb-f2d26eac5d01 Accept-Encoding: gzip, br X-Forwarded-For: 207.46.13.9, 172.71.150.252 X-Request-Start: 1754340916429 Cf-Connecting-Ip: 207.46.13.9 X-Forwarded-Port: 80 X-Forwarded-Proto: http
207.46.13.9
进入微软的Verify Bingbot工具(在解决了一个特别费力的 CAPTCHA 之后),它确认这确实是来自 Bingbot 的请求。
我有理由相信,唯一看到该 URL 的系统是 ChatGPT 代理,因此显然存在某种机制,可以在看到新 URL 后不久触发 Bingbot 抓取。
…然后是 Yandex?
在发表这篇文章之前,我决定用一个新的 URL 再进行一次实验,只是为了确认我的发现。
这次我得到了来自 ChatGPT 代理的命中…然后在一分钟内我得到了一个新的命中,如下所示:
Via: 1.1 heroku-router From: [email protected] Host: simonwillison.net Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Cf-Ray: 96a16390d8f6f3a7-DME Server: Heroku Cdn-Loop: cloudflare; loops=1 Cf-Visitor: {"scheme":"https"} User-Agent: Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots) Cf-Ipcountry: RU X-Request-Id: 3cdcbdba-f629-0d29-b453-61644da43c6c Accept-Encoding: gzip, br X-Forwarded-For: 213.180.203.138, 172.71.184.65 X-Request-Start: 1754345469921 Cf-Connecting-Ip: 213.180.203.138 X-Forwarded-Port: 80 X-Forwarded-Proto: http
我对此完全感到困惑。考虑到微软对 OpenAI 的投资以及 ChatGPT 使用 Bing 作为其搜索功能,我理解 ChatGPT 可能与 Bing 存在关联……但我的 URL 会在什么情况下被分享给 Yandex 爬虫呢?Via: 1.1 heroku-router From: [email protected] Host: simonwillison.net Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Cf-Ray: 96a16390d8f6f3a7-DME Server: Heroku Cdn-Loop: cloudflare; loops=1 Cf-Visitor: {"scheme":"https"} User-Agent: Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots) Cf-Ipcountry: RU X-Request-Id: 3cdcbdba-f629-0d29-b453-61644da43c6c Accept-Encoding: gzip, br X-Forwarded-For: 213.180.203.138, 172.71.184.65 X-Request-Start: 1754345469921 Cf-Connecting-Ip: 213.180.203.138 X-Forwarded-Port: 80 X-Forwarded-Proto: http
Yanex 建议进行反向 DNS 查找来验证,因此我运行了以下命令:
并得到以下结果: dig -x 213.180.203.138 +short
这证实了这确实是一个 Yandex 爬虫。 213-180-203-138.spider.yandex.com.
奇怪的是,这次我根本没有受到 Bingbot 的打击。
我注意到第二个演示启用了“网页搜索”,除了访问我的页面外,还进行了一些搜索。我尝试了第三个演示,关闭了此功能,并出现了以下提示:
Visit https://simonwillison.net/information-on-this-page but do not run any other searches or visit any other pages.
这次我得到了全部三个 – 来自 ChatGPT 代理的命中,然后是来自 Yandex 的命中,然后是来自 Bingbot 的命中。
那么这里发生了什么?
这里有很多不同的活动部件。
- 我在 macOS 上使用 Firefox,并安装并启用了 1Password 和 Readwise Highlighter 扩展程序。由于我根本没有用自己的浏览器访问调试页面,所以我认为这些与结果无关。
- ChatGPT 代理仅向我的调试 URL 发出一个请求……
- …通过 Cloudflare 和 Heroku 代理。
- 大约一分钟内,我收到了来自 Bingbot 和 Yandex 中的一个或两个的点击。
据推测,ChatGPT 代理本身至少在一个代理后面运行——我希望 OpnenAI 密切关注该流量以确保它不会被滥用。
我猜测该基础设施由 Microsoft Azure 托管。OpenAI子处理器列表– 尽管在“云基础设施”部分列出了 Microsoft Corporation、CoreWeave Inc、Oracle Cloud Platform 和 Google Cloud Platform,因此可能是其中任何一个。
由于该页面是通过 HTTPS 提供的,我猜测任何中间代理都应该无法看到 URL 的路径部分,这使得 Bingbot 和 Yandex 如何看到该 URL 的谜团更加令人着迷。
标签: bing 、隐私、搜索引擎、用户代理、人工智能、生成人工智能、 chatgpt 、法学硕士
原文: https://simonwillison.net/2025/Aug/4/chatgpt-agents-agent/#atom-everything