Skip to content

Instantly share code, notes, and snippets.

@nebulak
Last active July 29, 2020 11:57
Show Gist options
  • Save nebulak/52020dd1b6ccecd8132910d88cf2756b to your computer and use it in GitHub Desktop.
Save nebulak/52020dd1b6ccecd8132910d88cf2756b to your computer and use it in GitHub Desktop.
onion_matrix.sh
# Uncomment for tails, only use one of the following two lines
#DEST="/home/amnesia/Persistent"
DEST="/usr/share/applications"
# Uncomment for tails, only use one of the following two lines
#TOR_PORT="9050"
TOR_PORT="9150"
sudo apt install -y wget apt-transport-https
sudo wget -O /usr/share/keyrings/riot-im-archive-keyring.gpg https://packages.riot.im/debian/riot-im-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/riot-im-archive-keyring.gpg] https://packages.riot.im/debian/ default main" |
sudo tee /etc/apt/sources.list.d/riot-im.list
sudo apt update
sudo apt install -y element-desktop
sudo sh -c "cat << EOF > ${DEST}/element-desktop.desktop
[Desktop Entry]
Name=Element Over Tor
Exec=/opt/Element/element-desktop %U --proxy-server=socks5://127.0.0.1:9150 --ignore-certificate-errors
Terminal=false
Type=Application
Icon=element-desktop
StartupWMClass=riot
Comment=A feature-rich client for Matrix.org
MimeType=x-scheme-handler/riot;
Categories=Network;InstantMessaging;Chat;
EOF"
#sudo cat << EOF > ${DEST}/Riot/riot-tor.desktop
#[Desktop Entry]
#Name=Riot Over Tor
#Comment=A feature-rich client for Matrix.org and the Onion Network
#Exec=env HOME=${DEST}/Riot ${DEST}/Riot/riot-web --proxy-server="socks5://127.0.0.1:${TOR_PORT}" --host-resolver-rules="MAP * 0.0.0.0 , EXCLUDE myproxy"
#Terminal=false
#Type=Application
#Icon=${DEST}/Riot/riot-web.png
#StartupWMClass=riot-web
#EOF
#chmod +x ${DEST}/Riot/riot-web.desktop
#riot-desktop --proxy-server=socks5://127.0.0.1:9150 --ignore-certificate-errors
#sudo nano /usr/share/applications/riot-desktop.desktop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment