Anduin Xue
Anduin Xue

Anduin's Tech Blog

Python


Bridging Identity and Email Management Synchronizing Authentik Groups with Mailcow Aliases

What happens when your organization’s identity system knows exactly who belongs to which team, but your email server remains in the dark? This article explores the silent gap between modern identity management and email distribution, revealing how Authentik’s rich group structures can be seamlessly mirrored into Mailcow’s email aliases through automated synchronization. It’s not just about technical integration—it’s about transforming static mailing lists into living, breathing representations of your organization’s evolving structure. The solution hinges on a clever interplay of REST APIs, recursive group resolution, and precise alias management, turning manual, error-prone workflows into a self-updating system where a user’s role change in Authentik instantly reflects in their email access. But beyond the code lies a deeper question: in an age of dynamic teams and fluid collaboration, should our communication tools still lag behind our identity systems? What if every team’s inbox cou...--AI Generated

Data Sync Linux Python Email Organization Tips Authentik OIDC Mailcow

使用 Clickhouse 来可视化 Caddy 产生的日志

The article details the process of setting up a real-time log analysis system using ClickHouse to process Caddy server logs, enabling comprehensive monitoring and visualization of web traffic. By parsing Caddy's JSON logs and ingesting them into ClickHouse via a custom script, the author creates a high-performance database for querying and analyzing traffic patterns. A variety of SQL queries are provided to extract key insights: top-performing hosts, slowest endpoints (using P95 and P99 latency), error rate analysis by status code and URI, request size distribution, client behavior via User-Agent, and traffic heatmaps by day and hour. The system is also used to investigate a DDoS attack in real time, analyzing request volume, IP activity, and URI patterns within a specific UTC timeframe. The data is visualized using ClickHouse’s built-in dashboard and Grafana, producing dynamic, interactive charts that reveal traffic trends, performance bottlenecks, and malicious behavior. The setup pr...--AI Generated

Caddy CaddyV2 Python Docker Clickhouse Superset

Set up a local docker registry mirror

This guide outlines a comprehensive process for setting up a self-hosted Docker registry to mirror public Docker images locally, ensuring reliable access and improved performance. It details the creation of four essential Python scripts: is_latest.py to check if a Docker image is the latest version, check.py to verify image integrity by inspecting the registry, delete.py to remove outdated or corrupted images, and a bash script mirror.sh that orchestrates the mirroring process. The script uses regctl to interact with the registry, pulls images from public sources, pushes them to the local registry, and validates them through automated checks. The setup includes configuring Docker to trust the insecure local registry by modifying /etc/docker/daemon.json and restarting the Docker service. The process can be containerized using a Dockerfile that installs dependencies, copies scripts, sets up a cron job to run the mirroring task daily at 3:00 AM, and runs the container with access to the D...--AI Generated

Automation Python Docker Registry Mirroring Scripting

Mirror YouTube channel to watch videos with best experience

What if you could watch YouTube videos without ads, in the highest quality, even when the video is gone or you’re offline? This article explores a powerful yet surprisingly accessible way to mirror YouTube content to your own server, transforming how you consume online video. By setting up an Ubuntu server, installing tools like youtube-dl, and automating downloads with scripts, you can build a personal video archive that’s always under your control. The process goes beyond simple downloading—it’s about reclaiming autonomy over your digital experience, turning passive viewing into a curated, ad-free library. With Jellyfin, you gain a sleek media server to organize and stream your content across devices, while tools like Aiursoft.Static can even expose your videos to the web via a lightweight HTTP server, enabling playback in VLC or any browser. But this isn’t just about tech—it raises deeper questions: What does it mean to own your media in an era of algorithmic control? How much of ou...--AI Generated

Web Linux Ubuntu Python Youtube Jellyfin VLC

让你的数据中心使用 GPU 算力!

The guide details the setup and management of NVIDIA GPUs in a virtualized environment using VMware vSphere, focusing on enabling GPU passthrough for virtual machines (VMs) with NVIDIA GRID and CUDA support. It begins with configuring the host to use Shared Direct Vendor Passthrough graphics, ensuring the GPU is properly recognized and set to Shared Direct mode in vCenter. The process involves installing the NVIDIA GRID driver on the guest OS, with attention to version compatibility between host and guest drivers. A critical step is activating the GPU license via a client configuration token, followed by restarting the NVIDIA driver service to confirm license validity. CUDA installation is performed using a custom script that avoids overwriting existing drivers, with the installer configured to skip driver installation and only install the CUDA toolkit. The CUDA path is added to the system environment, and verification is done using nvcc --version. The guide emphasizes the importance o...--AI Generated

Ubuntu VMware Vsphere Server NVIDIA Ai vGPU Python Tesla CUDA

  • 1