-
Notifications
You must be signed in to change notification settings - Fork 7
/
tbcli.conf
executable file
·63 lines (52 loc) · 1.58 KB
/
tbcli.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/bash
# path tor config file
tor_config_file="/etc/tor/torrc"
# url get bridge
url_bridges="https://bridges.torproject.org/bridges?transport=obfs4"
##sudo systemctl status tor@default.service
# change variables if you dont use systemd deamon manager
function tor_restart(){ systemctl restart tor.service ; sleep 0.5 ; }
function tor_stop() { systemctl stop tor.service ; }
function tor_status() {
[[ -z "$1" ]] && size_history=10 || size_history="$1"
journalctl --no-pager -t Tor |tail -n "$size_history" |sed 's/^.*]: //g';
}
function active_bridges(){ grep "^ *Bridge" $tor_config_file |wc -l ;}
# temp files
HTML_FILE="img.html"
IMAGE_CAPTCHA_FILE="captcha.jpg"
BridgeFile="bridges.txt"
# my ip
IpSite="icanhazip.com"
# colors
nc="\e[m"
black="\e[0;30m"
red="\e[0;31m"
green="\e[0;32m"
yellow="\e[0;33m"
blue="\e[0;34m"
magenta="\e[0;35m"
cyan="\e[0;36m"
white="\e[0;37m"
light_gray="\e[0;1;90m"
light_red="\e[0;1;91m"
light_green="\e[0;1;92m"
light_yellow="\e[0;1;93m"
light_blue="\e[0;1;94m"
light_magenta="\e[0;1;95m"
light_cyan="\e[0;1;96m"
light_white="\e[0;1;97m"
# tor reset separator
reset_sep="${light_red} >${light_blue}%"
# sections separator
sections_sep="$light_red---------------------------------------------------"
# tor status setting color
status_sep="$light_blue---------------------------------------------------"
status_color="$light_yellow"
status_num_color="$light_red"
status_important="$light_green"
status_important_line="$light_green"
status_bad_bridge="$light_red"
status_bad_bridge_line="$light_red"
# clear broken bridges
clear_text="$light_red"