Skip to content

Starling226/conduit-manager

Repository files navigation

Psiphon Conduit: Cross-Platform Remote Management

Deploy, monitor, and manage Psiphon Conduit across Windows, Linux, and macOS.

This repository features an interactive application designed to streamline the deployment and real-time monitoring of Psiphon Conduit on remote Linux servers. Effortlessly manage everything from a single instance to hundreds of servers with minimal overhead.

Download and Preparations

  1. Python Instalation: Please visist https://www.python.org/downloads/ and install the latest python

  2. Create Directory: Create a folder named Conduit in your C:\ partition in Windows or /opt/conduit in Linux and macOS environments.

  3. Download Scripts: Save the following scripts into C:\Conduit or /opt/conduit:

    • setup_conduit.bat
    • setup_conduit.sh
    • ConduiQt.py

SSH Genetaion and Python Installation

Setup: From the Conduit folder double click on setup_conduit.bat for Windows or run setup_conduit.sh in terminal. This will generate ssh keys in .ssh folder in user home folder and install the required python packages.


Conduit Deployment

🖥️ Interactive GUI: Conduit Manager

The ConduitQt.py application is a robust, multi-threaded, cross-platform management suite built with PyQt5. It provides a unified interface for deploying, managing, and monitoring Conduit servers across Windows, Linux, and macOS environments.

🚀 Key Features

  • Dynamic Server Management: Easily manage your infrastructure via the servers.txt configuration file. Add, edit, or remove servers, and the GUI reflects changes instantly.
  • Batch Operations: The interface uses a "Targeting" system. Simply move servers to the Right List (Target List) to include them in an action.

    Note: Every server in the Right List will be included in the requested operation (Deploy, Start, Stop, or Reset), regardless of whether it is currently highlighted. You can also select servers from Status Table and do similar operations but the the right panel must be empty.

  • Real-time Monitoring: The multi-threaded architecture ensures the UI remains responsive while performing heavy deployment tasks or fetching live statistics from multiple nodes simultaneously.
  • Graphic Interface for Network Traffic Monitoring and System Health: The graphic interface allows monitoring of servers inividually using the high peformance PyQtgraph library.
  • Configuration Updates: By enabling the "Update Config" checkbox, you can push new parameters (such as client limits or bandwidth caps) to your servers during a Start or Restart command.
  • Parallel Instance Deployment: ability to spawn and monitor up to 4 concurrent conduit processes per host. This effectively utilizes multi-core environments to increase client handling capacity and maximize available network bandwidth.

🛠️ How to Use

  1. Import: Load your servers.txt to populate the available server list. Scroll down to management section to see how to create servers.txt.
  2. Target: Move the desired servers from the left panel to the right-hand (Target) panel.
  3. Execute: Choose your operation (e.g., Deploy, Reset, Stop, etc.). If you have deployed your servers click on refresh button to immediatly update your servers status table.
  4. Monitor: Follow real-time progress and logs in the integrated console output and graphical interface.

📂 Component Overview

Component Platform Primary Use Case
ConduitQt.py Cross-Platform Full-featured visual management & bulk deployment.

Screenshot of the Conduit Manager Qt Application

Here is the GUI interface for Conduit Management:

Conduit Management Interface (Screenshot showing Conduit management)

Conduit Management Interface (Screenshot showing Conduit network traffic feature)

Conduit Management Interface (Screenshot showing system health)

Running Python Script

To run ConduitQt.py, simply double click on or run them in the command line terminal using the py command in Windows py ConduitQt.py, or python3 in Linux or macOS python3 ConduitQt.py.


Management

The Start, Stop, Re-Start, Reset, Status, Upgrade, Deploy allows you to manage your servers efficiently. Sometime even after few hours you have no clients; in that case, you might reset the conduit to get fresh keys and get clients.

Using servers.txt

For the Management and Monitoring, you need to create a servers.txt file in the same directory that you run ConduitQt.py. After importing the servers.text, it will be automatically converted into servers.json. The next time you launch the application, it imports servers.json automatically. servers.json must be available in the directory you launch the ConduitQt.py. You can add, delete, or update the individual server profile within the GUI. If you import servers.txt later, it will overwrite the existing servers.json. Upon successfull deployment the ssh public key will be injected to the server. You must add root user or a sudoer user for deployment and other processes. Communication with the server will be perfomred using the ssh keys after successfull deployment. Default port is 22 but it is recommended to change it to different port to avoid attracting ssh probing your system. You may choose port 2000 < port < 3000. You can leave timezone as --- --- or your server actual timezone. Upon deployment this will be replaced by the actual server timezone automatically. timezone is a remote server timezone and is diffrenet than your client timezone. status field is 1 by default, but you can set it to 0 if server is temporarily offline or decommisioned and you still want to keep the server records for repurpose.

Format: name,hostname,timezone,port,status,username,password. Do not add this header to servers.txt. Add each server records to a different row in your servers.txt.

Example: MyServer,123.45.67.89,US/Central -600,22,1,root,password

Monitoring

After installation, the Psiphon network requires time for vetting and propagation. This can take anywhere from a few minutes to several hours. You can use Statistics, or watch the Status Table for real time monitoring. You can click on Visualize to see the network traffic for individual servers. The graphs are interactive, hold the mouse right button and drag the mouse up and down, left or right to zoom, unzoom. Hold the mouse right button to move up and down, shift to right and left. Right click on graph and click on "View All" to reset and export the save the graph. Using Traffice mode in Visualizer window you can see the total and interval traffic. Displayed Date Time represent the server time zone.


Troubleshooting

Issue Potential Cause Solution
Connection Timeout Firewall is blocking Port 22. Ensure Port 22 is open in your VPS cloud firewall.
Authentication Failed Incorrect password or root disabled. Ensure PermitRootLogin yes is set in /etc/ssh/sshd_config.
Permission Denied Not logged in as root. Non-Status actions (Start/Stop/Reset) require root access.
Architecture Mismatch you are using a modern Mac with an M1, M2, or M3 chip (Apple Silicon), and you run into issues installing PyQt5 You might need to install it via Homebrew instead of pip
brew install pyqt@5

Features Note

  • Add server: Use Add Server(+) if you have not added any server yet. You can also use this later to add further servers.
  • Delete server: Use Delete Server if you no longer needed.
  • Deploy: Select one or a number of servers in the right panel and cick Deploy. This will deploy your server(s)
  • Upgrade: This upgrade the conduit cli binary in remote server to the version displayed in GUI. It also upgrade to the latest get_stat_conduit.py.
  • Status: Clicking on this dosplay the current status of your server(s), whether it is active or dead. It also shows the last 10 connections to the server.
  • Statistics: This shows the network analytic. Clients is the average of last one hour. To get the current live connections and conduit status click on Status Button.
  • Stop: If you like to stop Conduit service, use this. You hardly need this.
  • Start: If Conduit service is not active, use this to start it.
  • Re-Start: If you want to chnage Conduit parameters, like Max Clients or Bandwidth, check Apply Config Changes Checkbox and click Re-start. You can also use this if yours server is not connect after couple of hours.
  • Reset: You can reset the Conduit config using this. In case if you have not received any client or you think you do not have more clients usually less than 50 for more than a day, you can reset the config. If after frew hours you have receieved any clients you can also reset the config.
  • Display Name/IP: Use this to siwtch the list to Server name or IP address.
  • Max Clients: As a rule of thumb, each core should support 50-60 clients. So if you have 4 cores you can set it to 225. This will possibly gives you up to 200 clients.
  • Status Table: If the selection panel is empty you can highlight IP addresses in Status Table and directly do oprtaions. Click column header to sort ascending or descending.
  • Traffic: Traffic allows you to monitor network traffic across the individual servers. When you click on Traffic, it imports the server log files from local disk. Within the Visualizer window you can click on "Reload to retrieve the data" and it starts fetching the latest conduit logs from the servers. Please be patient, it may takes a couple of minutes to download the logs.
  • Report: Report allows you to download and display conduit hourly network traffic across the individual servers. When you click on Traffic, it imports the server hourly log files from local disk. Within the Visualizer window you can click on "Reload to retrieve the data" and it starts fetching the latest hourly logs from the servers. Please be patient, it may takes a couple of minutes to download the logs.
  • Health: Health display the current server health incluidng CPU and Memory usage for all the servers in real time in a new window. Depending on display mode it can display server name or IP address. You can change the display mode by clicking on Health Button, it quickly changes the display mode without launching a fresh window.
  • Set Current Instances: If your bandwidth is not effectively used you can add up to 4 conduit instances. You may often need two instances running independently but you may increase to 3 or 4 if you have more than 4 cores. Every instances is a completely independent instance. When you set the instances every operation will be done on that instance. This includes Traffic and Report Visualization. Please note If this is the first time you deploy the conduit, you must set the current instance to Instance-1. If a server does not have the additional instancec, it will be displayed in red color in Status Table and so, it will not be included in Traffic and Report graphs and others. You can switch between different instances to see the state of each group of servers within that instance. You can launch multiple instance of ConduitQt.py and set each to a different instance. This way, you can manage and monitor each instance without switching frequently.
  • Sun & Lion: If you like to restrict your conduit connection only from Shir O Khorshid Android app, enable this before deployment. Clients who use Psiphon Android app will be ignored.
  • Timezone: Conduit logs are stored in UTC time and they will be displayed in client selected timezone

Important Notes

  • SSH Port: These scripts use the standard SSH Port 22 for all connections y default, unless you choose a different port.
  • Security Warning: The servers.txt or servers.json files contains plain-text passwords. DO NOT upload this file to GitHub.

Credits & Acknowledgments

This deployment suite is designed for use with the Conduit binary provided by ssmirr.


Disclaimer

Use this software at your own risk. These scripts are provided "as is" without any warranty of any kind.

  • No Liability: The author(s) assume no liability for loss of data, server downtime, or any damages resulting from the use of this code.
  • Third-Party Binaries: These scripts are designed to download and install the official Psiphon Conduit binary. The author of these scripts is not responsible for the maintenance, security, or functionality of the Conduit binary itself.
  • Affiliation: This project is an independent community tool and is not officially affiliated with or endorsed by the Psiphon team.

About

A cross platform Python-based toolkit to deploy, monitor, and manage Psiphon Conduit nodes on remote Linux servers directly from Windows, Linux, and macOS clients.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages