## HOW TO SETUP ## ```sh This is the code to check if a simplex link is valid and joinable. Steps to make the script work: 1) Download the simplex-chat cli client. You can follow this guide https://simplex.chat/docs/cli.html#download-chat-client. wget -qO- https://raw.githubusercontent.com/simplex-chat/simplex-chat/stable/install.sh | bash source ~/.zshrc fix libcrypto.so.1.1 cannot open shared object file as described here https://github.com/simplex-chat/simplex-chat/issues/1274 : sudo apt install libssl-dev sudo ln -s /usr/lib/x86_64-linux-gnu/libcrypto.so /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (doesnt fix it) so instead we download the simplex binary: wget https://github.com/simplex-chat/simplex-chat/releases/latest/download/simplex-chat-ubuntu-22_04-x86-64 chmod +x ./simplex-chat-ubuntu-22_04-x86-64 2) Create an account for the bot -> simplex-chat-ubuntu-22_04-x86-64 -d $HOME/.simplex/simplep-bot -x Use -x flag to use tor. [ laptop-privateVM ] [ /dev/pts/8 ] [Documents/darknet-lantern.sovereign/simpleP] → ./simplex-chat-ubuntu-22_04-x86-64 -d $HOME/.simplex/simplep-bot -x SimpleX Chat v6.3.0.8 db: /home/nihilist/.simplex/simplep-bot_chat.db, /home/nihilist/.simplex/simplep-bot_agent.db using SOCKS5 proxy SocksProxyWithAuth SocksIsolateByAuth 127.0.0.1:9050 for ALL servers. private message routing mode: unknown, fallback: protected type "/help" or "/h" for usage info /h No user profiles found, it will be created now. Please choose your display name. It will be sent to your contacts when you connect. It is only stored on your device and you can change it later. display name: invalid display name: /h you could use this one: h display name: Lantern Current user: Lantern __ __ ___ ___ __ __ ___ _ ___\ \ / / ___ _ _ _ _____ / __|_ _| \/ | _ \ | | __ \ V / / __| || | /_\_ _| \__ \| || |\/| | _/ |__| _| / . \| (__| __ |/ _ \| | |___/___|_| |_|_| |____|___/_/ \_\\___|_||_/_/ \_\_| Welcome Lantern! Thank you for installing SimpleX Chat! Connect to SimpleX Chat developers for any questions - just type /simplex Type /help for usage info, /welcome to show this message > #BEGIN SETUP OF THE SIMPLEX CLIENT: /smp smp://BD4qkVq8lJUgjHt0kUaxeQBYsKaxDejeecxm6-2vOwI=@b6geeakpwskovltbesvy3b6ah3ewxfmnhnshojndmpp7wcv2df7bnead.onion ok /xftp xftp://emX7ForsbdpIscNiDZ6b0HTbfFUayn00C1wmeVTofYA=@wg54vc6p3dscshywvt2wninachqoarrodtunapds7t7p47sn5e3qonid.onion:5233 ok /network socks=on using SOCKS5 proxy SocksProxyWithAuth SocksIsolateByAuth 127.0.0.1:9050 for ALL servers. 3) Create a virtual environment and install websockets module \ sudo apt update -y ; sudo apt install python3-venv python3 -m venv my_venv source my_venv/bin/activate pip install websockets 4) Start a websocket(chat server) -> simplex-chat-ubuntu-22_04-x86-64 -x -p 3030 -d simplep-bot You can use any port number. Make sure to change the port number in the script as well. Here we are using port 3030. [ laptop-privateVM ] [ /dev/pts/8 ] [Documents/darknet-lantern.sovereign/simpleP] → ./simplex-chat-ubuntu-22_04-x86-64 -d $HOME/.simplex/simplep-bot -x -p 3030 5) Call the is_simplex_link_valid(`link`) function. ```