COMMUNICATION.md (11643B)
1 # COMMUNICATION 2 Here lies several ways to communicate through different networks. 3 4 1. [BROWSER](#browser) 5 1.1. [GNU ICECAT](#gnu-icecat) 6 1.2. [ADDONS](#addons) 7 1.3. [ABOUT CONFIG](#about-config) 8 2. [E-MAIL](#e\-mail) 9 2.1. [E-MAIL STORAGE FORMATS](#gnu-icecat) 10 2.2. [MUTTRC](#addons) 11 3. [USENET](#usenet) 12 4. [I2P](#i2p) 13 4.1. [INSTALLATION](#installation) 14 4.2. [I2PD](#i2pd) 15 4.3. [REMOTE ACCESS](#remote-access) 16 4.4. [BASIC COMMANDS](#basic-commands) 17 4.5. [BROWSING I2P EEPSITES](#browsing-i2p-eepsites) 18 4.6. [YOUR OWN EEPSITE](#your-own-eepsite) 19 4.7. [IRC](#irc) 20 4.8. [TORRENTS](#torrents) 21 4.8.1 [DOWNLOADING](#downloading) 22 4.8.2 [CREATING](#creating) 23 4.8.3 [CONFIGURATION](#configuration) 24 25 26 ## BROWSER 27 28 ### GNU ICECAT 29 * Download from http://ftpmirror.gnu.org/gnuzilla/ 30 * Unpack the tarball 31 * As ROOT, copy and rename the folder as /opt/icecat 32 * ln -s /opt/icecat/icecat /usr/bin/icecat 33 34 ### ADDONS 35 These addons worked excellent to cover any fingerprinting, until Mozilla decided to break things since Firefox 52. 36 * (Cross-)Site Request, Anti-XSS, Trackers, Referer, Cookies: [uMatrix](https://addons.mozilla.org/en-US/firefox/addon/umatrix/) 37 * Security Settings: [Privacy Settings](https://addons.mozilla.org/en-US/firefox/addon/privacy-settings/) 38 * User-Agent: [Random Agent Spoofer](https://github.com/dillbyrne/random-agent-spoofer), [User-Agent JS Fixer](http://legacycollector.org/firefox-addons/378075/index.html) 39 * Plugin Enumeration: [Disable plugin enum](https://github.com/dillbyrne/random-agent-spoofer/issues/283) (see Mechazawa's script, and install with greasemonkey) 40 * Content Delivery Blocker: [Decentraleyes](https://addons.mozilla.org/en-US/firefox/addon/decentraleyes/) 41 * URI Leak: [No Resource URI Leak](https://notabug.org/desktopd/no-resource-uri-leak) 42 * Canvas-Fingerprinting: [Canvas Defender](https://addons.mozilla.org/en-US/firefox/addon/no-canvas-fingerprinting/) 43 * SSL (strict HTTPS): [HTTPS by default](https://addons.mozilla.org/en-US/firefox/addon/https-by-default/) 44 * URL Deobfuscator: [Pure URL](https://addons.mozilla.org/en-US/firefox/addon/pure-url/) 45 * Google Redirection: [Google search link fix](https://addons.mozilla.org/en-US/firefox/addon/google-search-link-fix/) 46 47 ### ABOUT CONFIG 48 These tips prevent overflow your root directory or getting constantly write and delete to try and kill your drive. 49 * Go to _about\:config_ 50 * Put a 0 to everything that can write to the disk. 51 * Limit ram memory and also turn off syncing ect. 52 * Make it read only. 53 * If you need to save things have a seperate chroot with a seperate physical drive and make that your downloads folder. 54 55 ## E-MAIL 56 TODO: 57 * Set cock.li 58 * Configure mutt 59 * Create account. 60 * Set mutiple accounts 61 * Send mail 62 * Send attachment 63 * To cancel an action in mutt hit CTRL+g 64 * Use notmuch 65 * set i2p-bote 66 67 ### E-MAIL STORAGE FORMATS 68 * MAILDIR = several files 69 * MBOX = one file for everything 70 71 ### MUTTRC 72 Example config with cock.li and gmail. Not quite complete but can work if tweaked. 73 ``` 74 #--------------------------------------- 75 # ~/.mutt/muttrc settings mutt 1.5.20 76 #--------------------------------------- 77 # 78 #--------------------------------------- 79 # One-Time Previous Steps 80 #--------------------------------------- 81 # Generate keys with proper user 82 # $ gpg --gen-key 83 # 84 # Make proper directory with file: 85 # $ mkdir ~/.mutt && touch ~/.mutt/.passwd 86 # 87 # Put the following inside ~/.mutt/.passwd: 88 # set cock_pass="password" 89 # set gmail_pass="password" 90 # 91 # Encrypt with proper user: 92 # $ gpg -r USER1 -e ~/.mutt/.passwd 93 # $ shred ~/.mutt/.passwd 94 # $ rm -f ~/.mutt/.passwd 95 # 96 #--------------------------------------- 97 # Process the password file first (the "|" pipes to Mutt) 98 #--------------------------------------- 99 #source "gpg -d ~/.mutt/.passwd.gpg |" 100 # 101 #--------------------------------------- 102 # Account Hooks 103 #--------------------------------------- 104 account-hook . 'unset imap_user imap_pass' # unset first! 105 account-hook 'imaps://mail.cock.li:993/' "\ 106 set imap_user=USER1@cock.li imap_pass=`cat ~/.mutt/.cock ` " # imap_pass=$my_cock_pass " 107 #account-hook 'imaps://USER2@imap.gmail.com/' "\ 108 # set imap_user=USER2 imap_pass=$my_gmail_pass " 109 # 110 #---------------------------------------- 111 # Folders, mailboxes and folder hooks 112 #---------------------------------------- 113 # 114 # Setup for USER1: 115 #---------------------------------------- 116 set folder = imaps://mail.cock.li:993/ 117 mailboxes =Inbox =Sent =Junk =Trash 118 folder-hook 'imaps://mail.cock.li:993' " \ 119 set folder=imaps://mail.cock.li:993/ \ 120 record=+Sent \ 121 smtp_url=smtps://$imap_user@mail.cock.li:465 \ 122 signature=~/.mutt/USER1.sig \ 123 from='USER1 <USER1@cock.li> ' \ 124 realname='USER1' " 125 # 126 #---------------------------------------- 127 # Setup for USER2: 128 #---------------------------------------- 129 #set folder="imaps://USER2@imap.gmail.com/" 130 #mailboxes =INBOX =[Gmail]/Drafts =[Gmail]/'Sent Mail' =[Gmail]/Spam 131 #folder-hook 'imaps://USER2@imap.gmail.com' " \ 132 # set folder=imaps://USER2@imap.gmail.com/ \ 133 # postponed=+[Gmail]/Drafts \ 134 # record=+[Gmail]/'Sent Mail' \ 135 # smtp_url=smtps://USER2@smtp.gmail.com \ 136 # smtp_pass=$my_gmail_pass \ 137 # signature=~/.mutt/USER2.sig \ 138 # from='USER2 <USER2@gmail.com> ' \ 139 # realname='USER2' " 140 # 141 #---------------------------------------- 142 # Macros to make life easier 143 #---------------------------------------- 144 macro index <esc>1 "y1<return><return>" # ESC+1 takes to first INBOX 145 #macro index <esc>2 "y5<return><return>" # ESC+2 takes to the second 146 # 147 #--------------------------------------- 148 # Mail-check preferences 149 #--------------------------------------- 150 set timeout=60 #Check for mail every minute 151 set mail_check=5 152 # 153 #--------------------------------------- 154 # Set preferred editor 155 #--------------------------------------- 156 set editor='vim + -c "set textwidth=72" -c "set wrap" -c "set nocp" -c "?^$"' 157 # EOF 158 ``` 159 160 ## USENET 161 The software used is __slrn__ ( with __slrnpull__ and + __slrnface__). 162 163 * 1. Create slrn.rc: 164 ``` 165 set username "desired_username" 166 set hostname "desired_hostname.invalid" 167 set replyto "some_name <email@example.com>" 168 charset display utf8 169 charset outgoing utf8 170 setkey group "set_prefix_argument(4); () = select_group();" " " 171 ``` 172 173 * 2. Set $NNTPSERVER to usenet provider (set in config file): 174 `NNTPSERVER='server_name' && export NNTPSERVER` 175 176 * 3. Set $EDITOR to preferred text editor (set in slrn.rc file): 177 `set editor_command "vim '+set tw=72' +%d '%s'"` 178 179 * 4. Create .jnewsrc 180 `touch .jnewsrc` 181 182 * 5. Create configuration 183 `slrn --create` 184 185 * 6. Download a list of newsgroups 186 `slrn -d` 187 188 ## I2P 189 __I2P__ is a darknet like __Tor__ but with more services like e-mail, IRC, torrents, and others. Once you install it you can configure it by its web interface at http://localhost:7657/home. 190 191 192 ### INSTALLATION 193 * Make directory that will contain I2P 194 `mkdir ~/.i2p` 195 196 * Go to directory 197 `cd ~/.i2p` 198 199 * Download (replace <VERSION> with the newest version) 200 `wget -c https://download.i2p2.de/releases/<VERSION>/i2pinstall_<VERSION>.jar` 201 202 * Run the installer (and select options like the current path) 203 `java -jar i2pinstall_<VERSION>.jar -console` 204 205 To uninstall simply delete the directory. 206 207 ### I2PD 208 __I2PD__ is a version of __I2P__ based on C++ instead of Java. Currently with limited support (no torrents). Therefore is __OPTIONAL__ and its funtion is separated from the rest of the guide. 209 210 * Dependencies: 211 ``` 212 libboost 213 cmake 214 make 215 ``` 216 217 * Download. 218 `git clone https://github.com/PurpleI2P/i2pd.git` 219 * Go to directory. 220 `cd i2pd/build` 221 * Build. 222 ``` 223 cmake 224 make 225 ``` 226 * Install 227 ``` 228 mkdir $HOME/.i2pd 229 cp i2pd $HOME/.i2pd 230 cp -R contrib/certificates $HOME/.i2pd 231 cp contrib/i2pd.conf $HOME/.i2pd 232 cd $HOME/.i2pd 233 ulimit -n 4096 # optional file limit 234 ``` 235 * To run: 236 ``` 237 cd $HOME/.i2pd 238 ./i2pd --datadir . 239 ``` 240 * To stop: 241 `kill -INT $( cat /var/run/i2pd/i2pd.pid )` 242 243 244 ### REMOTE ACCESS 245 To access your I2P router from another computer. 246 247 * On ~/.i2p/clients.config replace 248 `clientApp.0.args=7657 ::1,127.0.0.1 ./webapps/` 249 * with 250 `clientApp.0.args=7657 ::1,127.0.0.1,<REMOTE_IP> ./webapps/` 251 * where <REMOTE_IP> is the IP of the computer running I2P. 252 * Restart I2P. 253 254 255 ### BASIC COMMANDS 256 * See status 257 `~/.i2p/i2prouter status` 258 259 * Start 260 `~/.i2p/i2prouter start` 261 262 * Stop 263 `~/.i2p/i2prouter stop` 264 265 * Stop nicely 266 `~/.i2p/i2prouter graceful` 267 268 * __NOTE__: In case you get an error, instead of all the above commands, you'll be able to start I2P using the next: 269 `~/.i2p/runplain.sh` 270 271 You can stop the program from inside the [web interface](http://localhost:7657/home). 272 273 ### BROWSING I2P EEPSITES 274 Configuration to browse I2P eepsites. To be used with GNU IceCat. Make sure your list of peers is seeded on the web interface configuration page. _Address Book_ is a list of eepsites. 275 276 _OPTION A_ 277 * Go to "Preferences -> Advanced -> Network -> Connection (Settings)". 278 * Check "Manual proxy configuration". 279 * Fill with the address: 280 `127.0.0.1 and port 4444 for HTTP` 281 `127.0.0.1 and port 4445 for HTTPS` 282 `127.0.0.1 and port 4444 for FTP` 283 * In the "No proxy for" add: 284 `localhost, 127.0.0.1` 285 * Mark "Proxy DNS when using SOCKS". 286 287 _OPTION B_ 288 * Download FoxyProxy. 289 * Click on the FoxyProxy icon. 290 * Click on "Add New Proxy". 291 * On the "General" tab add I2P as the name. 292 * Go to "Proxy Details" tab. 293 * In "Host or IP Address" field add _127.0.0.1_. 294 * In the "Port" field _4444_. 295 * Click on the "URL Patterns" tab. 296 * In the "Pattern Name" field add as I2P. 297 * In the "URL pattern" field enter _\*.i2p\*_. 298 * Click "OK". 299 * Right click on the FoxyProxy icon. 300 * Select "Use proxies baed on their predefined patterns". 301 302 ### YOUR OWN EEPSITE 303 * Your own eepsite is already active but invisible, the directory is located at: 304 `~/.i2p/eepsite/docroot/` 305 306 * The I2P Tunnel Manager contains the setting of your eepsite. 307 308 ### IRC 309 * Add the I2P network 310 `/server add -network i2p localhost 6668` 311 * Connect 312 `/connect i2p` 313 * Save configuration 314 `/save` 315 316 * From now on, to connect simply type 317 `/connect i2p` 318 319 ### TORRENTS 320 Normal torrents and i2p torrents are used with different clients. Can't use a regular torrent from a normal tracker. 321 322 #### DOWNLOADING 323 * Visit a tracker like http://tracker2.postman.i2p and search for the torrent. 324 325 _OPTION A_: 326 * Place your mouse cursor over the magnet icon, right click to disply the menu and click “Copy Link Location". 327 * Go to i2psnark in browser (http://localhost:7657/i2psnark/). 328 * Paste the magnet URL on the field "From URL" 329 * Start the torrent. 330 331 _OPTION B_: 332 * Download the .torrent file. 333 * Move torrent file it to destination ~/.i2p/i2psnark/. 334 * Go to i2psnark in browser or refresh page (http://localhost:7657/i2psnark/). 335 * Start the torrent 336 337 338 #### CREATING 339 * Place data in i2psnark directory. 340 `mv <TORRENT_DATA> ~/.i2p/i2psnark/` 341 * Go to i2psnark in browser or refresh page (http://localhost:7657/i2psnark/). 342 * Fill in the fields. 343 `Data to seed: ~/.i2p/i2psnark/<TORRENT_DATA>` 344 `Tracker: <SELECT_TRACKER>` 345 * Create torrent by clicking on "Create Torrent". 346 * Start the torrent. 347 348 #### CONFIGURATION 349 To automatically start torrents once they are added: 350 * Go to “Configuration”. 351 * Select “Auto start”. 352 * Select “Save configuration”. 353 354 To change more settings, like download destination for example: 355 * Edit configuration file. 356 `vi ~/.i2p/i2psnark.config.d/i2psnark.config` 357 * Change field ("i2psnark.dir"). 358 `i2psnark.dir=<DOWNLOAD_DIRECTORY>`