Skip to content

Repository files navigation

Port Manager

A Python desktop application that displays active network ports, shows what processes are using them, provides intelligent recommendations on port safety, and allows users to release ports with multiple fallback methods.

Features

  • Dashboard View: Display total count of active ports grouped by risk level (Safe, Caution, Critical)
  • Port List View: Tabular display of all active ports with sorting and filtering
  • Intelligent Recommendations: Color-coded safety indicators for each port
  • Port Release: Multiple methods to release ports with fallback options
  • CLI Side Panel: Educational panel showing equivalent terminal commands
  • Theme Support: Light and dark mode

Requirements

  • Python 3.10 or higher
  • Administrator/root privileges (required for some port operations)

Installation

Quick Start

# Clone the repository
git clone <repository-url>
cd port-releasing

# Run the setup script
./init.sh

Manual Installation

# Create virtual environment
python -m venv venv

# Activate virtual environment
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate

# Install dependencies
pip install -r requirements.txt

# Run the application
python main.py

Usage

Running the Application

python main.py

For full functionality (releasing system ports), run with elevated privileges:

  • Windows: Run as Administrator
  • macOS/Linux: sudo python main.py

Dashboard

The dashboard provides an overview of all active ports on your system:

  • Total ports count
  • Safe ports (green) - User applications, dev servers
  • Caution ports (yellow) - Common services that might be needed
  • Critical ports (red) - System services, don't modify

Port List

View detailed information about each port:

  • Port number and protocol (TCP/UDP)
  • Process name and PID
  • Safety recommendation

Use search and filters to find specific ports:

  • Search by port number or process name
  • Filter by protocol (TCP/UDP/All)

Releasing Ports

  1. Select a port from the list
  2. Click the Release button
  3. Confirm the action in the dialog
  4. The application will try multiple methods if needed

CLI Side Panel

Learn the terminal commands used behind the scenes:

  • View the equivalent CLI command for each action
  • Copy commands to clipboard
  • View command history

Technology Stack

  • GUI Framework: CustomTkinter
  • Process Utilities: psutil
  • Platforms: Windows, macOS, Linux

Project Structure

port-releasing/
├── main.py              # Application entry point
├── src/
│   ├── app.py           # Main application class
│   ├── views/
│   │   ├── dashboard.py # Dashboard view
│   │   └── port_list.py # Port list view
│   ├── components/
│   │   ├── cli_panel.py # CLI side panel
│   │   ├── navbar.py    # Navigation bar
│   │   └── dialogs.py   # Confirmation dialogs
│   ├── services/
│   │   ├── port_scanner.py    # Port scanning logic
│   │   ├── port_releaser.py   # Port release methods
│   │   └── classifier.py      # Port classification
│   └── utils/
│       └── platform.py  # Cross-platform utilities
├── requirements.txt     # Python dependencies
├── init.sh             # Setup script
└── README.md           # This file

License

MIT License

About

This application is designed to identify and help the user to release locked ports when testing applications for development

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages