-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
452 lines (413 loc) · 12.1 KB
/
index.html
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>GeekTG FTG Mod</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
<script src="https://unpkg.com/current-device/umd/current-device.min.js"></script>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<style>
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
body {
background-size: cover;
background-attachment: fixed;
font-family: "Monsterrat", sans-serif;
background: #e0e0e0;
color: #222222;
}
nav {
box-shadow: 0 0 4px rgba(0, 0, 0, 0.7);
}
.mobile .lst {
display: none;
}
.content {
margin: 1em;
}
.article {
border-radius: 0.4em;
padding: 1em;
box-shadow: 0 0 3px rgba(0, 0, 0, 0.7);
background: #ebebeb;
}
p {
margin-top: 1em;
margin-bottom: 0.4em;
margin-left: 0.5em;
}
pre {
border-width: 1px;
border-radius: 0.2em;
padding: 1em;
border-style: solid;
padding: 3px;
margin: 5px;
color: #000;
border-color: #db996c;
border-style: solid;
min-height: 45px;
padding-right: 36px;
}
pre::-webkit-scrollbar {
height: 6px;
/* ширина scrollbar */
}
pre::-webkit-scrollbar-track {
background: transparent;
/* цвет дорожки */
}
pre::-webkit-scrollbar-thumb {
background-color: rgb(149, 105, 190);
/* цвет плашки */
}
.list-group {
border-radius: 0.4em;
box-shadow: 0 0 3px rgba(0, 0, 0, 0.7);
}
.list-group-item {
background: #f1f1f1;
}
h1,
h2,
h3,
h4,
h5,
h6 {
text-shadow: 0 0 2px rgb(80, 80, 80, 0.5);
}
hr {
background: #303030f0;
}
.copy {
border-width: 1px;
border-radius: 0.2em;
padding: 1em;
border-style: solid;
padding: 3px;
margin: 5px;
color: #000;
border-color: #db996c;
border-style: solid;
font-size: 14px;
}
.icon {
font-size: 14px;
color: rgb(50, 50, 50);
}
@media (prefers-color-scheme: dark) {
body {
/* background: #20252b; */
background: linear-gradient(45deg, #20252b, #181c20);
color: #f3f3f3;
}
nav {
box-shadow: 0 0 6px rgba(0, 0, 0, 0.7);
}
a {
color: #2a8aa7;
}
a:hover {
color: #226b81;
}
.article {
box-shadow: 0 0 3px rgba(0, 0, 0, 0.7);
background: #272c33;
}
h1,
h2,
h3,
h4,
h5,
h6 {
text-shadow: 0 0 3px rgb(80, 80, 80);
}
pre {
color: #9ca5b8;
background: #222e38;
border-color: #a8714d;
border-style: solid;
box-shadow: 1px 1px 5px #0f0f0f;
transition: ease 0.3s all;
}
.copy {
color: #9ca5b8;
background: #173147;
border-color: #a8714d;
border-style: solid;
box-shadow: 1px 1px 5px #0f0f0f;
transition: ease 0.3s all;
}
pre:hover {
border-color: #db996c;
}
.list-group {
box-shadow: 0 0 3px rgba(0, 0, 0, 0.7);
}
.list-group-item {
background: #272c33;
}
hr {
background: #585858;
}
pre::-webkit-scrollbar-thumb {
background-color: rgb(78, 49, 105);
/* цвет плашки */
}
.icon {
color: #e0e0e0;
}
}
.texty {
position: relative;
}
.texty button {
position: absolute;
top: 0px;
right: 4px;
opacity: 75%;
transition: ease 0.1s all;
width: 26px;
height: 26px;
user-select: none;
}
.texty button:hover {
opacity: 90%;
}
.texty button:active {
opacity: 100%;
}
</style>
</head>
<body>
<nav class="navbar sticky-top navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="#">GeekTG FTG Mod</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#installation">Installation</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#autostart">Autostart</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/github">GitHub</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/modules">Modules</a>
</li>
</ul>
</div>
</nav>
<div class="content">
<div class="container-fluid">
<div class="row">
<div class="col-sm-4 col-md-3 col-lg-3 col-xl-3 lst">
<ul class="list-group list-group-flush">
<li class="list-group-item">
<a href="#installation">Installation</a>
</li>
<li class="list-group-item">
<a href="#autostart">Autostart</a>
</li>
<li class="list-group-item">
<a href="/github">GitHub</a>
</li>
<li class="list-group-item">
<a href="/modules">Modules</a>
</li>
</ul>
<br>
</div>
<div class="col-sm-8 col-md-9 col-lg-9 col-xl-9">
<div class="article">
<h3 style="text-align: center; font-weight: 500;">Welcome to the GeekTG FTG Mod documentation
</h3>
<hr>
<div id="installation">
<h4>• Installation</h4>
<br>
<h5>Automated installation</h5>
<br>
<h6>Linux / Termux</h6>
<div class="texty">
<pre>(. <($(which curl>/dev/null&&echo curl -Ls||echo wget -qO-) https://raw.githubusercontent.com/GeekTG/Friendly-Telegram/master/install.sh))</pre>
</div>
<br>
<h6>Windows</h6>
<div class="texty">
<pre>iex (New-Object Net.WebClient).DownloadString("https://raw.githubusercontent.com/GeekTG/Friendly-Telegram/master/install.ps1")</pre>
</div>
<br>
<h6>Heroku Windows</h6>
<div class="texty">
<pre>iex (New-Object Net.WebClient).DownloadString("https://raw.githubusercontent.com/GeekTG/Friendly-Telegram/master/install-heroku.ps1")</pre>
</div>
<br>
<h6>Mac</h6>
<div class="texty">
<pre>$(which curl>/dev/null&&echo curl -LsO||echo wget -q) https://raw.githubusercontent.com/GeekTG/Friendly-Telegram/master/install.sh&&(. install.sh --no-web);rm install.sh</pre>
</div>
<br>
<hr>
<br>
<h5>Heroku installation</h5>
<br>
<p>
You can directly click
<a
href="https://www.heroku.com/deploy/?template=https://github.com/GeekTG/Friendly-Telegram"><img
src="https://www.herokucdn.com/deploy/button.svg" alt="Deploy"></a>
to deploy to Heroku. Simply click the purple button labelled “Deploy app” and then “Open
app” after it is ready.
</p>
<h6>Script</h6>
<div class="texty">
<pre>(. <($(which curl>/dev/null&&echo curl -Ls||echo wget -qO-) https://raw.githubusercontent.com/GeekTG/Friendly-Telegram/master/install.sh) --heroku)</pre>
</div>
<br>
<hr>
<br>
<h5>Manual installation</h5>
<h6>Debian-like linux:</h6>
<p>Updating and installing requeired packages</p>
<div class="texty">
<pre>sudo apt update -y && sudo apt upgrade && sudo apt install python3 python3-pip git python3-dev libwebp-dev libz-dev libjpeg-dev libopenjp2-7 libtiff5 ffmpeg imagemagick libffi-dev libcairo2 neofetch dialog -y</pre>
</div>
<p>Clone the source code</p>
<div class="texty">
<pre>cd && git clone https://github.com/GeekTG/Friendly-Telegram && cd Friendly-Telegram</pre>
</div>
<p>Instal requirements</p>
<div class="texty">
<pre>python3 -m pip install -r requirements.txt</pre>
</div>
<p>Launch bot</p>
<div class="texty">
<pre>cd ~/Friendly-Telegram && python3 -m friendly-telegram</pre>
</div>
<br>
<h5>Termux</h5>
<div class="texty">
<pre>
pkg install git ffmpeg imagemagick python libjpeg-turbo zlib libwebp libffi libcairo build-essential dialog neofetch -y
git clone https://github.com/GeekTG/Friendly-Telegram
cd Friendly-Telegram
pip install -r requirements.txt
python -m friendly-telegram</pre>
</div>
<hr>
<h5>Docker installation</h5>
<p>Login as root</p>
<div class="texty">
<pre>sudo su</pre>
</div>
<p>Install docker</p>
<div class="texty">
<pre>apt update && apt install -y curl && curl -Ls https://get.docker.com/ | bash</pre>
</div>
<p>Pull image</p>
<div class="texty">
<pre>docker pull geektg/friendly-telegram</pre>
</div>
<p>Run</p>
<div class="texty">
<pre>docker run --restart unless-stopped --name ftg_on_42069 -d -p 42069:8080 --memory="1024m" --cpus="0.9" --pids-limit 100 geektg/friendly-telegram</pre>
</div>
<div class="texty">
<p>
--memory="1024m" - This is the maximum memory consumption. <br>
--cpus="0.9" - This is the maximum memory consumption. <br>
-p 42069:8080 - Which port to run FTG, 42069 output port, it can be changed. 8080
should
not be changed <br>
--pids-limit 100 - Maximum number of processes, forbbing protection <br>
--name ftg_on_42069 - The name of the container, you can set any name
</p>
</div>
<br>
<hr>
</div>
<div id="autostart">
<h4>• Userbot autostart</h4>
<br>
<h5>Autostart as a system service (Linux)</h5>
<p>Grant superuser rights</p>
<div class="texty">
<pre>sudo su</pre>
</div>
<p>Create ftg.service file in /etc/systemd/system/</p>
<div class="texty">
<pre>
echo "Description=FTG
[Service]
WorkingDirectory=/home/ubuntu/Friendly-Telegram
ExecStart=/usr/bin/python3 -m friendly-telegram
Type=simple
Restart=always
RestartSec=1
User=ubuntu
[Install]
WantedBy=multi-user.target" > /etc/systemd/system/ftg.service</pre>
</div>
<p>"/home/ubuntu/Friendly-Telegram" - Path to your FTG</p>
<p>"ubuntu" - The user under which the FTG will be launched</p>
<p>Enable service autostart</p>
<div class="texty">
<pre>sudo systemctl enable ftg.service</pre>
</div>
<p>Start FTG</p>
<div class="texty">
<pre>sudo service ftg start</pre>
</div>
<p>Stop FTG</p>
<div class="texty">
<pre>sudo service ftg stop</pre>
</div>
<p>Restart FTG</p>
<div class="texty">
<pre>sudo service ftg restart</pre>
</div>
<p>Show FTG status</p>
<div class="texty">
<pre>sudo service ftg status</pre>
</div>
<br>
<hr>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
const copyToClipboard = str => {
const el = document.createElement('textarea');
el.value = str;
el.setAttribute('readonly', '');
el.style.position = 'absolute';
el.style.left = '-9999px';
document.body.appendChild(el);
el.select();
document.execCommand('copy');
document.body.removeChild(el);
};
$(document).ready(() => {
$('pre').after('<button class="copy"><span class="material-icons icon">content_copy</span></button>');
$('.copy').click(function () {
copyToClipboard($(this).prev().text());
})
});
</script>
</body>
</html>