mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +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",
|
"name": "trilium",
|
||||||
"version": "0.33.7",
|
"version": "0.34.0-beta",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -98,6 +98,11 @@ function getClient(opts) {
|
|||||||
return require('electron').net;
|
return require('electron').net;
|
||||||
}
|
}
|
||||||
else {
|
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
|
// 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
|
// connecting to the proxy server and not to the end-target server
|
||||||
const {protocol} = url.parse(opts.proxy || opts.url);
|
const {protocol} = url.parse(opts.proxy || opts.url);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user