This guide shows how to install Psiphon on Linux and configure a smart launcher script that:
- Starts Psiphon automatically
- Waits until the tunnel is ready
- Enables system proxy automatically
- Restores original network settings when Psiphon stops (Ctrl+C)
sudo apt update
sudo apt install wget -ycurl -sSL https://raw.githubusercontent.com/K-Rutuparna1087/psiphon_smart/main/install.sh |bashpsiphoncd ~/Downloads
wget https://raw.githubusercontent.com/SpherionOS/PsiphonLinux/main/plinstaller2
sudo sh plinstaller2After installation, Psiphon can be started using:
sudo psiphonCreate the script:
nano ~/psiphon_smart.shPaste:
#!/bin/bash
cleanup() {
echo "Stopping Psiphon..."
kill $PSIPHON_PID 2>/dev/null
gsettings set org.gnome.system.proxy mode 'none'
echo "Network settings restored."
exit
}
trap cleanup INT TERM
echo "Starting Psiphon..."
sudo /usr/bin/psiphon > /dev/null 2>&1 &
PSIPHON_PID=$!
echo "Waiting for Psiphon proxy..."
until nc -z 127.0.0.1 8081; do
sleep 1
done
COUNTRY=$(curl -s --proxy http://127.0.0.1:8081 https://ipinfo.io/country)
echo "Psiphon connected."
echo "Connected Country: $COUNTRY"
echo "Test page: https://tunneled.me/"
echo "Enabling system proxy..."
gsettings set org.gnome.system.proxy mode 'manual'
gsettings set org.gnome.system.proxy.http host '127.0.0.1'
gsettings set org.gnome.system.proxy.http port 8081
gsettings set org.gnome.system.proxy.https host '127.0.0.1'
gsettings set org.gnome.system.proxy.https port 8081
gsettings set org.gnome.system.proxy.socks host '127.0.0.1'
gsettings set org.gnome.system.proxy.socks port 1081
echo "Press Ctrl+C to stop Psiphon."
wait $PSIPHON_PID
cleanupMake executable:
chmod +x ~/psiphon_smart.shCreate launcher:
sudo nano /usr/local/bin/psiphonPaste:
#!/bin/bash
/home/$USER/psiphon_smart.shMake executable:
sudo chmod +x /usr/local/bin/psiphonNow Psiphon can be started using:
psiphonStart Psiphon:
psiphonBehavior:
- Automatically connects
- Enables system proxy
- Displays connected country
- Press Ctrl+C to stop
- Proxy settings automatically restored
- Psiphon runs a local proxy at:
- HTTP/HTTPS →
127.0.0.1:8081 - SOCKS →
127.0.0.1:1081
- HTTP/HTTPS →
- System proxy is enabled only after the tunnel becomes active.
- Network settings are automatically restored when the script exits.