Q's Blog

A CSer Personal Blog

[ Technology ]

How to Seamlessly Use BT and PT on a Home Server Without a Public IP - A Guide with WireGuard and VPS

Running a BitTorrent (BT) or Private Tracker (PT) server at home can be challenging if your home network doesn’t have a public IP. Public IPs are essential for direct peer-to-peer connections, which significantly improve torrent connectivity. However, with the right setup, you can achieve similar connectivity and even gain extra benefits, like access to IPv6 peers, by using a VPS and WireGuard.

This guide will show you how to set up WireGuard on a VPS to relay torrent traffic to your home server, effectively giving your home server a “public” presence through the VPS.

Optimizing a 2012 Mac Mini Server for PVE

The 2012 Mac Mini Server remains a popular choice for Proxmox Virtual Environment (PVE) installations. This model stands out for its upgradeability: it allows for both memory and storage upgrades, making it particularly versatile. It’s also the last Mac Mini model with this flexibility, as the 2014 model saw soldered RAM, limited CPU performance, and eventually, Apple’s transition to ARM architecture in later versions, which limits virtualization capabilities.

This guide will walk you through steps to optimize your 2012 Mac Mini, from repository configurations to community scripts that enhance functionality and ease of use.

Guide to Optimizing Sony Digital Paper for Chinese

I got a Sony DPT-RP1 digital paper yesterday. It is such a great tool to read A4 PDF files due to its large screen. The only shortcoming is that it is the Japanese version. The Japanese version has Japanese and English language and input methods, the US version only has English language and input methods, and the Chinese version has Chinese and English language and input methods. When opening a book with Chinese chapters, the Chinese characters in the Table of Contents cannot be displayed normally, but the Chinese and American versions can do that.

The reason why Chinese cannot be displayed correctly is that the same Chinese character is written in different ways in various countries and regions in East Asia, which are similar but different. The Japanese version of the system will give preference to Japanese Chinese characters, and if they do not exist, the standard simplified Chinese characters will be used.

Through my research, I found that the firmware on Sony's website in China, Japan, and the US is all the same. This means that the regional version identifier should be stored somewhere other than the firmware. The regional version limitation cannot be solved by flashing the firmware.

How to Avoid Being Killed by the OOM Killer - Adding Swap Space

In Linux systems, memory management is crucial for maintaining system stability and performance. One component at the heart of this process is the "Out-Of-Memory (OOM) Killer." This process steps in when your system is critically low on memory. It selectively terminates one or more processes to free up memory and prevent a system crash. However, the intervention of the OOM Killer can be disruptive, as it might terminate essential or high-priority processes.

The Role of Swap Space

One effective way to mitigate the risk of encountering the OOM Killer is by adding swap space. Swap space acts as an overflow area for when your system's physical RAM is fully utilized. In essence, it's a portion of the hard drive that's used to temporarily store data that can't be held in RAM. By having additional swap space, your system can handle memory spikes more gracefully, reducing the likelihood of the OOM Killer being triggered.

Guide to Converting .sas7bdat to .csv Without SAS

The .sas7bdat format is integral to SAS (Statistical Analysis System) software, widely used in data analysis and statistical modeling. This proprietary format excels in handling complex datasets, with features like:

  • Binary Format: Efficient storage of large datasets.
  • Rich Metadata: Contains comprehensive information about the dataset structure and variables.
  • Cross-Platform Compatibility: Ensures seamless data sharing across various systems and SAS versions.
  • Diverse Data Type Support: Capable of storing multiple data types, including numeric and character.
  • Compression Capability: Allows file size reduction for optimized storage.

However, the proprietary nature of .sas7bdat files means that accessing and processing this data format usually requires SAS software, which might not be feasible for all users due to licensing or compatibility issues.

Guide to Creating a Bootable macOS USB Installer on Modern Systems

Creating a macOS USB Installer can be more challenging than its Windows counterpart, particularly when dealing with older macOS versions on the latest systems. For instance, I faced difficulties while attempting to reinstall macOS 10.7 Lion on a Mac Pro 2012 using a MacBook Air with an M1 chip and the latest macOS. This article aims to document the solutions I found for these challenges, which may help others facing similar issues.

Guide to Disabling Automatic APT on Debian for Low-Resource VPS

I recently acquired two budget-friendly Virtual Private Servers (VPS) from OranMe, one featuring a 0.1 CPU with 128MB RAM and the other a 0.5 CPU with 512MB RAM. These low-spec servers are not ideal for heavy usage but can be efficient for specific tasks. To maximize their performance, I chose Debian without a desktop environment, aiming to reduce system load.

However, I faced a challenge with the 0.1 CPU VPS, which struggled with the apt update and apt upgrade processes, significantly slowing down operations.

In the past weeks, both VPS servers experienced unexpected shutdowns, compromising their reliability. Server stability is crucial, and such shutdowns undermine their utility. I noticed a pattern of high CPU usage spikes preceding each shutdown on the control panel, leading me to suspect that these spikes triggered the VPS provider's auto-shutdown mechanism.

To investigate, I delved into the /var/log/system.log file and discovered that the high CPU usage coincided with the automatic execution of the apt periodic task.

Debian systems often include automated tasks for apt update and apt upgrade. While these tasks ensure the system stays updated, they can be resource-intensive, particularly on lower-spec servers like mine. Therefore, disabling these automatic updates is a practical solution for enhancing performance.

Step-by-Step Web Server Nginx Setup Guide

Nginx is a high-performance web server known for its efficiency, especially in terms of memory usage, fast startup times, and handling high concurrency. This makes it a popular choice for various internet projects.

  • Installation

    Nginx is available in the package repositories of most Linux distributions. For instance, in Debian-based systems, you can install Nginx using apt install nginx.

Step-by-Step Guide to Building Padavan Router Firmware

Padavan is a notable open-source firmware project, ideal for routers with MTK chips. While it's officially designed for certain ASUS routers, it can be adapted for most MTK chip routers (Ralink RT3883, MT7620, MT7621, MT7628) through configuration adjustments. This tutorial focuses on building Padavan firmware for the MI-NANO router, a device that, despite its impressive design, suffers from outdated official firmware and lack of IPv6 support.

Comprehensive Guide to Kindle Jailbreaking

This tutorial provides a detailed walkthrough on jailbreaking the Kindle, allowing you to unlock additional functionalities and customize your device beyond the standard features. The process takes advantage of a vulnerability present in firmware version 5.14.2.

Step-by-Step Guide to Flashing Xiaomi Router Nano Bootloader

The Xiaomi router nano, with its MTK 7628 chipset, is a compact yet powerful device. This tutorial will guide you through gaining root access and flashing its bootloader, enhancing its capabilities and performance.

Gaining Root Access

To enable SSH on Xiaomi's official firmware, two prerequisites must be met:

  1. The firmware must be the development version, available for download here.
  2. The nvram set ssh_en=1 setting needs to be enabled. Since the nano lacks a USB interface, its default ssh_en is 1.

Once SSH is enabled, the root password can be obtained through an algorithm that calculates it based on the router's S/N.

Easy Guide to Setting Up ZeroTier VPN

ZeroTier offers a seamless way to create secure networks linking various devices like on-premise systems, cloud platforms, desktops, and mobile devices. This connectivity enables team members to collaborate from virtually anywhere in the world on any device.

Installation Process

To get started, the simplest approach is to follow the setup instructions on the official ZeroTier website.

Step-by-Step Shadowsocks Proxy Setup Guide

Building on our previous discussion of Trojan-gfw, this guide focuses on Shadowsocks-libev, an alternative proxy tool that encrypts traffic to evade ISP network censorship. However, users should be aware that Shadowsocks-libev may not be effective for bypassing Chinese network censorship and could result in the server's IP being blocked in mainland China.

  • Installing Shadowsocks

    Start by installing the Shadowsocks-libev package:

    apt install shadowsocks-libev

Easy Steps to Secure Free Certificates with ACME.sh

This guide is dedicated to demonstrating how you can obtain free certificates essential for setting up HTTPS websites or configuring trojan proxies. By leveraging the efficiency of the acme.sh tool, you can quickly secure these certificates.

  • Installation and Automatic Upgrade of acme.sh

    Begin by installing acme.sh and configuring it for automatic upgrades:

    curl https://get.acme.sh | sh -s [email protected]
    . .bashrc
    acme.sh --upgrade --auto-upgrade

Step-by-Step Trojan Proxy Setup Guide

In this tutorial, I'll walk you through setting up a Trojan proxy, an effective tool for bypassing network censorship. Trojan-gfw is adept at disguising internet traffic as HTTPS, making it challenging for Internet Service Providers (ISPs) to detect your activities.

  • Installing Trojan

    Begin by installing the Trojan software:

    apt install trojan

Docker Installation with Automatic Script

Docker revolutionizes the way we think about software deployment with its innovative platform-as-a-service (PaaS) model. Utilizing OS-level virtualization, Docker packages software in lightweight, efficient containers, offering a flexible and portable solution for software deployment.

To effortlessly install Docker on various Linux systems, including Ubuntu and Debian, you can use this handy automatic install script:

curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh

Step-by-Step Jekyll Blog Setup Guide

Jekyll, an elegant and efficient static site generator, serves as an ideal platform for bloggers and developers looking for simplicity and power in their web projects. In this guide, I’ll take you through the process of setting up a Jekyll blog on a Macbook Air M1, leveraging the latest macOS environment. My aim is to provide a clear and concise path to get your Jekyll blog up and running, ensuring a smooth and straightforward experience. Let’s get started on this exciting journey of blogging with Jekyll on a powerful yet user-friendly setup!