Skip to content

Build your personal knowledge base with Trilium Notes

option to use node's http client for sync without proxy

zadamea0835561cb3
diff --git a/package-lock.json b/package-lock.json
index b18de15c69..c0c9210b21 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "trilium",
- "version": "0.33.7",
+ "version": "0.34.0-beta",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/src/services/request.js b/src/services/request.js
index 20633820d7..69d8c1f0a7 100644
--- a/src/services/request.js
+++ b/src/services/request.js
@@ -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);