HeQihan

HeQihan

"Help! My Mac mini has come to life! The most attractive investment of the Year of the Dragon: a small box unlocking 5 major skills"

From "Network Security" to "AI Alchemy," I actually did these things with an Apple Mac mini...


Introduction#

Friends, in the Year of the Dragon, I did a "big" thing—bought a Mac mini 2023 version!

Why emphasize that it's the Year of the Dragon? Because I originally intended to publish this at the end of 2024, but unfortunately, I was too busy studying to write. Tomorrow is the Year of the Snake, and if I don't post today, it will become the most worthwhile money spent last year.

mac-mini-2023-m2

Did you think it was just an ordinary desktop ornament? Wrong!

  • On the surface, harmless, but in reality, it's a "M2 chip beast": "What can this little box do?—Everything!"
  • The ultimate temptation for contemporary cyber homebodies: low power consumption (electricity bill joy) + zero noise (roommate friendly) + so many ports that I can plug in all my weird devices (still feel like there are not enough ports)!

"Buy productivity before, buy a home server after!"


1. Surge: My Traffic, I’m the Guardian!#

"Say goodbye to 'internet disconnection anxiety'"

Friends, have you ever experienced such a desperate moment:

  • Suddenly losing internet while gaming, teammates bombarding with question marks
  • Watching a show at a climax, the screen freezes like a PowerPoint

But ever since I installed Surge on my Mac mini, all of that has become a thing of the past!

image

Operation Secrets#

  1. The Magic of DHCP Takeover

Those who know me are aware that to combat the slow internet speed of the school network and the limit on the number of devices connected simultaneously, I chose a roundabout way to use a portable Wi-Fi device. It was good, but once the number of connected devices increased, the portable Wi-Fi would overheat, and devices would either disconnect or be throttled. In short, it was still unpleasant. Using Surge to take over the traffic and act as a DHCP server was my original motivation for purchasing the Mac mini.

The effect after takeover was outstanding. Since the portable Wi-Fi no longer needed to act as a DHCP server, it could focus on receiving signals, and the internet speed significantly improved, barely reaching the broadband threshold in the U.S. For specific operations, you can check this.

image

  • Before: Portable Wi-Fi overheating, devices taking turns throttling.
  • Now: Mac mini takes over traffic, the network is stable as an old dog, even my roommate's internet usage can be seen by me (actually, I won't check)!

PS. Due to the limited memory cache of the Mac network stack (about 256MB), enabling enhanced mode as a gateway will cause the network stack memory to run out, leading to the closure of the program that uses the network stack the most (usually Surge), making Surge unable to work, requiring a manual restart. Personally, I feel it's okay; I've already adapted.

  1. Daily Life of a Rule Maniac

    The rule configuration of Surge is simply my handy treasure!

    • Ad filtering: Blocks 90% of pop-up ads on the internet, so I no longer have to endure brainwashing ads while watching videos!
    • Traffic monitoring: Who is secretly hogging the bandwidth? Surge logs are clear at a glance, directly capturing "internet disconnection warnings"!

image

For Surge rule configuration, you can refer to this.

  • Running Surge at full speed on the portable Wi-Fi, the internet speed is stable!
  • Roommates are connecting to Wi-Fi to download games: "Your internet speed is much better than the campus network (hidden talent.jpg)"

2. Hard Drive Enclosure Transforms into NAS: My Data, My Rules!#

"99 Reasons to Refuse Cloud Storage"

Friends, have you ever been tormented by cloud storage?

  • Download speed: Slower than a snail, only fast if you pay for a membership! (Pointing at Baidu Cloud, it turns out even 5G can't beat the download speed)
  • Privacy issues: Who has seen my files? Terrifying to think about! (Pointing at Alibaba Cloud, it turns out other users can also see my photos)

So, I decided to take matters into my own hands—using Mac mini + external hard drive enclosure to build a private NAS!

Cyber Hamster's Hoarding Solution#

  • Ugreen dual-bay hard drive enclosure: "Storing anime? No, I'm storing cyber figurines!" (Mac OS comes with RAID)

  • Actual read/write speed: The time to transfer a 4K movie ≈ the time to cook a bowl of noodles (based on 4K_HDR BDRip HEVC-10bit FLAC Weathering With You 7.9G, cooking a bowl of noodles takes about 5 minutes, internal network is Wi-Fi 6, requires compatible devices)

image

Cross-Platform Operations#

  • Windows accessing NAS: "Apple didn't trap me? Enabled SMB sharing, Windows users can also access, so touching!"

  • Mobile and tablet family: Watching movies from the NAS while lying in bed, feels like having a private cinema (just easy to fall asleep)

Ultimate Data Security Secrets#

  • RAID configuration: Hard drive failure? Not happening! This is a duplicate!

  • Automatic backup: Apple's built-in Time Machine, no more worries about losing files, mom no longer has to worry about my study materials!


3. OrbStack Virtual Machine: Developer's Slacking Tool#

"Docker? Linux? All in one!"

Friends, have you ever been frustrated by your development environment?

  • Docker image pull failure: Mind blown!
  • Virtual machine unresponsive: The computer fan spins wildly, as if saying "I'm about to explode!"

But ever since I started using OrbStack, everything has become smooth as silk!

Shock Warning#

  • Lighter than dual systems! Boot speed makes Docker Desktop cry in the bathroom!

  • Rosetta 2 translator in action: x86 applications? Bring it on! (Apple: Didn't expect, right? I can still be compatible!)

  • The virtual machine consumes almost no system resources when not in use, saving power and worry.

PS. During actual x86 translation, the Linux virtual machine does not support certain features, such as the lack of the AVX instruction set, leading to incompatibility with some applications.

Chuunibyou Usage Scenarios#

OrbStack supports binding domain names and command line operations

  • Binding the test environment to the domain debug.orb.local, feeling like the protagonist of The Matrix (sunglasses guy)

  • One-click command line to invoke Linux: "orb create ubuntu, at this moment, my soul resonates with Linus Torvalds!"


4. LM Studio: Local AI Cultivation Guide#

"What if there's no internet later? Mac mini is the only GPT!"

The privacy issues of cloud AI are a common topic and have troubled me as well.

  • Will my data be used for training? Terrifying to think about
  • When the internet is slow, AI reacts slower than I do
  • Occasionally encountering memory leak issues with Deepseek that crash my computer

So, I decided to run AI locally on the Mac mini!

image

  • "Running a 7B model on 8GB of memory: A little more memory would hurt, it runs smoothly as if the M2 chip is saying 'Is that all?'"

  • Comparing with cloud AI: Privacy? Free? Offline? Only children make choices; adults want them all! Just sacrificing a bit of speed.

  • Comparing running AI on Windows: No need to buy another graphics card, unified memory for the win.

For detailed content, you can check here.


5. Tailscale: Cyber Portals for a Home Away from Home#

"On Mars, still accessing the Earth’s Mac mini!"

Friends, who hasn't been frustrated by remote access? You can throw stones at me if you haven't.

  • Sunflower's speed is so slow it makes you question life!
  • Port mapping is so complicated it makes you want to give up!

I still haven't figured out port mapping and have long given up.

But ever since I started using Tailscale, everything has become so simple!

Magic Spell Analysis#

  • WireGuard protocol: An encrypted channel faster than fast, network administrators call it professional
  • Subnet routing method: From now on, all my home devices are "connected to Wi-Fi means coming home" wandering poets
  • Self-built Derper server, traffic reaches closer and faster

Outrageous Usage Scenarios#

  • Relaxing in a café, remotely summoning home AI to summarize videos
  • Transferring files internationally, speed crushing certain cloud storage memberships

Conclusion: The Victory of the Tech-Savvy in the Slums✌️#

  • Cost-effective blow: One Mac mini ≈ router + NAS + server + AI workstation, rounding down saves a fortune!

    • "Upgrade suggestion? The M4 chip is already out..."
    • "Please don't ask me if I regret buying the 2023 version after being backstabbed by the 2024 version! It hurts feelings! Heartache..."

Finally, on the last day of the Year of the Dragon, I wish everyone Happy New Year, may good things happen in the Year of the Snake.
image

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.