-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstart-i2p
More file actions
41 lines (35 loc) · 1.53 KB
/
start-i2p
File metadata and controls
41 lines (35 loc) · 1.53 KB
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
#!/bin/bash
#
# righttoprivacy[at]tutanota.com
#
# more info in README
# and on public blog: https://buymeacoffee.com/politictech/posts
# (bmac: public tutorials for all)
#
# VARIABLES: EDIT VARIABLES BELOW IF I2PROUTER LOCATION IS DIFFERENT
# $i2prouterstart should be command for starting i2p (whichever fork / version)
# $i2prouterstop should be command for stopping i2p (whichever version you use)
i2prouterstart="/home/$USER/i2p/i2prouter start" # CHANGE THIS IF NEEDED TO MEET ANY I2PROUTER START COMMAND
i2pprofile="I2PBrowsing" # Change to I2P profile name # CHANGE IF NEEDED TO MEET STOP I2PROUTER COMMAND
i2prouterstop="/home/$USER/i2p/i2prouter stop"
i2pprofdir="/home/$USER/.librewolf/o113n4wr.I2P Browsing"
# BELOW 'sshfw' SSH FORWARD COMMAND FOR REMOTE I2P: SETUP SSH KEY AUTH SET CORRECT LOGIN / IP I2P SERVER
sshfw='ssh -fTNL 4444:127.0.0.1:4444 -L 7070:127.0.0.1:7070 pnet@192.168.1.53'
# IF USER USES 'start-i2p remote' I2P PROFILE OPENS TO REMOTE I2PD
if [ "$1" == 'remote' ]; then
$sshfw &
librewolf --profile "$i2pprofdir" --new-tab http://127.0.0.1:7070 # browse i2pd remotely
exit
fi
# STOP I2P ROUTER ON BROWSER EXIT FOR LOCAL I2P USAGE
trap "$i2prouterstop" EXIT
# STARTS I2P ROUTER LOCALLY BEFORE BROWSER OPEN
starti2p() {
echo -e "STARTING I2P ROUTER...\n"
bash $i2prouterstart
}
# I2P ROUTER START IN BACKGROUND
starti2p &
sleep 10 # delay for slower devices compatibility
# NORMAL RUN (NOT REMOTE) OPENS I2P ROUTER: CHANGE COMMAND IF NEEDED FOR YOUR SETUP
librewolf --profile "$i2pprofdir" --new-tab https://127.0.0.1:7667