SOCKS5 SSH Bridge Checker that resists network deconnections
dédicace à Seb!
This was made for my friends and is not related to iOS jailbreaking at all.
If you are interested in using the alpha version, check the dev branch.
To install intersectionBridge (intersectiond), you have two possibilities :
- Shell Script
- Python Script invocating shell script
None is better than the other, it just works the same. The script should self install. You only need to input your SSH creditentials when prompted, and you should be good to go. I recommend doing a reboot after first install.
- Download
installer.sh
in any directory you want. - Open a Terminal, then go to that directory using
cd
- Once you are there, run
chmod +x installer.sh && ./installer.sh
Run the following code:
import os
import urllib.request
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
def download_file(url, destination):
try:
urllib.request.urlretrieve(url, destination)
return True
except Exception as e:
return False
def main():
script_url = "https://raw.githubusercontent.com/c22dev/intersectionBridge/main/installer.sh"
script_name = "installer.sh"
if download_file(script_url, script_name):
os.chmod(script_name, 0o755)
os.system(f"./{script_name}")
if __name__ == "__main__":
main()
This (sshBridge.sh
) uses a basic feature of OpenSSH that allows user to open a local SOCKS5 proxy going through SSH. This can be easily replicated and isn't the most interesting thing.
The main script (intersectiond
) wakes up, check and assist sshBridge. Here is what it does:
- Check for updates and various stuff about creditentials
- Launch sshBridge
- Check, every 5 seconds, if proxying a request through the SSH bridge works (using curl). If not, we kill the process and run another instance of it.
The installer (installer.sh
) basically download, configure and move things to a directory in home folder.
The updater (updater.sh
) runs every 30mins.
- You might get an error if the saved server cannot be found (NOFILEINSRVDIR) or that the script cannot connect (MAXATTEMPTREACHEDNW); if so, run the following commands:
and restart your mac. You will be asked for creditentials on login.
rm -rf $HOME/Intersection/.storedServers rm -rf $HOME/Intersection/.storedUsernames