Turning HTTP into HTTPS Locally with http2https

πŸ“… Published April 3, 2026 Β·network-securitytoolingtls-ssl

Written by Aryan Giri

http2https is a Python-based CLI tool that helps you access an HTTP-only local service through HTTPS.

It is useful when a browser, client, or tool expects a secure https:// address, but your service still runs on plain HTTP.

GitHub: https://github.com/giriaryan694-a11y/http2https


The Problem

A lot of local tools still run on HTTP.

That is fine for development, but modern browsers and some apps increasingly expect HTTPS. This can create problems such as:

http2https solves this by sitting in front of the HTTP service and exposing it over HTTPS.


How It Works

The idea is simple:

HTTP server:   localhost:8000
HTTPS proxy:   localhost:8080

Instead of opening:

http://IP:8000

you open:

https://IP:8080

The proxy accepts the secure connection, decrypts it locally, forwards the request to the HTTP backend, and sends the response back to the client.


Why This Is Useful

This tool is helpful for:


Features


Installation

Clone the repository

git clone https://github.com/giriaryan694-a11y/http2https
cd http2https

Standard Python installation

pip install cryptography pyfiglet termcolor colorama requests

Termux installation

If you are using Termux, install cryptography with the package manager instead of pip to avoid build errors.

pkg update && pkg upgrade
pkg install python python-cryptography
pip install pyfiglet termcolor colorama requests

Usage

  1. Start your local HTTP server.

Example:

python -m http.server 8000
  1. Run the tool.
python main.py
  1. Enter the requested details.

Typical values:

  1. Open the HTTPS proxy in your browser.

Example:

https://127.0.0.1:8080

Trusting the Certificate

To avoid browser warnings, install the generated certificate as a trusted root certificate on your system.

Windows

  1. Open the generated certificate file.
  2. Click Install Certificate.
  3. Choose Current User.
  4. Select Place all certificates in the following store.
  5. Choose Trusted Root Certification Authorities.
  6. Finish the wizard.
  7. Restart your browser.

Linux

Install the certificate into your system trust store using your distro’s certificate management method.

Android

Import the certificate through your device security settings if your device supports user certificate installation.


Notes


Example Flow

Browser / Client
        ↓ HTTPS
http2https proxy on 8080
        ↓ HTTP
Local service on 8000

License

This project is licensed under the Apache License 2.0.