Using WSL and Let's Encrypt to create Azure App Service SSL Wildcard Certificates

Scott Hanselman · 2023年6月27日

AI 摘要 AI 生成,可能有误

这篇文章详细讲解了如何在 WSL 中使用 certbot 生成免费的 Let's Encrypt 通配符 SSL 证书,然后将其转换为 Azure 应用服务所需的受密码保护、三重 DES 加密的 PFX 格式。该工作流程包括在 WSL 中创建证书,将其复制到 Windows,再通过 PowerShell 重新导入并导出以确保包含完整的证书链,最后以“自带证书”的方式上传到应用服务。作者指出,这解决了通配符域名证书价格昂贵的问题,不过进一步提高流程的自动化程度仍是未来的目标。

There are many let's encrypt automatic tools for azure but I also wanted to see if I could use certbot in wsl to generate a wildcard certificate for the azure Friday website and then upload the resulting certificates to azure app service.

Azure app service ultimately needs a specific format called dot PFX that includes the full certificate path and all intermediates.

Per the docs, App Service private certificates must meet the following requirements:

继续阅读全文

为了尊重作者,这里只展示开头几段。你可以去原文阅读,或者在 HorizonReader 里读:划线做笔记、让 AI 帮忙。

更多来自 Scott Hanselman

Debugging my new network, when 10 Gigabit Ethernet Runs at 300 Megabits

AI 摘要While troubleshooting slow file transfers on a 10 Gigabit Ethernet home network, the author used iperf3 to rule out the NAS and storage, revealing the Windows desktop's Intel E610-XT2 NIC as the culprit, with nearly a million discarded receive packets. Increasing the adapter's receive buffers to 4096 improved receive throughput, but disabling Large Send Offload V2 (IPv4) was the key fix, boosting one-way iperf3 performance from 313 Mbit/sec to 7.03 Gbit/sec. The author cautions against blanket disabling of LSO, emphasizing that systematic measurement—removing storage variables to isolate the network layer—was the real lesson.

Migrating a Synology NAS to a UniFi UNAS Pro 8 with Robocopy, SMB Multichannel, and Surprising Performance Traps

AI 摘要The author documents migrating data from an aging Synology NAS to a new UniFi UNAS Pro 8 using Robocopy over SMB, encountering failures caused by NTFS Alternate Data Streams that were resolved with the /COPY:DATX flag to skip them. Performance tuning revealed several surprising traps: the /Z restartable flag dramatically slowed copies, multithreading (/MT) helped only modestly for many small files, and the /J unbuffered I/O flag hurt SMB-to-SMB transfers despite being recommended for large files. Finally, SMB Multichannel allowed Windows to aggregate all four 1 GbE ports on the Synology, revealing the old NAS was faster than expected—the author concludes that Robocopy switches describe behavior rather than guaranteed performance gains.

Is the craft dead?

AI 摘要Scott Hanselman reflects on whether AI-assisted coding kills the craft of software development, comparing it to earlier shifts like moving from assembler to C or the rise of copy-paste from Stack Overflow. He argues that software remains hard and that craftsmanship, good taste, and human judgment still matter—much like the difference between IKEA furniture and true woodworking. While there will be plenty of work cleaning up AI-generated 'slop,' skilled developers can achieve amazing results with AI augmentation, and the craft still exists, just no longer bound by the speed of one's fingertips.

The danger of glamourizing one shots

AI 摘要Scott Hanselman argues that AI-augmented coding shouldn't be judged by impressive 'one shots,' since prompts like 'one shot Minecraft' rely on the name itself carrying enormous semantic weight—asking for the same result without using the name is far harder. He notes that one-shotting famous games just yields the statistically average, 'mid' version of them, and that real AI-assisted development is about sculpting ambiguity into specificity while keeping systems stable through change. As programming shifts toward a 'prose compiler,' good SDLC practices, historical knowledge, and clearly specified goals with sound judgment will matter more than ever.

Automatically Signing a Windows EXE with Azure Trusted Signing, dotnet sign, and GitHub Actions

AI 摘要The author explains how they code-signed their Windows Edge Light app using Azure Trusted Signing to avoid Windows Defender SmartScreen warnings, covering account setup, identity validation, and certificate profile creation. They demonstrate signing executables locally with the dotnet sign tool and automating the process in GitHub Actions using a service principal, noting the service costs about $10/month but eliminates the hassle of hardware tokens and manual certificate renewal.