From 4aed2f7f222bc8cc513bfec0e1a1dfe98fb3a70f Mon Sep 17 00:00:00 2001 From: Debian Date: Wed, 3 Sep 2025 22:24:53 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20Configuration=20Tor=20et=20Bitcoin=20pou?= =?UTF-8?q?r=20signet=20custom=20-=20Tor=20=C3=A9coute=20maintenant=20sur?= =?UTF-8?q?=20toutes=20les=20interfaces=20(0.0.0.0:9050)=20-=20Bitcoin=20s?= =?UTF-8?q?e=20connecte=20aux=20n=C5=93uds=20onion=20du=20signet=20custom?= =?UTF-8?q?=20-=20Synchronisation=20active=20avec=20le=20r=C3=A9seau=20sig?= =?UTF-8?q?net=20custom=20-=20Tous=20les=20services=20relanc=C3=A9s=20et?= =?UTF-8?q?=20fonctionnels?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- conf/bitcoin.conf | 3 ++- conf/sdk_relay1.conf | 2 +- conf/tor.conf | 43 ++++++++++-------------------------------- docker-compose.yml | 12 ++++++++++++ modules/tor/Dockerfile | 4 +++- 5 files changed, 28 insertions(+), 36 deletions(-) diff --git a/conf/bitcoin.conf b/conf/bitcoin.conf index e40d2073..2b08c36d 100644 --- a/conf/bitcoin.conf +++ b/conf/bitcoin.conf @@ -16,7 +16,7 @@ listen=1 # Paramètres RPC rpcuser=bitcoin rpcpassword=bitcoin -rpcallowip=192.168.240.0/20 +rpcallowip=172.18.0.0/16 rpcworkqueue=32 rpcthreads=4 rpcdoccheck=1 @@ -33,6 +33,7 @@ proxy=4nk-tor:9050 listenonion=1 listen=1 signetchallenge=0020341c43803863c252df326e73574a27d7e19322992061017b0dc893e2eab90821 +# Nœuds onion du réseau signet custom addnode=6xi33lwwslsx3yi3f7c56wnqtdx4v73vj2up3prrwebpwbz6qisnqbyd.onion:38333 addnode=d6i546e2sjezhyy2eupyc2wqtbgjnkubcjd4prhqurtlmp7nsp6yxqyd.onion:38333 # Ports Signet (P2P et RPC) diff --git a/conf/sdk_relay1.conf b/conf/sdk_relay1.conf index b6055d3c..73ca1ec7 100644 --- a/conf/sdk_relay1.conf +++ b/conf/sdk_relay1.conf @@ -5,7 +5,7 @@ core_url=http://4nk-bitcoin:38332 rpc_user=bitcoin rpc_password=bitcoin -core_wallet=relay_wallet +# core_wallet=relay_wallet ws_url=0.0.0.0:8090 http_url=0.0.0.0:8091 wallet_name=relay_wallet.json diff --git a/conf/tor.conf b/conf/tor.conf index f21112cb..f7b85188 100644 --- a/conf/tor.conf +++ b/conf/tor.conf @@ -1,38 +1,15 @@ -# Configuration Tor pour 4NK_node -# Proxy SOCKS et contrôle +# Configuration Tor simple pour 4NK_node +# Écoute sur toutes les interfaces pour permettre la connexion depuis d'autres conteneurs + +# Ports SOCKS et contrôle +SocksPort 0.0.0.0:9050 +ControlPort 0.0.0.0:9051 # Répertoire de données DataDirectory /var/lib/tor -PidFile /var/lib/tor/tor.pid -# Interface SOCKS -SocksPort 9050 -SocksListenAddress 0.0.0.0 +# Logs sur stdout pour Docker +Log notice stdout -# Interface de contrôle -ControlPort 9051 -ControlListenAddress 0.0.0.0 - -# Authentification du contrôle -CookieAuthentication 1 - -# Configuration des circuits -CircuitBuildTimeout 30 -LearnCircuitBuildTimeout 0 -EnforceDistinctSubnets 1 - -# Configuration des nœuds de sortie -ExitNodes {fr},{de},{nl},{ch} -StrictExitNodes 1 - -# Configuration des relais -RelayBandwidthRate 100 KB -RelayBandwidthBurst 200 KB - -# Logs -Log notice file /var/lib/tor/notice.log -Log info file /var/lib/tor/info.log -Log debug file /var/lib/tor/debug.log - -# Sécurité -SafeLogging 1 +# Désactiver le mode daemon pour Docker +RunAsDaemon 0 diff --git a/docker-compose.yml b/docker-compose.yml index 4e7238c1..50941482 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -87,8 +87,12 @@ services: ports: - "8090:8090" - "8091:8091" + environment: + - RELAY_RPC_USER=bitcoin + - RELAY_RPC_PASSWORD=bitcoin volumes: - ./conf/sdk_relay1.conf:/home/bitcoin/.conf:ro + working_dir: /home/bitcoin networks: - 4nk_network restart: unless-stopped @@ -107,8 +111,12 @@ services: ports: - "8092:8090" - "8093:8091" + environment: + - RELAY_RPC_USER=bitcoin + - RELAY_RPC_PASSWORD=bitcoin volumes: - ./conf/sdk_relay2.conf:/home/bitcoin/.conf:ro + working_dir: /home/bitcoin networks: - 4nk_network restart: unless-stopped @@ -127,8 +135,12 @@ services: ports: - "8094:8090" - "8095:8091" + environment: + - RELAY_RPC_USER=bitcoin + - RELAY_RPC_PASSWORD=bitcoin volumes: - ./conf/sdk_relay3.conf:/home/bitcoin/.conf:ro + working_dir: /home/bitcoin networks: - 4nk_network restart: unless-stopped diff --git a/modules/tor/Dockerfile b/modules/tor/Dockerfile index 1febe481..e825fd24 100644 --- a/modules/tor/Dockerfile +++ b/modules/tor/Dockerfile @@ -1,7 +1,9 @@ FROM alpine:latest RUN apk add --no-cache tor curl + RUN addgroup -g 1001 toruser && adduser -D -s /bin/sh -u 1001 -G toruser toruser RUN mkdir -p /var/lib/tor && chown -R toruser:toruser /var/lib/tor + USER toruser EXPOSE 9050 9051 -CMD ["tor"] +CMD ["tor", "-f", "/etc/tor/torrc"]