Unofficial Psiphon VPN client — CLI for Linux and Windows to connect, disconnect, and view tunnel stats.
- Node.js 14+
- Psiphon tunnel core binary for your platform from psiphon-tunnel-core-binaries. Place it in the project root (or use
--core <path>):- Linux:
psiphon-tunnel-core-x86_64(inlinux/) - Windows:
psiphon-tunnel-core-windows-amd64.exe(64-bit) orpsiphon-tunnel-core-i686.exe(32-bit) inwindows/
- Linux:
git clone https://github.com/your-username/psiphon-linux-cli-conduit.git
cd psiphon-linux-cli-conduit
npm installOr install globally:
npm install -g .
# then run: psiphon-clinpm start
# or
node cli/index.js connect
# or (if installed globally)
psiphon-cli- Protocol: choose 1 auto, 2 conduit, or 3 direct
- Region: choose 1 auto (Psiphon picks) or 2 and select a country (e.g. US, DE, NL)
- Tunnel starts. Proxies: HTTP
127.0.0.1:8081, SOCKS127.0.0.1:1081 - Press Ctrl+C to disconnect
In another terminal:
node cli/index.js stats
# or
psiphon-cli statsShows status, protocol, uptime, proxies, client/egress region, and traffic (↓/↑). Press Ctrl+C to exit.
node cli/index.js disconnect
# or
psiphon-cli disconnect| Command | Description |
|---|---|
connect |
Connect (choose protocol & region, run tunnel) |
disconnect |
Stop the tunnel |
stats |
Show live stats (refreshes every 2 seconds) |
logs |
Show live logs from tunnel core (pretty-printed JSON) |
| Option | Description |
|---|---|
-c, --config-dir |
Config directory (see below for defaults per OS) |
--core <path> |
Path to the Psiphon tunnel core binary for your platform |
Connect command also supports:
| Option | Description |
|---|---|
-r, --region <code> |
Egress region (ISO country code) |
-p, --upstream-proxy <url> |
Upstream proxy URL (see Upstream proxy) |
Default config directory:
- Linux:
~/.config/psiphon-cli - Windows:
%LOCALAPPDATA%\psiphon-cli(e.g.C:\Users\<you>\AppData\Local\psiphon-cli)
Example:
psiphon-cli -c ~/.config/psiphon connect
psiphon-cli --core /path/to/psiphon-tunnel-core-x86_64 connect -r DEYou can view live logs from the Psiphon tunnel core while connected:
psiphon-cli logs
psiphon-cli logs -n 100 # show last 100 lines, then followRun this in another terminal after starting psiphon-cli connect. Logs are for the current session and are reset each time you start a new connection.
Configuration for the Psiphon core is driven by a JSON file named psiphon.config.
- This CLI ships with a default config at
configs/psiphon.configthat is based on the public free-network example from ProxySmart’s Psiphon Linux guide (it setsRemoteServerListUrl,RemoteServerListSignaturePublicKey, and related fields to use Psiphon’s official server list).4 - On first run, that file is copied into your user config directory (see Default config directory above). A bundled snapshot of the official server list (
configs/server_list_compressed) is also copied into the config directory asremote_server_list, matchingRemoteServerListDownloadFilename. - On each
connect, the CLI updates only a few fields (region, protocol limits, traffic stats emission) and leaves the server list settings intact so thatpsiphon-tunnel-corecan download and verify the official list of servers. When the remote URL is blocked, the core can still fall back to the cachedremote_server_listfile.
Advanced users can edit the psiphon.config in their config directory directly if they want to override server behavior (for example, using specific server tokens instead of the remote list). When RemoteServerListUrl and RemoteServerListSignaturePublicKey are removed, the CLI will warn that the official server list is not configured, but it will still respect your custom config.
You can manually refresh the cached server list when you have good connectivity:
psiphon-cli refresh-server-listThis downloads the latest list from RemoteServerListUrl into your config directory (overwriting the previous remote_server_list), which can then be used later in more restricted networks.
All tunnel traffic can be routed through an upstream HTTP or SOCKS5 proxy. Use this when you are behind a corporate proxy or want to chain through another proxy.
- Option:
-p, --upstream-proxy <url> - Environment:
PSIPHON_UPSTREAM_PROXY(used when the flag is not set; useful in scripts or containers)
Supported URL schemes: http://, https://, socks5://. Authentication can be included in the URL (e.g. http://user:pass@proxy:8080).
Examples:
psiphon-cli connect -p http://proxy.example.com:8080
psiphon-cli connect -p socks5://127.0.0.1:1080
PSIPHON_UPSTREAM_PROXY=socks5://proxy:1080 psiphon-cli connect| Mode | Description |
|---|---|
| auto | Let Psiphon choose (default) |
| conduit | Via volunteer Conduit stations |
| direct | Direct to Psiphon servers |
Build produces a standalone executable (no Node.js required). Place the matching core binary in the project root before building.
| Platform | Command | Output | Core binary in project root |
|---|---|---|---|
| Linux | npm run build |
dist/psiphon-cli |
psiphon-tunnel-core-x86_64 |
| Windows | npm run build:win |
dist/psiphon-cli.exe |
psiphon-tunnel-core-windows-amd64.exe or psiphon-tunnel-core-i686.exe |
On first run, the bundled core is extracted to the default config directory for your OS.
Use a system-wide proxy or a tool like Karing: add SOCKS profile socks://127.0.0.1:1081 and enable Tun / global routing.
MIT