config: add a setting to disable proxy settings

This commit is contained in:
pvs 2022-01-28 06:40:07 -08:00
parent 5daede1333
commit 44dba9c482
2 changed files with 11 additions and 0 deletions

View file

@ -559,6 +559,13 @@ export class default_config {
// "https": "https://username:password@hostname:port"
})
/**
* Whether to use proxy settings.
*
* If set to `true`, all proxy settings will be ignored.
*/
noproxy: "true" | "false" = "false"
/**
* Strict mode will always ensure a domain is open in the correct container, replacing the current tab if necessary.
*

View file

@ -140,6 +140,10 @@ export const onRequestListener = async (
): Promise<ProxyInfo[] | never[]> => {
const noProxy = []
if (config.get("noproxy") === "true") {
return noProxy
}
try {
const proxies = await getProxiesForUrl(details.url)