mirror of
https://github.com/vale981/tridactyl
synced 2025-03-06 01:51:40 -05:00
config: add a setting to disable proxy settings
This commit is contained in:
parent
5daede1333
commit
44dba9c482
2 changed files with 11 additions and 0 deletions
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue