ββββββ ββββ β ββββββ ββββββ βββ βββ ββββββ βββββββββ ββ β ββ ββ β ββββ ββ βββ β ββββββ βββββββ ββββ βββ ββ ββββ βββ ββ ββββββ β βββ βββ β βββ βββββββ βββββ ββββ ββ βββ β ββββ βββββββββ βββββββββββ β ββββββββββββ ββ ββββ β βββββββββββ βββββ βββββ βββββ ββββ β βββββββββ β β ββββ β ββ ββ ββ ββ β β β ββ β ββ ββ ββββ βββββ ββββ β β β ββ β β ββ ββ β ββ β β ββ β βββββ βββ ββ β β β β β β β ββ β β β ββ ββ β β β β β β β β β β β β ============================================================== π οΈ **Command-Line Arguments** Usage: -------------------------------------------------------------- ./e-N-c-R-y-P-t peer.crt peer.key ListenPort [ PeerHost PeerPort ] Where: -------------------------------------------------------------- 1. **peer.crt**: π Path to your public certificate file in PEM format. 2. **peer.key**: π Path to your private key file in PEM format. 3. **ListenPort**: π§ Port number on which the application will listen for incoming connections. 4. **PeerHost** *(optional)*: π Hostname or IP address of a peer to connect to. 5. **PeerPort** *(optional)*: π Port number on the peer host to connect to. ============================================================== π οΈ **Generating Certificates with OpenSSL** To generate a self-signed certificate and private key: openssl req -x509 -newkey rsa:2048 -nodes -keyout peer.key -out peer.crt -days 365 -subj "/CN=$(curl -s https://ip.e-n-c-r-y-p-t.cc -4 | tr -d '\n' | sha256sum | awk '{print toupper($1)}')" | |--> Generates a new RSA private key (peer.key) and a self-signed certificate (peer.crt). | |--> The certificate is valid for 365 days. | |--> The Common Name (CN) is set to the public IP address of your machine, hashed using SHA-256 for anonymity. ============================================================== π **Running the Application** To start the application: ./e-N-c-R-y-P-t peer.crt peer.key 443 | |--> Starts the application, listening on port 443. | |--> Uses the specified certificate and key files for TLS encryption. To connect to a specific peer while also listening on port: ./e-N-c-R-y-P-t peer.crt peer.key 443 1.2.3.4 12345 |--> Starts the application, listening on port 443. | |--> Attempts to connect to the peer at 1.2.3.4 on port 12345. To connect to a specific peer without listening on port: ./e-N-c-R-y-P-t peer.crt peer.key 0 1.2.3.4 12345 |--> Starts the application, listening on port 0 (port is not opened). | |--> Attempts to connect to the peer at 1.2.3.4 on port 12345.
Made with β€οΈ in πΈπ°