You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Chrome中是否有API可获取Incognito及代理详情?

Chrome中是否有API可获取隐身模式及代理详情?

Firefox的webRequest.onBeforeRequest事件会返回请求的隐身模式状态和代理详情,示例返回数据如下:

{
  "requestId": "25484",
  "url": "https://example.com/favicon.ico",
  "originUrl": "https://example.com/",
  "method": "GET",
  "type": "main_frame",
  "timeStamp": 1573050075868,
  "frameId": 0,
  "parentFrameId": -1,
  "thirdParty": false,
  "proxyInfo": {
    "connectionIsolationKey": "",
    "failoverTimeout": 5,
    "host": "1.1.1.1",
    "port": 4443,
    "proxyAuthorizationHeader": "",
    "proxyDNS": false,
    "type": "https",
    "username": ""
  },
  "ip": null,
  "frameAncestors": [],
  "urlClassification": {
    "firstParty": [],
    "thirdParty": []
  },
  "requestSize": 0,
  "responseSize": 0,
  "tabId": 237,
  "incognito": false
}

但Chrome的webRequest.onBeforeRequest事件并不提供隐身模式状态和代理相关详情,示例返回数据如下:

{
  "documentId": "DCB...0EE",
  "documentLifecycle": "active",
  "frameId": 0,
  "frameType": "outermost_frame",
  "initiator": "https://example.com",
  "method": "GET",
  "parentFrameId": -1,
  "requestId": "1418",
  "tabId": 1999507272,
  "timeStamp": 1702847041866.347,
  "type": "image",
  "url": "https://example.com/favicon.ico"
}

内容的提问来源于stack exchange,提问作者erosman

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.02 10:51:18