Analysis updated 2026-05-18
Automatically get a static local IP at home for port forwarding while using DHCP everywhere else.
Switch VPN or DNS configuration automatically based on which WiFi network you join.
Keep self-hosted services like Plex or a game server reachable at a fixed home IP.
| tzioup/networklocationmanager.spoon | alerque/silex.sile | allquixotic/esoguildactivityaddon | |
|---|---|---|---|
| Stars | 0 | — | — |
| Language | Lua | Lua | Lua |
| Last pushed | — | 2025-04-17 | 2019-05-28 |
| Maintenance | — | Stale | Dormant |
| Setup difficulty | moderate | moderate | moderate |
| Complexity | 2/5 | 3/5 | 2/5 |
| Audience | developer | developer | general |
Figures from each repo's GitHub metadata at analysis time.
Requires Hammerspoon installed, macOS 14 or newer, and granting Location Services permission for reliable SSID detection.
NetworkLocationManager.spoon is a plugin, called a Spoon, for a Mac automation tool named Hammerspoon. It solves a specific annoyance for people who need a fixed local IP address on their home WiFi network, for example to set up port forwarding or run a self hosted service, but want their Mac to fall back to normal automatic addressing everywhere else. macOS already has a feature called Network Locations for switching between these setups, but switching manually every time you leave or return home is easy to forget. The README explains that every common command line way of reading the current WiFi network name on recent macOS is broken or blocked in some way, so this Spoon instead uses Hammerspoon's own WiFi module, which talks to the operating system's WiFi framework directly and only needs a one time Location Services permission grant. When that permission is not available, it falls back to identifying the network by your router's hardware address instead, though switching takes a few seconds longer that way. Setup involves creating the Network Locations you want inside macOS system settings, for example a Home location with a static IP, and then telling the Spoon which WiFi network names map to which location, either directly in your Hammerspoon configuration file or through a separate JSON file. The Spoon watches for WiFi changes, network reachability changes, and also checks on a timer, then switches locations automatically when it detects a match. A short cooldown period after each switch stops it from repeatedly re-triggering itself. The README lists example use cases such as peer to peer file sharing apps, home media servers, VPN configuration per location, and switching DNS providers depending on where you are. It requires macOS 14 or newer and Hammerspoon installed, and is released under the MIT license.
A Hammerspoon plugin for Mac that automatically switches macOS Network Locations based on which WiFi network you are connected to.
Mainly Lua. The stack also includes Lua, Hammerspoon, macOS.
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.