-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.sh
167 lines (157 loc) · 5.46 KB
/
config.sh
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
systemctl stop tor && service tor stop && systemctl stop nginx && service nginx stop && systemctl stop apache2 && systemctl disable apache2 && service apache2 stop && apt remove apache2 -y &&
apt autoremove -y &&
sleep 3 &&
systemctl start tor && systemctl reload tor && service tor start && service tor restart &&
sleep 2 &&
service nginx start && systemctl enable nginx && systemctl start nginx && systemctl reload nginx && service nginx restart &&
sleep 3 &&
echo -e $'\e[1;91m[\e[0m\e[1;77m+\e[0m\e[1;91m]\e[1;32m'EVERYTHING IS WORKING - ESTABLISHING TOR CONNECTION AND FETCHING NGINX EXAMPLE CONFIGS'.';
echo -ne '> [5%]\r'
sleep 0.1
echo -ne '>> [10%]\r'
sleep 0.2
echo -ne '>>>> [20%]\r'
sleep 0.1
echo -ne '>>>>> [25%]\r'
sleep 0.1
echo -ne '>>>>>> [30%]\r'
sleep 0.1
echo -ne '>>>>>>> [35%]\r'
sleep 0.1
echo -ne '>>>>>>>> [40%]\r'
sleep 0.1
echo -ne '>>>>>>>>> [45%]\r'
sleep 0.1
echo -ne '>>>>>>>>>> [50%]\r'
sleep 0.1
echo -ne '>>>>>>>>>>> [55%]\r'
sleep 0.1
echo -ne '>>>>>>>>>>>> [60%]\r'
sleep 0.1
echo -ne '>>>>>>>>>>>>> [65%]\r'
sleep 0.1
echo -ne '>>>>>>>>>>>>>> [70%]\r'
sleep 0.1
echo -ne '>>>>>>>>>>>>>>> [75%]\r'
sleep 0.1
echo -ne '>>>>>>>>>>>>>>>> [80%]\r'
sleep 0.1
echo -ne '>>>>>>>>>>>>>>>>> [85%]\r'
sleep 0.1
echo -ne '>>>>>>>>>>>>>>>>>> [90%]\r'
sleep 0.1
echo -ne '>>>>>>>>>>>>>>>>>>> [95%]\r'
sleep 0.1
echo -ne '>>>>>>>>>>>>>>>>>>>>> [100%]\r.'
sleep 2
echo -e $'\e[1;91m[\e[0m\e[1;77m+\e[0m\e[1;91m]\e[1;32m' CONFIG FILE FOR /etc/nginx/conf.d/onion.conf and /etc/nginx/sites-available/onion.conf IS SAVED IN EXAMPLES FOLDER'\033[0m'
sleep 3 &&
mkdir examples &&
touch examples/torrc &&
touch examples/nginx &&
`echo "limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s;
server {
listen 8080;
#listen 443 ssl http2;
# listen [::]:443 ssl http2;
server_name aa;
access_log /dev/null;
error_log /var/log/nginx/tomcat-error.loG;
client_max_body_size 200M;
# ssl on;
# ssl_certificate /etc/ssl/cert.pem;
# ssl_certificate_key /etc/ssl/key.pem;
location / {
limit_req zone=one burst=1;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://89.:8080/;
}
}" > examples/nginx &&
sleep 3 &&
`echo "HiddenServiceDir /var/lib/tor/h1/
HiddenServicePort 80 127.0.0.1:8080
HiddenServiceDir /var/lib/tor/h2/
HiddenServicePort 80 127.0.0.1:8080
HiddenServicePort 22 127.0.0.1:22" > examples/torrc' &&
sleep 2 &&
echo -e $'\e[1;91m[\e[0m\e[1;77m+\e[0m\e[1;91m]\e[1;32m'EVERYTHING IS WORKING - ESTABLISHING TOR CONNECTION AND FETCHING TORRC EXAMPLE CONFIGS'.';
echo -ne '> [5%]\r'
sleep 0.1
echo -ne '>> [10%]\r'
sleep 0.2
echo -ne '>>>> [20%]\r'
sleep 0.1
echo -ne '>>>>> [25%]\r'
sleep 0.1
echo -ne '>>>>>> [30%]\r'
sleep 0.1
echo -ne '>>>>>>> [35%]\r'
sleep 0.1
echo -ne '>>>>>>>> [40%]\r'
sleep 0.1
echo -ne '>>>>>>>>> [45%]\r'
sleep 0.1
echo -ne '>>>>>>>>>> [50%]\r'
sleep 0.1
echo -ne '>>>>>>>>>>> [55%]\r'
sleep 0.1
echo -ne '>>>>>>>>>>>> [60%]\r'
sleep 0.1
echo -ne '>>>>>>>>>>>>> [65%]\r'
sleep 0.1
echo -ne '>>>>>>>>>>>>>> [70%]\r'
sleep 0.1
echo -ne '>>>>>>>>>>>>>>> [75%]\r'
sleep 0.1
echo -ne '>>>>>>>>>>>>>>>> [80%]\r'
sleep 0.1
echo -ne '>>>>>>>>>>>>>>>>> [85%]\r'
sleep 0.1
echo -ne '>>>>>>>>>>>>>>>>>> [90%]\r'
sleep 0.1
echo -ne '>>>>>>>>>>>>>>>>>>> [95%]\r'
sleep 0.1
echo -ne '>>>>>>>>>>>>>>>>>>>>> [100%]\r.'
sleep 2
echo -e $'\e[1;91m[\e[0m\e[1;77m+\e[0m\e[1;91m]\e[1;32m' CONFIG FILE FOR /etc/tor/torrc IS SAVED IN EXAMPLES FOLDER'\033[0m'
sleep 4 &&
clear &&
echo -e $'\e[1;91m[\e[0m\e[1;77m+\e[0m\e[1;91m]\e[1;32m' :'\033[0m'
sleep 1 &&
echo -e $'\e[1;91m[\e[0m\e[1;77m+\e[0m\e[1;91m]\e[1;32m' THANKS FOR USING NGINX_TOR! INSTALLED SOFTWARE:'\033[0m'
sleep 2
echo -e $'\e[1;91m[\e[0m\e[1;77m+\e[0m\e[1;91m]\e[1;32m' NGINX'\033[0m'
sleep 0.5 &&
echo -e $'\e[1;91m[\e[0m\e[1;77m+\e[0m\e[1;91m]\e[1;32m' PHP 7.4'\033[0m'
sleep 0.5 &&
echo -e $'\e[1;91m[\e[0m\e[1;77m+\e[0m\e[1;91m]\e[1;32m' TOR'\033[0m'
sleep 0.5 &&
echo -e $'\e[1;91m[\e[0m\e[1;77m+\e[0m\e[1;91m]\e[1;32m' MYSQL'\033[0m'
sleep 0.5 &&
echo -e $'\e[1;91m[\e[0m\e[1;77m+\e[0m\e[1;91m]\e[1;32m' PHP-FPM'\033[0m'
sleep 0.5 &&
echo -e $'\e[1;91m[\e[0m\e[1;77m+\e[0m\e[1;91m]\e[1;32m' DEVTOOLS'\033[0m'
sleep 0.5 &&
echo -e $'\e[1;91m[\e[0m\e[1;77m+\e[0m\e[1;91m]\e[1;32m' PHP-GD'\033[0m'
sleep 0.5 &&
echo -e $'\e[1;91m[\e[0m\e[1;77m+\e[0m\e[1;91m]\e[1;32m' PHP-JSON'\033[0m'
sleep 0.5 &&
echo -e $'\e[1;91m[\e[0m\e[1;77m+\e[0m\e[1;91m]\e[1;32m' PHP-MBSTRING'\033[0m'
sleep 0.5 &&
echo -e $'\e[1;91m[\e[0m\e[1;77m+\e[0m\e[1;91m]\e[1;32m' COMPILER'\033[0m'
sleep 2.5 &&
echo -e $'\e[1;91m[\e[0m\e[1;77m+\e[0m\e[1;91m]\e[1;32m' YOUR PERSONAL HIDDEN SERVICE URLS:'\033[0m'
cat /var/lib/tor/hs1/hostname &&
sleep 0.5 &&
cat /var/lib/tor/hs2/hostname &&
sleep 0.5 &&
nginx -t && service nginx status && service tor status &&
sleep 15
exit
HiddenServiceDir /var/lib/tor/hs1/
HiddenServicePort 80 127.0.0.1:80
HiddenServiceDir /var/lib/tor/hs2/
HiddenServicePort 80 127.0.0.1:80
HiddenServicePort 22 127.0.0.1:22