mirror of
https://github.com/zadam/trilium.git
synced 2025-06-05 09:28:45 +02:00
option to use node's http client for sync without proxy
This commit is contained in:
parent
b0c0c5f56b
commit
ea0835561c
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "trilium",
|
||||
"version": "0.33.7",
|
||||
"version": "0.34.0-beta",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
@ -98,6 +98,11 @@ function getClient(opts) {
|
||||
return require('electron').net;
|
||||
}
|
||||
else {
|
||||
// hack for cases where electron.net does not work but we don't want to set proxy
|
||||
if (opts.proxy === 'noproxy') {
|
||||
opts.proxy = null;
|
||||
}
|
||||
|
||||
// in case there's explicit proxy then we need to use protocol of the proxy since we're actually
|
||||
// connecting to the proxy server and not to the end-target server
|
||||
const {protocol} = url.parse(opts.proxy || opts.url);
|
||||
|
Loading…
x
Reference in New Issue
Block a user