Skip to main content

Add self-cert to a http website

Project description

SSLSocket

Add self-cert to a http website

Installation

pip install SSLSocket

Usage

  1. You must have a http website like http://localhost, http://127.0.0.1 or something else
  2. Install this library
  3. Using this code
import SSLSocket

# SSLSocket.log.setOutput(open('log.txt', 'w'))	# Change output write log to `log.txt` file
# SSLSocket.log.disableError(True)	# Disable Error log
# SSLSocket.log.disableError(False)	# Enable Error log

# Install self-cert into system
SSLSocket.installCert()

# Replace <DOMAIN> to another domain you want, (ex: sslsocket.com)
server = SSLSocket.Server(<DOMAIN>)  

# Replace IP and PORT with your http website, (ex: IP is '127.0.0.1', and Port is '8080')
server.setServer(<IP>, <PORT>)

# Start server
# In .start() you can use some arg
#    http_port = (int)   # Change http port (default: 80)
#    https_port = (int)  # Change https port (default: 443)
#    delay = (int)  # Delay in second before start server (default: 0)
#    force_https = (bool)  # Force server use https, will be redirect to https:// if user request to http://
server.start()

# Now you can browse your domain with SSL (ex: https://sslsocket.com)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

SSLSocket-0.0.0.7.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

SSLSocket-0.0.0.7-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file SSLSocket-0.0.0.7.tar.gz.

File metadata

  • Download URL: SSLSocket-0.0.0.7.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.4

File hashes

Hashes for SSLSocket-0.0.0.7.tar.gz
Algorithm Hash digest
SHA256 b1ad6d6ece80ed6d4532ab70a614acefaf6b6af7a615ed668d97898bcb4d602a
MD5 8e6b834f9d7626051676774afa14343a
BLAKE2b-256 fdaa9dcc55337b0d32b6fb75f129bb014258dc8c8b6585e58f5a075209931fb7

See more details on using hashes here.

Provenance

File details

Details for the file SSLSocket-0.0.0.7-py3-none-any.whl.

File metadata

  • Download URL: SSLSocket-0.0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.11.4

File hashes

Hashes for SSLSocket-0.0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 f77d99b2e2f9fc7a7ab858d0f4c602d36ff41832491133b006c958c0438debeb
MD5 5e85f22930f6b2ff0cf1371073311fd3
BLAKE2b-256 7eb490fadc3b260abfa54e1c8fd5ede0eceb77a48fb770f833ebd924141e91c8

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page