Skip to content

Reading config failed--see warnings above #126

@muraig

Description

@muraig

Используемый docker образ
The docker image used

STATE=wiregate
TAG=blowfish-beta-v3.2.1

Способ получения файла для анализа:
The method of getting the file for analysis:

docker cp wiregate:/WireGate/wiregate.sh .

При запуске проекта обнаружена ошибка
An error was found when starting the project

cat configs/logs/tor_startup_log_2026-03-07_17-27-48.txt
Sat Mar  7 17:27:48 +08 2026
Command: sudo -u tor tor -f /etc/tor/torrc
Mar 07 17:27:48.212 [notice] Tor 0.4.9.5 running on Linux with Libevent 2.1.12-stable, OpenSSL 3.5.5, Zlib 1.3.1, Liblzma 5.8.2, Libzstd 1.5.7 and Unknown N/A as libc.
Mar 07 17:27:48.212 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://support.torproject.org/faq/staying-anonymous/
Mar 07 17:27:48.212 [notice] Read configuration file "/etc/tor/torrc".
Mar 07 17:27:48.213 [warn] Entry 'default}' in ExitNodes is malformed. Discarding entire list.
Mar 07 17:27:48.213 [warn] Failed to parse/validate config: Invalid router list.
Mar 07 17:27:48.213 [err] Reading config failed--see warnings above.

Часть лога работы контейнеров
Part of the container operation log

wiregate           | [TOR-VANGUARDS] Waiting for Tor log files to be created... (2/60)
wiregate           | [TOR] ERROR: Main Tor process (PID 858) died immediately. Check ./log/tor_startup_log_2026-03-07_17-27-48.txt for errors.
wiregate           | Sat Mar  7 17:27:48 +08 2026
wiregate           | Command: sudo -u tor tor -f /etc/tor/torrc
wiregate           | Mar 07 17:27:48.212 [notice] Tor 0.4.9.5 running on Linux with Libevent 2.1.12-stable, OpenSSL 3.5.5, Zlib 1.3.1, Liblzma 5.8.2, Libzstd 1.5.7 and Unknown N/A as libc.
wiregate           | Mar 07 17:27:48.212 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://support.torproject.org/faq/staying-anonymous/
wiregate           | Mar 07 17:27:48.212 [notice] Read configuration file "/etc/tor/torrc".
wiregate           | Mar 07 17:27:48.213 [warn] Entry 'default}' in ExitNodes is malformed. Discarding entire list.
wiregate           | Mar 07 17:27:48.213 [warn] Failed to parse/validate config: Invalid router list.
wiregate           | Mar 07 17:27:48.213 [err] Reading config failed--see warnings above.
wiregate           | 
wiregate           | 
wiregate           | Exit code: 1
wiregate           | 

Предполагаю, что ошибка может быть где то тут:
I assume that the error may be somewhere here:

ExitNodes default}

Часть конфигурации torrc
Part of the torrc configuration

cat configs/tor/torrc 
AutomapHostsOnResolve 1 

VirtualAddrNetwork 10.192.0.0/10 

MaxMemInQueues 128 MB 

ControlPort 9051 

HashedControlPassword 16:E4F4237571F7BED960E11B9D603098C0132A13EF420BE06D494DD6322E

Log notice file /var/log/tor/log 

DataDirectory /var/lib/tor 

TransPort 10.2.0.3:59040 IsolateClientAddr IsolateClientProtocol IsolateDestAddr IsolateDestPort 

ClientTransportPlugin snowflake exec /usr/local/bin/snowflake 

ExitNodes default} 

Формированием файла занимается функция
The file is generated by the function

make_torrc()

но я не нашел в ней ошибку.
but I didn't find a mistake in it.

Вот моя версия этой функции в файле wiregate.sh
Here is my version of this function in the file wiregate.sh

make_torrc()

make_torrc() {
    printf "%s\n" "$dashes"
    printf "[TOR] Generating torrc to $TORRC_PATH...\n"
    if [ -f "$TORRC_PATH" ]; then
    secure_exec rm "$TORRC_PATH" 
    fi

    if [[ "$WGD_TOR_PLUGIN" == "webtunnel" ]]; then
    get_webtunnel_bridges
    elif [[ "$WGD_TOR_PLUGIN" == "obfs4" ]]; then
    get_obfs4_bridges
    fi
    
    if [[ "$WGD_TOR_BRIDGES" == "true" ]]; then
    echo -e "UseBridges 1\n" >> "$TORRC_PATH"
    printf "[TOR] Adding bridges to $TORRC_PATH...\n"
    printf "[TOR] Bridges added to $TORRC_PATH successfully!\n"
    fi

    echo -e "AutomapHostsOnResolve 1 \n" >> "$TORRC_PATH"
    echo -e "VirtualAddrNetwork 10.192.0.0/10 \n" >> "$TORRC_PATH"
    echo -e "MaxMemInQueues 128 MB \n" >> "$TORRC_PATH"

    echo -e "ControlPort 9051 \n" >> "$TORRC_PATH"
    echo -e "HashedControlPassword $CTRL_P_PASS\n" >> "$TORRC_PATH"
    # Only add User directive when running as root (not when using sudo -u tor)
    # When running as non-root with sudo -u tor, Tor is already the tor user
    if test -w /root 2>/dev/null; then
        echo -e "User tor \n" >> "$TORRC_PATH"
    fi
    echo -e "Log notice file /var/log/tor/log \n" >> "$TORRC_PATH"
    echo -e "DataDirectory /var/lib/tor \n" >> "$TORRC_PATH"
    echo -e "TransPort ${INET_ADDR}:59040 IsolateClientAddr IsolateClientProtocol IsolateDestAddr IsolateDestPort \n" >> "$TORRC_PATH"

    echo -e "ClientTransportPlugin ${WGD_TOR_PLUGIN} exec /usr/local/bin/${WGD_TOR_PLUGIN} \n" >> "$TORRC_PATH"
    
    if [[ "$WGD_TOR_EXIT_NODES" == "default" ]]; then
    echo "Using Default"
    elif [[ -n "$WGD_TOR_EXIT_NODES" ]]; then
    echo -e "ExitNodes $WGD_TOR_EXIT_NODES \n" >> "$TORRC_PATH"
    else
    echo "Invalid input. Please use the correct format: {US},{GB},{AU}, etc."
    fi

    if [[ "$WGD_TOR_PLUGIN" == "snowflake" ]]; then
    echo -e "Bridge snowflake 192.0.2.3:80 2B280B23E1107BB62ABFC40DDCC8824814F80A72 fingerprint=2B280B23E1107BB62ABFC40DDCC8824814F80A72 url=https://1098762253.rsc.cdn77.org/ fronts=www.cdn77.com,www.phpmyadmin.net ice=stun:stun.l.google.com:19302,stun:stun.antisip.com:3478,stun:stun.bluesip.net:3478,stun:stun.dus.net:3478,stun:stun.epygi.com:3478,stun:stun.sonetel.com:3478,stun:stun.uls.co.za:3478,stun:stun.voipgate.com:3478,stun:stun.voys.nl:3478 utls-imitate=hellorandomizedalpn \n" >> "$TORRC_PATH"
    echo -e "Bridge snowflake 192.0.2.4:80 8838024498816A039FCBBAB14E6F40A0843051FA fingerprint=8838024498816A039FCBBAB14E6F40A0843051FA url=https://1098762253.rsc.cdn77.org/ fronts=www.cdn77.com,www.phpmyadmin.net ice=stun:stun.l.google.com:19302,stun:stun.antisip.com:3478,stun:stun.bluesip.net:3478,stun:stun.dus.net:3478,stun:stun.epygi.com:3478,stun:stun.sonetel.net:3478,stun:stun.uls.co.za:3478,stun:stun.voipgate.com:3478,stun:stun.voys.nl:3478 utls-imitate=hellorandomizedalpn \n" >> "$TORRC_PATH"
  
    else
    echo "$bridges" | while read -r bridge; do
        echo "Bridge $bridge" >> "$TORRC_PATH"
    done
    fi
    printf "%s\n" "$dashes"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions