summaryrefslogtreecommitdiff
path: root/guides/index.xml
blob: 829b98f4b28e311c813f69f06405b9f6094c36b5 (plain)
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
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Guides on dd</title>
    <link>https://drainerdomain.xyz/guides/</link>
    <description>Recent content in Guides on dd</description>
    <language>Page(/guides)</language>
    <lastBuildDate>Fri, 19 Aug 2022 14:31:59 -0300</lastBuildDate><atom:link href="https://drainerdomain.xyz/guides/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Newsboat</title>
      <link>https://drainerdomain.xyz/guides/consume-media-the-right-way-newsboat/</link>
      <pubDate>Fri, 19 Aug 2022 14:31:59 -0300</pubDate>
      
      <guid>https://drainerdomain.xyz/guides/consume-media-the-right-way-newsboat/</guid>
      <description>&lt;p&gt;Allthough I&amp;rsquo;ve riced &lt;a href=&#34;https://github.com/newsboat/newsboat&#34;&gt;newsboat&lt;/a&gt;, this will be a guide focusing on the important aspect of the program. Newsboat allows the user
to read RSS/Atom feeds, which are usually generated by the website itself or sometimes by a frontend or third party app. The main
reason to use this program is the fact that you won&amp;rsquo;t need an account in sites such as Youtube, Reddit, or Twitter anymore. Also, that you&amp;rsquo;ll
have sort of a centralized way to consume (which includes reading text, listening to podcasts or watching videos) pretty much any site on the
internet by using only a terminal program, which is by far faster and more desirable. This guide includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Brief explanation on how it works (program is very intuitive to use)&lt;/li&gt;
&lt;li&gt;Setup of other programs&lt;/li&gt;
&lt;li&gt;Running newsboat in the background so it notifies the user when new article appears (optional)&lt;/li&gt;
&lt;li&gt;Multiple macro configurations that you might find very useful (optional but HIGHLY recommended)&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&#34;installation&#34;&gt;Installation&lt;/h1&gt;
&lt;p&gt;The software is at almost any repository. In case it is not on your distro, you can always build it from source.&lt;/p&gt;
&lt;p&gt;For Arch-based systems:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;pacman -S newsboat mpv
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;I use &lt;code&gt;firefox&lt;/code&gt; for opening up links (unless is the article has only text)  and &lt;code&gt;mpv&lt;/code&gt; to reproduce videos and audios.
You can use any other browser and media player obviously. Or, you can use something like &lt;code&gt;w3m&lt;/code&gt; to read text, but remember to change
it as the browser when setting up the program.&lt;/p&gt;
&lt;p&gt;Also, if you want to download videos/audios I recommend installing &lt;a href=&#34;https://github.com/yt-dlp/yt-dlp&#34;&gt;yt-dlp&lt;/a&gt; from its github&amp;rsquo;s repository.
The installation is straightforward and the software is easier to update by using &lt;code&gt;yt-dlp -U&lt;/code&gt; once needed. This program is a fork of the discontinued
&lt;code&gt;youtube-dl&lt;/code&gt; which may still appear in some distro&amp;rsquo;s repositories.&lt;/p&gt;
&lt;h1 id=&#34;configuration&#34;&gt;Configuration&lt;/h1&gt;
&lt;h2 id=&#34;newsboat&#34;&gt;Newsboat&lt;/h2&gt;
&lt;p&gt;Newsboat won&amp;rsquo;t run unless the file &lt;code&gt;urls&lt;/code&gt; has something inside. Both &lt;code&gt;config&lt;/code&gt; and &lt;code&gt;urls&lt;/code&gt; files are at either &lt;code&gt;$HOME/.newsboat&lt;/code&gt; or &lt;code&gt;$XDG_CONFIG_HOME/newsboat&lt;/code&gt;.
Put something inside the &lt;code&gt;urls&lt;/code&gt; file. I recommend using the following frontends for getting the feeds:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Twitter -&amp;gt; nitter&lt;/li&gt;
&lt;li&gt;Youtube -&amp;gt; Invidious&lt;/li&gt;
&lt;li&gt;Reddit -&amp;gt; teddit&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Say you want to add the youtube channel &lt;code&gt;HydeWars&lt;/code&gt; to your feed. It will look like this:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;https://vid.puffyan.us/feed/channel/UCfUaZ8Ra7m7BqUEACv2jySw
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;So basically, you need to get the channel&amp;rsquo;s ID which is &lt;code&gt;UCfUaZ8Ra7m7BqUEACv2jySw&lt;/code&gt; and add it at the end of the url, where
&lt;code&gt;vid.puffyan.us&lt;/code&gt; is an instance of Invidious. How you find the ID of a YT channel is a matter of having at least a 2 digits IQ.
If you don&amp;rsquo;t want to use an Invidious instance, you can go to any Youtube channel and view the souce code, filter keyword &lt;code&gt;rss&lt;/code&gt; and
see how the URL looks.&lt;/p&gt;
&lt;p&gt;You can also tag URLs and then press &lt;code&gt;t&lt;/code&gt; by adding the tag at the end of the string after a blank space:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;https://vid.puffyan.us/feed/channel/UCfUaZ8Ra7m7BqUEACv2jySw MDE
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now open &lt;code&gt;config&lt;/code&gt; file and add:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# GENERAL #
reload-time 30 
auto-reload yes
browser &amp;#34;setsid -f $BROWSER --new-tab %u &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&amp;#34;
cleanup-on-quit yes
history-limit 2000
show-keymap-hint no
goto-next-feed no
error-log &amp;#34;.config/newsboat/error.log&amp;#34;
prepopulate-query-feeds yes
suppress-first-reload yes

# NOTIFICATIONS #
notify-always no 
notify-program &amp;#34;/usr/bin/dunstify&amp;#34;
notify-format &amp;#34;Newsboat: %d new articles&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Line 4 sets up the browser and forks it, while opening the url in a new tab. In my case, I have an env var set to &lt;code&gt;firefox&lt;/code&gt;. Change &lt;code&gt;$BROWSER&lt;/code&gt; to your browser&amp;rsquo;s name or software for reading text, if you need to.
Then, for notifications I use dunstify but you can use whatever you like. Rest is self explanatory, but keep in mind that if you are going to setup notifications you should
keep &lt;code&gt;reload-time&lt;/code&gt; and &lt;code&gt;auto-reload&lt;/code&gt; as they are.&lt;/p&gt;
&lt;p&gt;Optionally, you can set up vim-like bindings:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# Vim keybindings
unbind-key j
unbind-key k
unbind-key ENTER
unbind-key o 

bind-key o open 
bind-key k up
bind-key j down
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;mpv&#34;&gt;Mpv&lt;/h2&gt;
&lt;p&gt;Open &lt;code&gt;$XDG_CONFIG_HOME/mpv/mpv.conf&lt;/code&gt; and add:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;# Cache
cache=yes
--stream-buffer-size=8MiB

# Quality stream
ytdl-format=bestvideo[height&amp;lt;=?720]+bestaudio/best

# Yt-dlp hook
script-opts-append=ytdl_hook-ytdl_path=yt-dlp
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This sets up a &lt;code&gt;yt-dlp&lt;/code&gt; hook that will make the streaming faster. Also, if you want higher/lesser quality, change the height value.&lt;/p&gt;
&lt;h2 id=&#34;yt-dlp&#34;&gt;Yt-dlp&lt;/h2&gt;
&lt;p&gt;I recommend you to set up a download folder. Open up &lt;code&gt;$XDG_CONFIG_HOME/yt-dlp/config&lt;/code&gt; and add:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;-o &amp;#39;/path/to/folder/%(title)s.%(ext)s&amp;#39;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This will save the video/audio to a folder using metadata.&lt;/p&gt;
&lt;h1 id=&#34;running-newsboat-through-a-script-for-notifications&#34;&gt;Running newsboat through a script for notifications&lt;/h1&gt;
&lt;p&gt;Instead of running newsboat directly, I use a simple script so it is always on the background. You can also achieve this with cronjobs.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;#!/bin/sh

while true; do
    kill $(pidof newsboat)
    rm $XDG_CONFIG_HOME/newsboat/queue
    $TERMINAL -e newsboat
    if [[ $? == 0 ]] ; then
        exec newsboat &amp;amp;&amp;amp; break
    else
        break
    fi
done
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;code&gt;chmod +x&lt;/code&gt; the script and remember to use it instead of directly executing newsboat. In my case, I use an i3&amp;rsquo;s keybinding for quick access, and also
for executing the script only one time as soon as the window manager initializes.&lt;/p&gt;
&lt;h1 id=&#34;macros&#34;&gt;Macros&lt;/h1&gt;
&lt;p&gt;A macro is used for executing a sequence of commands by pressing a key or a combination of keys. In our case, for using the browser setting as not really a browser, but anything we like. For example, as a media player
to reproduce a YT video. To execute a macro press &lt;code&gt;,&lt;/code&gt; + &lt;code&gt;key&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Here is a list of some macros I&amp;rsquo;ve came up with that are very useful (add them to newsboat&amp;rsquo;s config file):&lt;/p&gt;
&lt;h2 id=&#34;queue-videos-clear-playlist-and-reproduce-playlist&#34;&gt;Queue videos, clear playlist and reproduce playlist&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;macro a set browser &amp;#34;echo %u &amp;gt;&amp;gt; ~/.config/newsboat/queue&amp;#34; ; open-in-browser ; set browser &amp;#34;$BROWSER %u&amp;#34;
macro c set browser &amp;#34;rm $HOME/.config/newsboat/queue &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&amp;#34; ; open-in-browser ; set browser &amp;#34;$BROWSER %u&amp;#34;
macro p set browser &amp;#34;kill $(pidof mpv) ; setsid -f mpv --playlist=$HOME/.config/newsboat/queue &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&amp;#34; ; open-in-browser ; set browser &amp;#34;$BROWSER %u&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The idea of these 3 macros is creating, playing or deleting a playlist. If you take a look at the script in the previous section, this file named &lt;code&gt;queue&lt;/code&gt; gets deleted when the script executes.
For adding videos or even audios to said file you need to focus the article on a feed.&lt;/p&gt;
&lt;h2 id=&#34;play-queued-videos-fullscreen-second-monitor&#34;&gt;Play queued videos fullscreen second monitor&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;macro P set browser &amp;#34;kill $(pidof mpv) ; setsid -f mpv --x11-name=newsboatfs --fullscreen=yes --playlist=$HOME/.config/newsboat/queue &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&amp;#34; ; open-in-browser ; set browser &amp;#34;$BROWSER %u&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;play-video&#34;&gt;Play video&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;macro v set browser &amp;#34;kill $(pidof mpv) ; setsid -f mpv %u &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&amp;#34; ; open-in-browser-and-mark-read ; set browser &amp;#34;$BROWSER %u&amp;#34; 
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;play-video-floating-mode&#34;&gt;Play video floating mode&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;macro i set browser &amp;#34;kill $(pidof mpv) ; setsid -f mpv --x11-name=mpvfloat %u &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&amp;#34; ; open-in-browser-and-mark-read ; set browser &amp;#34;$BROWSER %u&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;play-audio-only&#34;&gt;Play audio only&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;macro A set browser &amp;#34;kill $(pidof mpv) ; setsid -f mpv %u --no-video &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&amp;#34; ; open-in-browser-and-mark-read ; set browser &amp;#34;$BROWSER %u&amp;#34; 
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;play-fullscreen-i3-sends-it-to-second-monitor-useful-for-playing-all-the-videos-from-a-channel&#34;&gt;Play fullscreen, i3 sends it to second monitor (useful for playing all the videos from a channel)&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;macro f set browser &amp;#34;kill $(pidof mpv) ; setsid -f mpv --x11-name=newsboatfs --fullscreen=yes %u &amp;gt; /dev/null 2&amp;gt;&amp;amp;1&amp;#34; ; open-in-browser ; set browser &amp;#34;$BROWSER %u&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;download-video&#34;&gt;Download video&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;macro y set browser &amp;#34;yt-dlp %u&amp;#34; ; open-in-browser ; set browser &amp;#34;$BROWSER %u&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;open-in-default-browser&#34;&gt;Open in default browser&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;macro o open-in-browser
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;NOTE: Keep in mind that for sending the videos/articles to another monitor you need to rename the X instance to whatever you like so you can then manipulate it with your window manager.
Using i3 would look like this:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;for_window [instance=&amp;#34;newsboatfs&amp;#34;] move container to workspace $ws10
for_window [instance=&amp;#34;mpvfloat&amp;#34;] floating enable, resize set 960 540, move container position center 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Where &lt;code&gt;$ws10&lt;/code&gt; outputs to &lt;code&gt;HDMI-1&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;workspace &amp;#34;10&amp;#34; output HDMI-1
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Use &lt;code&gt;xrandr&lt;/code&gt; to know display names.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Firefox</title>
      <link>https://drainerdomain.xyz/guides/harden-firefox/</link>
      <pubDate>Mon, 16 May 2022 22:05:11 -0300</pubDate>
      
      <guid>https://drainerdomain.xyz/guides/harden-firefox/</guid>
      <description>&lt;p&gt;A guide and explanation for making Firefox more secure/private using &lt;code&gt;arkenfox user.js&lt;/code&gt; and some essential addons. This is a compilation from
various sources that are linked at the bottom of this article, and from my useless and extensive attempt for having a useful yet &amp;lsquo;privacy-oriented&amp;rsquo;
and &amp;lsquo;secure browser&amp;rsquo;, things that are mutually exclusive. Still, this guide will leave the user with a better than nothing tool to navigate the net.&lt;/p&gt;
&lt;h2 id=&#34;a-little-test-before&#34;&gt;A little test before&lt;/h2&gt;
&lt;p&gt;You should check your browser against fingerprinting just so you can compare after. For that use this website: &lt;a href=&#34;https://deviceinfo.me&#34;&gt;deviceinfo.me&lt;/a&gt;.
This is all the data that first-party and third-party sites get from you, but we will minimize it. Keep in mind that some information won&amp;rsquo;t be concealed,
such as your IP or location. Please do the test again after you finish.&lt;/p&gt;
&lt;h2 id=&#34;arkenfox-userjs&#34;&gt;arkenfox user.js&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/arkenfox/user.js/&#34;&gt;LINK&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This tool is just a user config template that interacts with the inner functions of Firefox. It is highly recommended that you read the &lt;a href=&#34;https://github.com/arkenfox/user.js/wiki&#34;&gt;wiki&lt;/a&gt;
so you can customize it. Otherwise, with just downloading the file and making the browser use it would be more than enough in most cases. So for that:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;firefox -no-remote -CreateProfile &amp;lt;userprofile&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;That will create a user directory under &lt;code&gt;$HOME/.mozilla/firefox/&lt;/code&gt; that contains the string &lt;code&gt;&amp;lt;userprofile&amp;gt;&lt;/code&gt; at the end of it.
Now delete its content, download &lt;code&gt;arkenfox user.js&lt;/code&gt; and activate the profile:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;cd $HOME/.mozilla/firefox/&amp;lt;userprofile&amp;gt;/ &amp;amp;&amp;amp; rm times.json
wget https://raw.githubusercontent.com/arkenfox/user.js/master/user.js
firefox -P &amp;lt;userprofile&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Note: &lt;code&gt;firefox -P &amp;lt;userprofile&amp;gt;&lt;/code&gt; where &lt;code&gt;&amp;lt;userprofile&amp;gt;&lt;/code&gt; is just the string you used to create the profile (not the random numbers from the directory)&lt;/p&gt;
&lt;p&gt;Check &lt;code&gt;/usr/lib/firefox/&lt;/code&gt; for these plugins (some may not be included) and delete them:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;firefox@getpocket.com.xpi&lt;/li&gt;
&lt;li&gt;followonsearch@mozilla.com.xpi&lt;/li&gt;
&lt;li&gt;activity-stream@mozilla.org.xpi&lt;/li&gt;
&lt;li&gt;screenshots@mozilla.org.xpi&lt;/li&gt;
&lt;li&gt;onboarding@mozilla.org.xpi&lt;/li&gt;
&lt;li&gt;formautofill@mozilla.org.xpi&lt;/li&gt;
&lt;li&gt;webcompat@mozilla.org.xpi&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Those are the basics, as I said read the extense wiki for customizing the template.&lt;/p&gt;
&lt;p&gt;Note: notice that the content of the explorer have borders. That is a letterboxing option that strengthens against fingerprinting.
If it bothers you, edit your &lt;code&gt;user.js&lt;/code&gt; and search for &lt;code&gt;user_pref(&amp;quot;privacy.resistFingerprinting.letterboxing&amp;quot;, true);&lt;/code&gt;. Then replace
&lt;code&gt;true&lt;/code&gt; with &lt;code&gt;false&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Now start firefox we are going to install some addons.&lt;/p&gt;
&lt;h2 id=&#34;umatrix&#34;&gt;uMatrix&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/umatrix/&#34;&gt;LINK&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The superior blocker. If configured properly, it will restrict any malicious site you may misstakenly enter to and block any pop up window or annoying ad, guaranteed.
Other extensions or even the built-in anti ad options of for example, Brave Browser, are useless and do not work properly.&lt;/p&gt;
&lt;p&gt;This extension gives you a per site list that shows first and third party domains that you are establishing a connection to. If you click on the extension icon and look at the grid,
you will notice 8 elements. These are simply the reason why this addon is superior to others. It will block ANYTHING because it doesn&amp;rsquo;t block per domain. In other words and as an example,
if you deny &lt;code&gt;script&lt;/code&gt;, it will block JavaScript in every site you visit. Inferior extensions have a gigantic database of domains to work with, so if a domain is missing it is impossible for
it to block its elements.&lt;/p&gt;
&lt;p&gt;First, go to uMatrix&amp;rsquo;s configuration panel and open the &lt;code&gt;Settings&lt;/code&gt; tab. Copy this:&lt;/p&gt;
&lt;img src=&#34;https://drainerdomain.xyz/images/umatrix-01.webp&#34; width=&#34;100%&#34; height=&#34;auto&#34; alt=&#34;settings&#34;&gt;
&lt;p&gt;I recommend you use &lt;code&gt;Domain&lt;/code&gt; as an option to &lt;code&gt;Default scope level&lt;/code&gt; so you can create more flexible rules such as the one from the example that comes later in the guide.
Cookies are trapped locally by uMatrix. This allows you to inspect the contents of it and blocks the sender from getting it back. Turn on the option and set
a timer for deleting non-blocked cookies if you want.&lt;/p&gt;
&lt;p&gt;Moving on, lets generate some rules. Go to uMatrix&amp;rsquo;s panel and then to &lt;code&gt;My Rules&lt;/code&gt;. Observing, you can see two sections: left is for permanent rules and right is for temporary rules. For editing a rule in,
type in the right section, then save it and click commit. Rules consist of 4 parts (&lt;code&gt;*&lt;/code&gt; is a wildcard, which means any):&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;* * * allow/deny
| | |
| | |______ Element
| |________ Domain
|__________ Scope
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;So for a start, consider adding these strong rules:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;* * * block
* * css allow
* * image allow
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The first line blocks ANYTHING on any scope and domain. Then the second and third overrides first and allows css and image on ANY scope and domain. Pretty easy.
This is a good start for then tweaking and adding more rules.&lt;/p&gt;
&lt;p&gt;Say you want to log in to a site you frequent. This site will need cookies allowed, and maybe needs a script to run a captcha from a third-party domain like google.
Such rule would look like this:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;* ineedcookies.com cookie allow 
ineedcookies.com googlecaptcha.com script allow
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This will allow the google&amp;rsquo;s domain only in the site requesting for a login, which is desirable. This is pretty much it, if you are not looking for a strong blocking ruleset, you can
use uBlock Origin which is from the same creator, or search the &lt;a href=&#34;https://github.com/gorhill/uMatrix/wiki&#34;&gt;wiki&lt;/a&gt; for a more suitable example.&lt;/p&gt;
&lt;h2 id=&#34;decentraleyes&#34;&gt;Decentraleyes&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/decentraleyes/&#34;&gt;LINK&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This one is a content blocker that will deny, in the majority of cases, third party domains from trying to deliver something you don&amp;rsquo;t need. You could say, &amp;lsquo;but isn&amp;rsquo;t that already done by
uMatrix?&amp;rsquo;, and you are honestly right. The thing is that uMatrix breaks everything it touches. While adding Decentraleyes on top of it, you could still mantain some aspects of the sites you are visiting.
Decentraleyes stores content locally so you can still make use of it without the sender getting a response. On the other hand, uMatrix will prevent Decentraleyes from doing so if it is hardblocking content.
To avoid that from happening, you need to create some extra rules in uMatrix that allow traffic to some convenient domains.&lt;/p&gt;
&lt;p&gt;These are the rules:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;* ajax.aspnetcdn.com * allow
* ajax.googleapis.com * allow
* ajax.microsoft.com * allow
* cdn.jsdelivr.net * allow
* cdnjs.cloudflare.com * allow
* code.jquery.com * allow
* lib.sinaapp.com * allow
* libs.baidu.com * allow
* upcdn.b0.upaiyun * allow
* yandex.st * allow
* yastatic.net * allow
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;More rules could and should be added as long as you keep using the extensions.&lt;/p&gt;
&lt;h2 id=&#34;privacy-redirect&#34;&gt;Privacy Redirect&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://addons.mozilla.org/en-US/firefox/addon/privacy-redirect/&#34;&gt;LINK&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This one is a redirector for the most famous and used sites such as Twitter, Reddit or Youtube. Simply click on the icon and turn on/off which service you want to redirect to its respective frontend.
Frontends are very useful at times when you can&amp;rsquo;t view content that is age restricted or simply because you are not logged in, not to mention that you also skip the annoying pop up windows
from shitsites like Twitter. This shouldn&amp;rsquo;t be a problem since you are running uMatrix now, but it is good to know. Also, using a frontend like Invidious for Youtube, allows for navigation
with no ads, no tracking (doesn&amp;rsquo;t log your IP) and without JS enabled.&lt;/p&gt;
&lt;p&gt;Here is a quote from Nitter&amp;rsquo;s about section (logic applies to the other frontends):&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;It&amp;rsquo;s impossible to use Twitter without JavaScript enabled. For privacy-minded folks, preventing JavaScript analytics and IP-based tracking is important, but apart from using a VPN and uBlock/uMatrix, it&amp;rsquo;s impossible. Despite being behind a VPN and using heavy-duty adblockers, you can get accurately tracked with your browser&amp;rsquo;s fingerprint, no JavaScript required. This all became particularly important after Twitter removed the ability for users to control whether their data gets sent to advertisers.
Using an instance of Nitter (hosted on a VPS for example), you can browse Twitter without JavaScript while retaining your privacy. In addition to respecting your privacy, Nitter is on average around 15 times lighter than Twitter, and in most cases serves pages faster (eg. timelines load 2-4x faster).
In the future a simple account system will be added that lets you follow Twitter users, allowing you to have a clean chronological timeline without needing a Twitter account.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;This is the list of sites that the extension allows to redirect:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Twitter → Nitter&lt;/li&gt;
&lt;li&gt;Youtube → Invidious&lt;/li&gt;
&lt;li&gt;Instagram → Bibliogram&lt;/li&gt;
&lt;li&gt;Reddit → Libreddit or old version&lt;/li&gt;
&lt;li&gt;Google Translate → Simply Translate&lt;/li&gt;
&lt;li&gt;Wikipedia → Wikiless&lt;/li&gt;
&lt;li&gt;Google Maps → OpenStreetMaps&lt;/li&gt;
&lt;li&gt;Search Engine → custom&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I recommend you go to the general options, where you can set the instance of the frontend you want to use.&lt;/p&gt;
&lt;p&gt;We are done. Remember to run the test again and compare to see the results.&lt;/p&gt;
&lt;h3 id=&#34;not-privacysecurity-related-addons&#34;&gt;Not privacy/security related addons&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Stylus: custom/community generated css with one click&lt;/li&gt;
&lt;li&gt;ff2mpv: forward links to mpv (useful for when you break js/xhr/frame on sites that have videos)&lt;/li&gt;
&lt;li&gt;Vimium-FF: vimlike bindings&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;links&#34;&gt;Links&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://digdeeper.neocities.org/&#34;&gt;digdeeper&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://spyware.neocities.org/&#34;&gt;spyware watchdog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/arkenfox/user.js/wiki&#34;&gt;arkenfox user.js wiki&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;hhttps://github.com/gorhill/uMatrix/wiki&#34;&gt;uMatrix wiki&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    
    <item>
      <title>Prosody</title>
      <link>https://drainerdomain.xyz/guides/prosody-servidor-xmpp/</link>
      <pubDate>Fri, 13 May 2022 18:23:51 -0300</pubDate>
      
      <guid>https://drainerdomain.xyz/guides/prosody-servidor-xmpp/</guid>
      <description>&lt;p&gt;This guide is for installing Prosody, an XMPP server that is decentralized, fast, simple and FOSS.
The version we will be using is &lt;code&gt;0.11.12&lt;/code&gt; and in the end the user will have a private and only c2s server.
These options are of course changeable after or during the installation.&lt;/p&gt;
&lt;h1 id=&#34;prerequisites&#34;&gt;Prerequisites&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;GNU/Linux system&lt;/li&gt;
&lt;li&gt;VPS (recommended) or a home server&lt;/li&gt;
&lt;li&gt;Domain name&lt;/li&gt;
&lt;li&gt;Basic terminal knowledge&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id=&#34;installation&#34;&gt;Installation&lt;/h1&gt;
&lt;p&gt;We install the main packages plus some extras for TLS encryption, A/V streaming, and file transfering. If you don&amp;rsquo;t care about these things
you can skip them.&lt;/p&gt;
&lt;p&gt;On Debian/Ubuntu:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;apt install prosody prosody-modules python3-certbot-nginx coturn mercurial
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;code&gt;prosody&lt;/code&gt; is the main package
&lt;br&gt;
&lt;code&gt;prosody-modules&lt;/code&gt; are some extra packages for functionability
&lt;br&gt;
&lt;code&gt;python3-certbot-nginx&lt;/code&gt; is for TLS encryption
&lt;br&gt;
&lt;code&gt;coturn&lt;/code&gt; a STUN/TURN server that allows A/V streaming for users behind NAT
&lt;br&gt;
&lt;code&gt;mercurial&lt;/code&gt; for installing community modules for the STUN/TURN server
&lt;br&gt;&lt;/p&gt;
&lt;h1 id=&#34;configuration&#34;&gt;Configuration&lt;/h1&gt;
&lt;p&gt;The server&amp;rsquo;s CFG file is at &lt;code&gt;/etc/prosody/prosody.cfg.lua&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;admin-users-and-the-domain-name&#34;&gt;Admin, users and the domain name&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;...
admins = { &amp;#34;admin1@domain.org&amp;#34;, &amp;#34;admin2@domain.org&amp;#34; }
...
VirtualHost = &amp;#34;domain.org&amp;#34;
...
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now from the terminal add some users:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;prosodyctl adduser user@domain.org
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The program will prompt for a password. To delete a user use the command &lt;code&gt;deluser&lt;/code&gt;, and for changing passwords use &lt;code&gt;passwd&lt;/code&gt;, both with the JID as an option.&lt;/p&gt;
&lt;h2 id=&#34;modules-enableddisabled-user-registration&#34;&gt;Modules enabled/disabled, user registration&lt;/h2&gt;
&lt;p&gt;Search for the line &lt;code&gt;modules_enabled&lt;/code&gt; and add the modules &lt;code&gt;http_files&lt;/code&gt; (file transfer), &lt;code&gt;turn_external&lt;/code&gt; (STUN/TURN server) and uncomment &lt;code&gt;csi_simple&lt;/code&gt; and &lt;code&gt;disco&lt;/code&gt; if they are commented.
Under &lt;code&gt;modules_disabled&lt;/code&gt; only leave &lt;code&gt;s2s&lt;/code&gt; uncommented. Finally, check if in the following lines &lt;code&gt;allow_registration&lt;/code&gt; is set to false, which is self explanatory.&lt;/p&gt;
&lt;h2 id=&#34;file-transfering&#34;&gt;File transfering&lt;/h2&gt;
&lt;p&gt;We will be configuring two components in the CFG file. You should add them after the &lt;code&gt;VirtualHost&lt;/code&gt; section.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Component &amp;#34;upload.domain.org&amp;#34; &amp;#34;http_upload&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Right after we add &lt;code&gt;http_upload_file_size_limit = 20971520&lt;/code&gt; and &lt;code&gt;http_upload_expire_after = 60 * 60 * 24 * 7&lt;/code&gt;, for limiting the file size and setting its expiration.&lt;/p&gt;
&lt;p&gt;Now, in the global section (before &lt;code&gt;VirtualHost&lt;/code&gt;) add:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;-- HTTP/HTTPS ports
http_ports = { 5280 }
http_interfaces = { &amp;#34;*&amp;#34;, &amp;#34;::&amp;#34; }

https_ports = { 5281 }
https_interfaces = { &amp;#34;*&amp;#34;, &amp;#34;::&amp;#34; }
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If it is your case, remember to configure your firewall accordingly.&lt;/p&gt;
&lt;p&gt;After &lt;code&gt;VirtualHost&lt;/code&gt; we add:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;disco_items = {
	{ &amp;#34;upload.domain.org&amp;#34;, &amp;#34;File Sharing Service&amp;#34; },
} 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In the components section:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Component &amp;#34;proxy.domain.org&amp;#34; &amp;#34;proxy65&amp;#34;
proxy65_address = &amp;#34;domain.org&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;There is no need to add &lt;code&gt;proxy65&lt;/code&gt; to the &lt;code&gt;modules_enabled&lt;/code&gt; list. This component lets users behind NAT transfer files.&lt;/p&gt;
&lt;h2 id=&#34;coturn-the-stunturn-server&#34;&gt;Coturn: The STUN/TURN server&lt;/h2&gt;
&lt;p&gt;Check if &lt;code&gt;coturn&lt;/code&gt; is running:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;systemctl status coturn
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If not start it:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;systemctl enable --now coturn
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Next thing to do is downloading and setting the correct modules from the community repository using &lt;code&gt;mercurial&lt;/code&gt;.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;hg clone https://hg.prosody.im/prosody-modules/ prosody-modules
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Now you can either copy (not recommended) the modules &lt;code&gt;mod_turn_external.lua&lt;/code&gt; and &lt;code&gt;mod_external_services.lua&lt;/code&gt; to &lt;code&gt;/usr/lib/prosody/modules&lt;/code&gt; or create another folder for the community plugins that will be installed and create symlinks for them.
For the second option, add the created folder to the plugins path in &lt;code&gt;prosody.cfg.lua&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;plugins_path { &amp;#34;usr/lib/prosody/modules&amp;#34;, &amp;#34;enabled/plugins/folder&amp;#34; } 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Create the symlinks from the community downloaded folder to your plugins enabled folder (it depends on where you downloaded those modules):&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ln -s /downloadedfolder/mod_turn_external/mod_turn_external.lua /enabled/folder
ln -s /downloadedfolder/mod_external_services/mod_external_services.lua /enabled/folder
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;We edit the &lt;code&gt;coturn&lt;/code&gt; cfg file that is located in &lt;code&gt;/etc/turnserver.conf&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;realm=turn.domain.org
static-auth-secret=yoursecretpassword
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Finally uncomment &lt;code&gt;use-auth-secret&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;We go back to our &lt;code&gt;prosody.cfg.lua&lt;/code&gt; file. In the global section add:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;turn_external_host = &amp;#34;turn.domain.org&amp;#34;
turn_external_secret = &amp;#34;yoursecretpassword&amp;#34;
&lt;/code&gt;&lt;/pre&gt;&lt;h1 id=&#34;very-important-certificates&#34;&gt;VERY IMPORTANT: Certificates&lt;/h1&gt;
&lt;p&gt;We need to generate certificates for the domain and every subdomain we are using for our components. Also, we need to check for some configuration options that could be missing or commented.&lt;/p&gt;
&lt;p&gt;First we generate:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;certbot -d domain.org --nginx
certbot -d upload.domain.org --nginx
certbot -d proxy.domain.org --nginx
certbot -d turn.domain.org --nginx
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The bot will give you some output in the terminal and prompt you for two options: select the second one every time.&lt;/p&gt;
&lt;p&gt;Now, we need to import/install the certs to prosody:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;prosodyctl --root cert import /etc/letsencrypt/live/
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The TLS encryption for the file transfering module needs to be explicitly configured, and for that we edit &lt;code&gt;prosody.cfg.lua&lt;/code&gt; and add to global:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;https_ssl = {
	certificate = &amp;#34;/etc/prosody/certs/upload.domain.org.crt&amp;#34;;
	key = &amp;#34;/etc/prosody/certs/upload.domain.org.key&amp;#34;;
}
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Pay attention to the extension names and double check that you got the right path and files for each line.&lt;/p&gt;
&lt;p&gt;Inside the same file, check the following line and set it to &lt;code&gt;true&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;c2s_require_encryption = true
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;We are done with our file transfering configuration.&lt;/p&gt;
&lt;p&gt;For the STUN/TURN server we also need to modify its CFG file &lt;code&gt;/etc/turnserver.conf&lt;/code&gt; to set a path for our certs:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;cert=/etc/letsencrypt/live/turn.domain.org/fullchain.pem
pkey=/etc/letsencrypt/live/turn.domain.org/privkey.pem
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Done. You can check for errors using &lt;code&gt;prosodyctl check&lt;/code&gt;. As a final note, I should add that if you are using a VPS you probably have
a firewall working. There are some ports that need to be forwarded: 5280, 5281, 5222, 5322, 5000, 3478. If you are not using a firewall I recommend you using
&lt;code&gt;ufw&lt;/code&gt; and start from there.&lt;/p&gt;
&lt;p&gt;Also, that this configuration is very personal. You can add more components (for example multichat groups). For that you should
RTFM, which is always ideal.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://prosody.im/doc&#34;&gt;Prosody Docs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
    </item>
    
  </channel>
</rss>