From 927da9f83889f9906a611a79b790dc7a85006a7f Mon Sep 17 00:00:00 2001
From: librelois <elois@ifee.fr>
Date: Sun, 29 Oct 2017 18:45:26 +0100
Subject: [PATCH] add command --rm-proxies

---
 app/cli.ts | 1 +
 index.ts   | 5 +++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/app/cli.ts b/app/cli.ts
index bab8e0d65..187022269 100644
--- a/app/cli.ts
+++ b/app/cli.ts
@@ -53,6 +53,7 @@ export const ExecuteCommand = () => {
         .option('--proxy-tor <host:port>', 'Use Tor Socks Proxy')
         .option('--tor-always', 'Pass all outgoing requests through the tor network')
         .option('--tor-mixed', 'Pass only ".onion" outgoing requests through the tor network. It\'s the default behavior')
+        .option('--rm-proxies', 'Remove all proxies')
 
         .option('--timeout <milliseconds>', 'Timeout to use when contacting peers', parseInt)
         .option('--httplogs', 'Enable HTTP logs')
diff --git a/index.ts b/index.ts
index b1d842581..60adec394 100644
--- a/index.ts
+++ b/index.ts
@@ -452,7 +452,8 @@ function commandLineConf(program:any, conf:ConfDTO = ConfDTO.mock()) {
       proxySocks: program.proxySocks,
       proxyTor: program.proxyTor,
       torAlways: program.torAlways,
-      torMixed: program.torMixed
+      torMixed: program.torMixed,
+      rmProxies: program.rmProxies
     },
     logs: {
       http: program.httplogs,
@@ -467,7 +468,7 @@ function commandLineConf(program:any, conf:ConfDTO = ConfDTO.mock()) {
   };
 
   // Declare proxyConf
-  if (cli.proxies.proxySocks || cli.proxies.proxyTor || cli.proxies.torAlways || cli.proxies.torMixed) {
+  if (cli.proxies.proxySocks || cli.proxies.proxyTor || cli.proxies.torAlways || cli.proxies.torMixed || cli.proxies.rmProxies) {
     conf.proxyConf = Proxy.defaultConf()
   }
 
-- 
GitLab