From 07186ec9a13c6a209426ea658eb17959c98576e7 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Tue, 17 Nov 2020 15:51:59 +0530 Subject: Publish deploy 2020-11-17 15:51 --- feed.rss | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'feed.rss') diff --git a/feed.rss b/feed.rss index 4d7c3da..b0478ce 100644 --- a/feed.rss +++ b/feed.rss @@ -1,4 +1,28 @@ -Navan ChauhanWelcome to my personal fragment of the internet. Majority of the posts should be complete.https://navanchauhan.github.io/enSun, 11 Oct 2020 16:28:56 +0530Sun, 11 Oct 2020 16:28:56 +0530250https://navanchauhan.github.io/posts/2020-10-11-macOS-Virtual-Cam-OBSTrying Different Camera SetupsComparison of different cameras setups for using as a webcam and tutorials for the same.https://navanchauhan.github.io/posts/2020-10-11-macOS-Virtual-Cam-OBSSun, 11 Oct 2020 16:12:00 +0530Trying Different Camera Setups
  1. Animated Overlays
  2. Using a modern camera as your webcam
  3. Using your phone's camera as your webcam
  4. Using a USB Camera

Comparison

Here are the results before you begin reading.

+Navan ChauhanWelcome to my personal fragment of the internet. Majority of the posts should be complete.https://navanchauhan.github.io/enTue, 17 Nov 2020 15:50:56 +0530Tue, 17 Nov 2020 15:50:56 +0530250https://navanchauhan.github.io/posts/2020-11-17-Lets-Encrypt-DuckDnsGenerating HTTPS Certificate using DNS a Challenge through Let's EncryptShort code-snippet to generate HTTPS certificates using the DNS Challenge through Lets Encrypt for a web-server using DuckDNS.https://navanchauhan.github.io/posts/2020-11-17-Lets-Encrypt-DuckDnsTue, 17 Nov 2020 15:04:00 +0530Generating HTTPS Certificate using DNS a Challenge through Let's Encrypt

I have a Raspberry-Pi running a Flask app through Gunicorn (Ubuntu 20.04 LTS). I am exposing it to the internet using DuckDNS.

Dependencies

sudo apt update && sudo apt install certbot -y +

Get the Certificate

sudo certbot certonly --manual --preferred-challenges dns-01 --email senpai@email.com -d mydomain.duckdns.org +

After you accept that you are okay with you IP address being logged, it will prompt you with updating your dns record. You need to create a new TXT record in the DNS settings for your domain.

For DuckDNS users it is as simple as entering this URL in their browser:

http://duckdns.org/update?domains=mydomain&token=duckdnstoken&txt=certbotdnstxt +

Where mydomain is your DuckDNS domain, duckdnstoken is your DuckDNS Token ( Found on the dashboard when you login) and certbotdnstxt is the TXT record value given by the prompt.

You can check if the TXT records have been updated by using the dig command:

dig navanspi.duckdns.org TXT +; <<>> DiG 9.16.1-Ubuntu <<>> navanspi.duckdns.org TXT +;; global options: +cmd +;; Got answer: +;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 27592 +;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1 + +;; OPT PSEUDOSECTION: +; EDNS: version: 0, flags:; udp: 65494 +;; QUESTION SECTION: +;navanspi.duckdns.org. IN TXT + +;; ANSWER SECTION: +navanspi.duckdns.org. 60 IN TXT "4OKbijIJmc82Yv2NiGVm1RmaBHSCZ_230qNtj9YA-qk" + +;; Query time: 275 msec +;; SERVER: 127.0.0.53#53(127.0.0.53) +;; WHEN: Tue Nov 17 15:23:15 IST 2020 +;; MSG SIZE rcvd: 105 +

DuckDNS almost instantly propagates the changes but for other domain hosts, it could take a while.

Once you can ensure that the TXT record changes has been successfully applied and is visible through the dig command, press enter on the Certbot prompt and your certificate should be generated.

Renewing

As we manually generated the certificate certbot renew will fail, to renew the certificate you need to simply re-generate the certificate using the above steps.

Using the Certificate with Gunicorn

Example Gunicorn command for running a web-app:

gunicorn api:app -k uvicorn.workers.UvicornWorker -b 0.0.0.0:7589 +

To use the certificate with it, simply copy the cert.pem and privkey.pem to your working directory ( change the appropriate permissions ) and include them in the command

gunicorn api:app -k uvicorn.workers.UvicornWorker -b 0.0.0.0:7589 --certfile=cert.pem --keyfile=privkey.pem +

Caveats with copying the certificate: If you renew the certificate you will have to re-copy the files

]]>
https://navanchauhan.github.io/posts/2020-10-11-macOS-Virtual-Cam-OBSTrying Different Camera SetupsComparison of different cameras setups for using as a webcam and tutorials for the same.https://navanchauhan.github.io/posts/2020-10-11-macOS-Virtual-Cam-OBSSun, 11 Oct 2020 16:12:00 +0530Trying Different Camera Setups
  1. Animated Overlays
  2. Using a modern camera as your webcam
  3. Using your phone's camera as your webcam
  4. Using a USB Camera

Comparison

Here are the results before you begin reading.

Normal Webcam USB Webcam Camo iPhone 5S -- cgit v1.2.3