mirror of
https://github.com/edu4rdshl/tor-router.git
synced 2026-07-17 23:24:48 +00:00
Add support for Fedora.
This commit is contained in:
parent
3aa347edbf
commit
0ed8e01d34
1 changed files with 6 additions and 1 deletions
|
|
@ -2,11 +2,13 @@
|
||||||
# Executable file to create rules for transparent proxy
|
# Executable file to create rules for transparent proxy
|
||||||
# Destinations you do not want routed through Tor
|
# Destinations you do not want routed through Tor
|
||||||
NON_TOR="192.168.1.0/24 192.168.0.0/24"
|
NON_TOR="192.168.1.0/24 192.168.0.0/24"
|
||||||
# the UID Tor runs as, actually only support for Debian and ArchLinux as been added.
|
# the UID Tor runs as, actually only support for Debian, ArchLinux and Fedora as been added.
|
||||||
if command -v pacman > /dev/null; then
|
if command -v pacman > /dev/null; then
|
||||||
TOR_UID=$(id -u tor)
|
TOR_UID=$(id -u tor)
|
||||||
elif command -v apt > /dev/null; then
|
elif command -v apt > /dev/null; then
|
||||||
TOR_UID=$(id -u debian-tor)
|
TOR_UID=$(id -u debian-tor)
|
||||||
|
elif command -v dnf > /dev/null; then
|
||||||
|
TOR_UID=$(id -u toranon)
|
||||||
else
|
else
|
||||||
echo "Unknown distro, please create report the issue to https://github.com/edu4rdshl/tor-router/issues"
|
echo "Unknown distro, please create report the issue to https://github.com/edu4rdshl/tor-router/issues"
|
||||||
exit
|
exit
|
||||||
|
|
@ -21,6 +23,9 @@ if ! command -v tor > /dev/null; then
|
||||||
elif ! systemctl is-active tor.service > /dev/null; then
|
elif ! systemctl is-active tor.service > /dev/null; then
|
||||||
echo "The tor service is not active, please start the tor service before running the script."
|
echo "The tor service is not active, please start the tor service before running the script."
|
||||||
exit
|
exit
|
||||||
|
if ! command -v iptables > /dev/null; then
|
||||||
|
echo "You need to install the iptables package."
|
||||||
|
exit
|
||||||
else
|
else
|
||||||
iptables -F
|
iptables -F
|
||||||
iptables -t nat -F
|
iptables -t nat -F
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue