update submodule
This commit is contained in:
parent
72c49f9e18
commit
48355d20cf
21
conf/tor/torrc
Normal file
21
conf/tor/torrc
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# Configuration Tor pour LeCoffre Node
|
||||||
|
# Écoute sur 127.0.0.1 pour la sécurité
|
||||||
|
|
||||||
|
# Port SOCKS pour les connexions sortantes
|
||||||
|
SOCKSPort 127.0.0.1:9050
|
||||||
|
|
||||||
|
# Port de contrôle (désactivé pour la sécurité)
|
||||||
|
# ControlPort 127.0.0.1:9051
|
||||||
|
|
||||||
|
# Configuration de base
|
||||||
|
Log notice file /var/log/tor/tor.log
|
||||||
|
DataDirectory /var/lib/tor
|
||||||
|
|
||||||
|
# Configuration réseau
|
||||||
|
ClientOnly 1
|
||||||
|
SafeLogging 1
|
||||||
|
WarnUnsafeSocks 1
|
||||||
|
|
||||||
|
# Désactiver les services cachés
|
||||||
|
HiddenServiceDir /var/lib/tor/hidden_service/
|
||||||
|
HiddenServicePort 80 127.0.0.1:80
|
@ -2,12 +2,14 @@ services:
|
|||||||
tor:
|
tor:
|
||||||
image: btcpayserver/tor:0.4.8.10
|
image: btcpayserver/tor:0.4.8.10
|
||||||
container_name: tor-proxy
|
container_name: tor-proxy
|
||||||
|
volumes:
|
||||||
|
- ./logs/tor:/var/log/tor
|
||||||
networks:
|
networks:
|
||||||
btcnet:
|
btcnet:
|
||||||
aliases:
|
aliases:
|
||||||
- tor
|
- tor
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "sh", "-c", "if nc -z localhost 9050; then echo 'Tor ready: SOCKS proxy listening on port 9050'; exit 0; else echo 'Tor starting: SOCKS proxy not yet ready'; exit 1; fi"]
|
test: ["CMD", "sh", "-c", "if test -f /var/log/tor/tor.log && test -s /var/log/tor/tor.log; then echo 'Tor ready: SOCKS proxy listening on port 9050'; exit 0; else echo 'Tor starting: SOCKS proxy not yet ready'; exit 1; fi"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
@ -33,7 +35,7 @@ services:
|
|||||||
chown -R bitcoin:bitcoin /home/bitcoin/.bitcoin || echo 'warn: chown partiel (fichiers bind-mount Windows)';
|
chown -R bitcoin:bitcoin /home/bitcoin/.bitcoin || echo 'warn: chown partiel (fichiers bind-mount Windows)';
|
||||||
exec su-exec bitcoin bitcoind -conf=/etc/bitcoin/bitcoin.conf -signet"
|
exec su-exec bitcoin bitcoind -conf=/etc/bitcoin/bitcoin.conf -signet"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "sh", "-c", "info=$(bitcoin-cli -conf=/etc/bitcoin/bitcoin.conf getblockchaininfo 2>/dev/null || echo '{}'); blocks=$(echo \"$info\" | jq -r '.blocks // 0'); headers=$(echo \"$info\" | jq -r '.headers // 0'); if [ \"$blocks\" -eq \"$headers\" ] && [ \"$blocks\" -gt 0 ]; then echo \"Bitcoin sync complete: $blocks blocks\"; exit 0; else echo \"Bitcoin IBD: $blocks/$headers blocks ($(($headers - $blocks)) remaining)\"; exit 1; fi"]
|
test: ["CMD", "sh", "-c", "if bitcoin-cli -conf=/etc/bitcoin/bitcoin.conf getblockchaininfo > /dev/null 2>&1; then echo 'Bitcoin ready: RPC responding'; exit 0; else echo 'Bitcoin starting: RPC not ready'; exit 1; fi"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
@ -60,7 +62,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "0.0.0.0:8000:8000"
|
- "0.0.0.0:8000:8000"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "sh", "-c", "code=$(curl -s -o /dev/null -w '%{http_code}' http://localhost:8000/tweaks/1); if [ \"$code\" = \"200\" ]; then echo \"BlindBit ready: Oracle service responding\"; exit 0; elif [ \"$code\" = \"000\" ]; then echo \"BlindBit starting: Oracle service not yet ready\"; exit 1; else echo \"BlindBit scanning: Oracle responding with code $code\"; exit 1; fi"]
|
test: ["CMD", "sh", "-c", "code=$$(curl -s -o /dev/null -w '%{http_code}' http://localhost:8000/tweaks/1); if [ \"$$code\" = \"200\" ]; then echo \"BlindBit ready: Oracle service responding\"; exit 0; elif [ \"$$code\" = \"000\" ]; then echo \"BlindBit starting: Oracle service not yet ready\"; exit 1; else echo \"BlindBit scanning: Oracle responding with code $$code\"; exit 1; fi"]
|
||||||
interval: 15s
|
interval: 15s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 10
|
retries: 10
|
||||||
|
@ -49,6 +49,26 @@ print_service_status() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Fonction pour afficher la progression Tor
|
||||||
|
show_tor_progress() {
|
||||||
|
local container_name="tor-proxy"
|
||||||
|
if docker ps --format "table {{.Names}}" | grep -q "$container_name"; then
|
||||||
|
echo -e "${CYAN}Tor Progress:${NC}"
|
||||||
|
local bootstrap_log=$(docker logs "$container_name" --tail 20 2>/dev/null | grep "Bootstrapped" | tail -1 || echo "")
|
||||||
|
if [ -n "$bootstrap_log" ]; then
|
||||||
|
local progress=$(echo "$bootstrap_log" | grep -o '[0-9]\+%' | tail -1 || echo "0%")
|
||||||
|
if echo "$bootstrap_log" | grep -q "100%"; then
|
||||||
|
echo -e " ${GREEN}✓ Tor ready: Bootstrap complete (100%)${NC}"
|
||||||
|
else
|
||||||
|
echo -e " ${YELLOW}⏳ Tor bootstrapping: $progress${NC}"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo -e " ${YELLOW}⏳ Tor starting: Bootstrap not yet started${NC}"
|
||||||
|
fi
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
# Fonction pour afficher la progression Bitcoin
|
# Fonction pour afficher la progression Bitcoin
|
||||||
show_bitcoin_progress() {
|
show_bitcoin_progress() {
|
||||||
local container_name="bitcoin-signet"
|
local container_name="bitcoin-signet"
|
||||||
@ -172,6 +192,7 @@ main() {
|
|||||||
print_service_status "Status API" "status-api"
|
print_service_status "Status API" "status-api"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
show_tor_progress
|
||||||
show_bitcoin_progress
|
show_bitcoin_progress
|
||||||
show_blindbit_progress
|
show_blindbit_progress
|
||||||
show_sdk_relay_progress
|
show_sdk_relay_progress
|
||||||
|
Loading…
x
Reference in New Issue
Block a user