A tor server manager running multiple clients load-balanced using iptables.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

torconf.sh 719B

6 yıl önce
123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/bin/bash -e
  2. NUMINST=$1
  3. DIR="/opt/tor/var"
  4. if [ -z "${NUMINST}" ]
  5. then
  6. echo "Usage: $0 <number of tor instances>"
  7. exit 1;
  8. fi
  9. NUMINST=`expr ${NUMINST} - 1`
  10. for i in `seq 0 ${NUMINST}`
  11. do
  12. mkdir -p ${DIR}/data.${i};
  13. chmod 700 ${DIR}/data.${i}
  14. cat <<EOF >${DIR}/torcc.${i}
  15. DataDirectory ${DIR}/data.${i}/
  16. PidFile ${DIR}/tor.${i}.pid
  17. RunAsDaemon 1
  18. User debian-tor
  19. ControlSocket ${DIR}/control.${i} GroupWritable RelaxDirModeCheck
  20. ControlSocketsGroupWritable 1
  21. SocksPort unix:${DIR}/socks.${i} WorldWritable
  22. SocksPort 900${i}
  23. CookieAuthentication 1
  24. CookieAuthFileGroupReadable 1
  25. CookieAuthFile ${DIR}/control.authcookie.${i}
  26. BandwidthRate 10MB
  27. Log notice syslog
  28. EOF
  29. done
  30. chown -R debian-tor:debian-tor ${DIR}