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
相关产品推荐
相关产品推荐

