Port Forwarding on Windows, Linux and macOS (with a Command Generator)

Local TCP/UDP port forwarding on all three platforms: Windows has it built in via netsh interface portproxy, while Linux and macOS use socat wrapped in a service so it survives reboots. A comparison table and a troubleshooting checklist are at the end. The parameters are easy to get wrong, so there is a command generator below — fill in the addresses and ports and copy the result. When you need port forwarding The cases I run into most often: ...

August 17, 2026 · 8 min · Vinkey

Cisco AnyConnect & Openconnect PlayBook

https://github.com/ma-wenqian/vpn-playbook A complete guide and toolkit for automating login to Cisco AnyConnect / Cisco Secure Client VPNs that use TOTP-based two-factor authentication, plus a Dockerized OpenConnect setup for split-tunnel / proxy-chain use. Tags: HKU, Cisco AnyConnect, Cisco Secure Client, OpenConnect, 2FA, TOTP, VPN Guide Overview Most institutional VPNs built on Cisco AnyConnect / Cisco Secure Client (this repo was written against HKU’s vpn2fa.hku.hk, but the approach generalizes to any similarly-configured gateway) require two factors to log in: ...

August 7, 2026 · 7 min · Vinkey

Conda Environment Settings

This article was written with the assistance of GitHub Copilot Anaconda or Miniconda? Conda is a package manager that runs on Linux, Windows and macOS, and it ships Python with it — which is why a single conda create -n new_pyenv python=3.12 is enough to get a clean virtual environment. There are two common distributions: Anaconda is large. The installer already bundles a lot of software and libraries, so you get everything in one shot. Miniconda is small. Whatever library an environment needs gets downloaded on demand. If your network is unreliable, Anaconda saves you the repeated downloads — although in mainland China the network problem is usually better solved by switching to a mirror. On an overseas connection (Hong Kong, in my case) I’d just take Miniconda: it installs fast, and when you inevitably get the paths wrong as a beginner, uninstalling and reinstalling is painless. That is exactly how I figured it out. ...

February 12, 2025 · Updated August 18, 2026 · 4 min · Vinkey