Coder Social home page Coder Social logo

Comments (5)

radio24 avatar radio24 commented on August 19, 2024 2

I don't see a significant advantage to distingue between a "real" restart and a "reload" of the configuration.

Did you test with bridges? With bridges it has significant difference cause they take more time to bootstrap when restarting and no need to do so when reloading.

Yes, I tested it with OBFS4 bridges but ran into problems. It didn't seem to work, but I couldn't follow the log because of the reduced log entries. When I restarted tor with the same configuration, I had no problem, and I could follow the log entries if the bridge is used correctly. So, I thought that maybe HUP will not work with OBFS4 bridges.

from torbox.

radio24 avatar radio24 commented on August 19, 2024 1

With commit dbd551c, the new_ident script is replaced by sudo -u debian-tor tor-prompt --run 'SIGNAL NEWNYM'

from torbox.

nyxnor avatar nyxnor commented on August 19, 2024

Restart should still be a menu entry, but give option to just HUP helps too.
Using restarting_tor and including force option to make sure to restart when required

# restarting_tor(<source script> <force>)
# Used predefined variables: RED, NOCOLOR
# This function restarts Tor if required with 'force', else it will just sighup.
restarting_tor()
{
  SOURCE_SCRIPT=$1
  ACTION=$2
  if [ "${ACTION}" == "force" ]; then
    echo -e "${RED}[+] Restarting tor!${NOCOLOR}"
    sudo systemctl restart tor &
    echo -e "${RED}[+] DONE! Checking progress - please be patient!${NOCOLOR}"
    echo -e "    Ignore any error messages, just wait..."
    echo -e "    At the end, you should see \"Bootstrapped 100%: Done\"."
  else
    echo -e "${RED}[+] Sending HUP signal to tor!${NOCOLOR}"
    sudo pkill -sighup tor &
    echo -e "${RED}[+] DONE! Checking progress - please be patient!${NOCOLOR}"
    echo -e "    Ignore any error messages, just wait..."
  fi
  echo -e "    You can leave the progress report with CTRL-C."
  echo ""
  sleep 2
  trap "bash $SOURCE_SCRIPT; exit 0" SIGINT
  sudo tail -f -n 0 /var/log/tor/notices.log
}

from torbox.

radio24 avatar radio24 commented on August 19, 2024

Regarding the proposal to implement to HUP tor instead of restarting it, I did a few tests during the last few days. So far, I don't see a significant advantage to distingue between a "real" restart and a "reload" of the configuration. On the contrary, the HUP variant gives less information about reloading. Also, I think that with restarting tor, I'm on the safer side, even if it needs more time on some occasions.

from torbox.

nyxnor avatar nyxnor commented on August 19, 2024

I don't see a significant advantage to distingue between a "real" restart and a "reload" of the configuration.

Did you test with bridges? With bridges it has significant difference cause they take more time to bootstrap when restarting and no need to do so when reloading.

On the contrary, the HUP variant gives less information about reloading.

It gives then necesssaary info of what it does, reading the config files and data dir

I'm on the safer side,

Also, to be on the safer side there is
sudo systemctl reload-or-restart, it will reload the service if it is active, it it is failed or stopped it will restart it.

  • Plus I do recommend leaving both options. Restart and Reload, but only restart when choosing that option on the menu, else when editing the torrc, just reload.

from torbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.