I was thinking of using tor-ctrl SETEVENTS GUARD but figuring out exactly what to do on what events would require a lot of testing.
GETINFO entry-guards shows 3 ‘up’ out of 20. When I reboot in immutable mode it’s the same 3 but it seems to favor a different guard for most circuits according to GETINFO circuit-status.
Anyway, tor-ctrl (or something) should have a socat dependency since it’s somehow not installed on Whonix-Gateway-CLI.
I added a monitor mode to tor-ctrl where it does not exit but simply continues to output events. Something like
100a101,104 > [-w] = wait instead of exiting after command > default: not set > notice: implies verbose. Useful with SETEVENTS. > 146c150,154 < sendcmd "QUIT" --- > if [ -z "$WAIT" ]; then > sendcmd "QUIT" > else > while sleep 3600; do :; done > fi 159,163c167,174 < STR="$(cat)" < vecho "$STR" < < echo "$STR" | if [ "$(grep -c ^"250 ")" = 3 ]; then < exit 0 --- > if [ -z "$WAIT" ]; then > STR="$(cat)" > vecho "$STR" > echo "$STR" | if [ "$(grep -c ^"250 ")" = 3 ]; then > exit 0 > else > exit 1 > fi 165c176 < exit 1 --- > cat 179c190 < while getopts ":a:c:s:p:P:f:vh" Option --- > while getopts ":a:c:s:p:P:f:vwh" Option 188a200 > w) WAIT=1;; 194c206 < if [ -e "$FILE" ]; then --- > if [ -e "$FILE" -o "$FILE" = "-" ]; then
I don’t know what the option should be called, wait? filepipe could also wait but the user can keep the pipe open to work around that. I don’t know an elegant way of not exiting in cmdpipe. And piping to cat is inefficient but?
Posting here since I see Patrick is the maintainer and the website listed in the script doesn’t exist.