Recent Project Updates: Blog Refactoring, PXE Exploration & WeChat Backend Optimization

When I first started this official account, I hoped to share some tutorials to promote my business. After publishing the "System Encapsulation Tutorial Series," I was at a loss for what to write next. Interestingly, the article with the highest readership and shares during this period was the one about Epson's reset software, which was quite unexpected.

Blog

After that, I began migrating my blog from PHP to ols-wordpress (a WordPress Docker container integrated with OpenLiteSpeed), mainly attracted by the convenience of Docker migration. However, the process wasn't smooth. I use SafeLine as a reverse proxy, and its Docker instance is on a separate network segment (e.g., 192.168.x.x). The LiteSpeed cache plugin needs the visitor's real IP address, which requires adding the proxy's IP to the trusted list in the LiteSpeed admin panel. At the time, I didn't recognize this double-reverse-proxy issue (LiteSpeed didn't trust SafeLine's header) and just noticed a connection anomaly warning in the LiteSpeed backend, which I didn't pay much attention to.

To make matters worse, as soon as the new site was up, I installed a bunch of plugins, including the free versions of Yoast SEO and Rank Math, plus a traffic statistics plugin. Later, I tried some "special edition" SEO plugins. All these actions, combined with the migration itself, cluttered the website's <head> with numerous JS scripts. Then, suddenly, Bing stopped indexing my site. I couldn't tell if it was due to the special plugins or improper cache configuration after the migration.

So, I decided to start over. Currently, the new blog's interface design is mostly finalized. The remaining work mainly involves finishing touches, such as implementing automatic URL submission to search engines, adding multi-language support, completing the login functionality, and setting up the backend service for article attachment downloads.

PXE Installation Project

Earlier, I created a simple system installer using the Iced-UI framework. This program could handle basic system installation, disk formatting, and boot repair, and it could automatically detect UEFI and BIOS environments to partition the disk accordingly. Iced-UI's state, msg, and update mechanism made the development process incredibly smooth and logical. However, I hit a bottleneck when trying to optimize the UI. More importantly, as this was my first major project (a PE installer), my inexperience led me to cram all the state, msg, and update logic into a single state.rs file, which grew to several hundred lines of code. Although I considered refactoring it, the difficulty of optimizing the UI led me to shelve the project temporarily.

I had also previously created a Dioxus application that could serve the corresponding iPXE bootloader based on the UEFI or BIOS architecture. My next plan is to use Dioxus to refactor the PXE boot and subsequent installation process. Most of the core logic I wrote with Iced-UI—like secure boot detection, hardware architecture identification, system installation, and disk formatting—can be reused. The main work will be in UI design and implementing the state management.

WeChat Official Account Backend

I added a QR code login feature to the WeChat backend. However, I'm still clueless about the front-end interface design—how to structure columns, lay out elements, etc. (Oh, right, I initially wanted to build a multi-agent customer service system to add a web-based chat to my site).

I had designed a mechanism to distribute JWTs (JSON Web Tokens) upon scanning the QR code, but I didn't think it through completely and only tailored it for the WeChat backend. Now, I probably need to add functionality to differentiate between various applications and callback URLs.

There was a small hiccup here: initially, I used the WeChat Official Account's test API for development, which has comprehensive permissions. But when I switched to my own subscription account for actual testing, I discovered that subscription accounts don't have API access for "event-based QR codes"—only service accounts do. So, I had to change it to an in-app QR code login.

Honestly, when I think about it, every program has significant room for improvement. For now, I'll focus on perfecting the blog. I'll just post about whatever I'm learning. Recently, I've been working on the website's SEO.

One step at a time~

Articles you may be interested in

Discover more wonderful content

Comment