From 295228b5e2c937496d1569a51b07fe7fa01a4ba9 Mon Sep 17 00:00:00 2001 From: runbtc <143069848+runbtc@users.noreply.github.com> Date: Mon, 6 May 2024 21:45:49 -0700 Subject: [PATCH] Use cookie auth for Tor control --- seednode/bisq.env | 2 ++ seednode/bisq.service | 2 ++ seednode/torrc | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/seednode/bisq.env b/seednode/bisq.env index 6d1aa7fc26..f7109c0a6f 100644 --- a/seednode/bisq.env +++ b/seednode/bisq.env @@ -9,6 +9,8 @@ JAVA_OPTS="-Xms4096M -Xmx4096M -XX:+ExitOnOutOfMemoryError" # use external tor (change to -1 for internal tor binary) BISQ_EXTERNAL_TOR_PORT=9051 +BISQ_EXTERNAL_TOR_CONTROL_USE_COOKIE=true +BISQ_EXTERNAL_TOR_CONTROL_COOKIE_FILE=/var/lib/tor/control_auth_cookie # bitcoin rpc credentials BITCOIN_RPC_USER=__BITCOIN_RPC_USER__ diff --git a/seednode/bisq.service b/seednode/bisq.service index 1cfed06c2c..18b1949988 100644 --- a/seednode/bisq.service +++ b/seednode/bisq.service @@ -28,6 +28,8 @@ ExecStart=/bin/bash __BISQ_HOME__/__BISQ_REPO_NAME__/${BISQ_ENTRYPOINT} \ --dumpBlockchainData=${BISQ_DUMP_BLOCKCHAIN} \ --dumpStatistics=${BISQ_DUMP_STATISTICS} \ --torControlPort=${BISQ_EXTERNAL_TOR_PORT} \ + --torControlUseSafeCookieAuth=${BISQ_EXTERNAL_TOR_CONTROL_USE_COOKIE} \ + --torControlCookieFile=${BISQ_EXTERNAL_TOR_CONTROL_COOKIE_FILE} \ ExecStop=/bin/kill ${MAINPID} ; sleep 5 Restart=on-failure diff --git a/seednode/torrc b/seednode/torrc index 1a9d20ee98..44017a9e88 100644 --- a/seednode/torrc +++ b/seednode/torrc @@ -3,7 +3,7 @@ SOCKSPort 9050 ControlPort 9051 Log notice syslog -CookieAuthentication 0 +CookieAuthentication 1 CookieAuthFileGroupReadable 1 DataDirectoryGroupReadable 1