当添加物安装时,我需要设定代理环境。 下面是文件https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/proxy/dings。 但是,它没有发挥作用。
脑膜炎
{
"manifest_version": 2,
"name": "Secure Proxy",
"version": "1.0",
"description": "Secure Proxy.",
"permissions": [
"proxy"
],
"background": {
"scripts" : ["js/背景:js"]
}
}
背景:js
let proxySettings = {
proxyType: "manual",
http: "118.97.151.130:9090",
httpProxyAll: true
};
browser.proxy.settings.set({value: proxySettings});