Airpass – easily overcome WiFi time limits
125 comments
·June 18, 2025classichasclass
paxys
200 bytes for the business logic.
47MB for the UI & boilerplate around the business logic.
I get that this may be the easiest way to develop and publish an application today, but it's sad that this is the direction we have taken in recent years.
aeonik
Modern app bloat in one analogy:
Business logic size: ~20 bytes Total app size: ~47 MB = 47,000,000 bytes
Bloat factor: 47,000,000 / 20 = 2,350,000
Let’s scale this up and say the business logic is 1 pound.
Then the whole app would weigh: 1 lb × 2,350,000 = 2,350,000 pounds
What weighs ~2.35 million pounds?
- A fully loaded Boeing 747-8: ~987,000 lbs
- Another fully loaded 747-8: ~987,000 lbs
- A blue whale: ~330,000 lbs
TOTAL: ~2,304,000 lbsThe business logic is like shipping a 1 lb object (a book, a flash drive, whatever) by loading it into two fully loaded 747s and strapping a blue whale on top.
Just to run 20 bytes of logic.
anon7000
Well, if you COULD ship something across the world on a private 747 with extra features to protect your cargo, and it has nearly no environmental downside and has no meaningful downside vs a smaller airplane… you’d probably do it! There’s no incentive in software to get a smaller, more efficient plane, and plenty of incentive to use the big thing for free that has all the extra features
WD-42
This is a cool visualization, thanks.
jofla_net
says more about sociology, really.
paxcoder
While I appreciate criticizing bloat (why are we packing Chromium in every app again?), I would like to warn against watching every "pound". Images, for example, "weigh" a lot more than code but that doesn't mean they don't serve a purpose and add value.
That being said, the fact that quick maths can give you a 6 orders of magnitude difference between functional code and the package is probably reason for concern.
dbalatero
To be fair, the author didn't make this to impress people with byte optimizations, they probably just wanted to publish an app quickly that is useful, and was familiar enough with Electron or JS to do so.
ryandrake
I so strongly wish more developers gave even a single shit about this. The current state of desktop app development is truly an embarrassment.
righthand
It’s not the easiest way just the most evangelized. A Qt app even would be a few lines of code, but we’ve done a good job scaring people that learning other languages is bad because we can’t ship features fast enough with non-evangelized frameworks.
lxgr
Wow, they optimized the minimal Electron app down to 47 MB?
mistercow
I keep thinking that this could be solved by just building Electron into the OS as a shared framework so we don't have to have a separate copy for every app, but the more I dig into it, the more I realize I'm just reinventing the web browser.
thisislife2
There is something called the "WebView" in all the major platforms. The idea is that it allows you to use the browser engine only for creating the UI. But people complain its not "enough" because it is not the same on all the platform (it is if you use it just for UI), restricts access to some browser APIs (ignoring the fact that the OS often offers the same, even and more APIs) and Javascript (a crappy language for creating software applications).
paxys
You are describing PWAs, but they'll never have the same API access & permissions as a native app.
unixhero
Yes but you need a space station OS (Unix) to enjoy the terseness of 47-200 bytes of business logic.
ps: I love both space stations and Unix
rafram
Why does a Mac-only app that shows a menu bar icon and a notification popup need to be Electron…? That’s 30 lines of Swift, max.
SR2Z
If you want a frontend for you app, you probably just use Electron and get it over with in a few minutes instead of digging through the docs for Qt or some other framework.
Is it worth it? Probably not, since this is a single-platform app to start with, but JS+HTML are easy to theme and customize, and Qt is... not quite as simple.
rafram
Where did you get Qt from? This is, again, a Mac-only app that doesn’t even have any windows. It’s just a menu bar icon and a notification. That’s incredibly simple to build with plain old Cocoa and Swift.
righthand
No one has to dig through electron docs though right? There is nothing simple about an electron app regardless how little logic you personally programmed on top of it.
juancroldan
Now that you can build such an app with AI in under 20 minutes with a manageable codebase you can properly understand and control, I don't think that's a good excuse anymore
gopher_space
Is ActionScript still a thing on Macs? I feel like that tech was almost criminally overlooked while being the backbone for a lot of processing pipelines back in the day.
mattl
You mean AppleScript?
WJW
Talk is cheap. If it's so easy, I'm sure the author would welcome a PR :)
CamperBob2
I mean, these days, you ask an LLM and it spits out code that will, for something this simple, probably work the first time.
outofpaper
People forget to think about Swift let alone tools like Platypus.
thisislife2
It doesn't need to be - on macOS, it could even just as well have been a simple Xbar Plug-In! ( https://xbarapp.com/ ).
rafram
Or Alfred script, Raycast plugin, Shortcuts shortcut, shell alias, and the list goes on. There are a lot of decent options; "50+ MB Electron app" is, in my opinion, not one.
jeroenhd
If you don't know Swift, but do know Electron, it's easier to do it in 30 lines of Javascript.
People who don't like the developers work can always write and publish their own application, of course.
whatevaa
It's hard work writing free stuff for others, much easier to criticise stuff instead of getting your hands dirty.
ajsnigrutin
1) the dev only had a hammer and he nailed the screw in
2) the dev has 64gigs of ram and a newest CPU and doesn't care about performance issues for people on older computers... that's why you need gigs of ram just to read a weather report online.
tommoor
Nice, added it as a bash alias.
alias randommac='sudo /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport en0 -z && sudo ifconfig en0 ether $(openssl rand -hex 6 | sed "s/../&:/g; s/:$//")'
commandersaki
So I tried this out on macOS 26 and the `airport` command is no longer there.
There is a `airportd.sb` file, which appears to be some permissions based thing in s-expression/LISP. Weird.
Edit: Spun up a macOS 15 VM and I got this:
WARNING: The airport command line tool is deprecated and will be removed in a future release. For diagnosing Wi-Fi related issues, use the Wireless Diagnostics app or wdutil command line tool.
I guess they weren't kidding.
bc569a80a344f9c
Looking around briefly, you can replace it with this:
`networksetup -setairportpower en0 on && [... set MAC ...] && networksetup -setairportpower en0 off`
I think it's pretty safe to assume that modern Macs will always have en0 as the WiFi adapter, but if you wanted, you could use `networksetup -listnetworkserviceorder` to find the associated device.
msdrigg
Airport has been deprecated for a year or two. Here's an article talking about its deprecation and its relatively nonfunctional replacement: wdutil https://www.intuitibits.com/2024/03/14/goodbye-airport/
Alifatisk
I feel like using Electron for such a little thing is way overkill. The newer laptops are very powerful so I don't think anyone would have any performance issues, but on older macbooks, having too many little Electron apps running in the background makes the fan go brrrrrrrr
101008
Wow. Don't you need to pay a Apple license as well to distribute apps in Macs?
virtualritz
And you could ask an LLM to whip up the Swift code or whatever to wrap this line into a Dock app etc., if you want that convenience.
hk1337
What exactly is that doing? Is there some backend limitation for WiFi interfaces that making it think it’s Ethernet is faster?
cozzyd
the hilarious thing is it shells out for the random mac...
ammar2
Glad this feature is built into most modern operating systems these days.
For MacOS (Sequoia+) you can just forget the network and reconnect to get a new MAC address [1].
Android's documentation for if it decides to generate a new address per connection is a little vague [2], but I'm guessing forgetting and reconnecting works as well, you may also need to flip the "Wi-Fi non-persistent MAC randomization" bit in developer settings.
On Windows, flipping the "Random hardware address" switch seems to cause it to generate a new seed/address for me.
[1] https://support.apple.com/en-euro/102509
[2] https://source.android.com/docs/core/connect/wifi-mac-random...
lxgr
Per [1], this only works once per 24 hours on new iOS/macOS versions, and only once per two weeks on older ones though.
km3r
Yeah I had to flip the developer setting toggle, but worked flawlessly for my flight (American Airlines has a watch an ad for 20 minutes of free internet that only works once per MAC)
fendale
Are you saying that on IOS 18 if you enable developer mode then each time you forgot the network it gets a new Mac? But without developer mode it does not get a new Mac each time you forget it? The Apple docs linked elsewhere in this thread suggest it only gets a new Mac once per 24 hours when you forget the network normally. I’m going on a long boat trip in the next week where this trick might work for me if so!
bapak
I think the rotating address is limited to 3, right? The script here generates one at random.
vachina
I used to strap 20 virtual eths to my Linux box because my dorm gave only like 512kbps per account, and then aggregated the 20 interfaces.
xrisk
How was the auth done? And for that matter what logic did the traffic shaping use?
purplehat_
Here's an equivalent little script for Debian Linux (but should work on most distros), based on classhasclass's comment:
NEW_MAC=$(printf '02:%02x:%02x:%02x:%02x:%02x\n' $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256)) $((RANDOM%256)))
sudo ip link set wlan0 down
sudo ip link set wlan0 address "$NEW_MAC"
sudo ip link set wlan0 up
You should replace `wlan0` with whatever you see in `ip link show` for your wireless interface, for me it is `wlp0s20f3`. I replaced the `openssl rand` command because it was generating some invalid MACs; this is hopefully only valid ones.righthand
KDE Plasma has a “Random” button next to the MAC address field in the Network Manager UI. I’m on Debian Testing so not sure when it was added.
lrvick
Solved problem on linux for decades:
mannyv
If you really want to screw with these set your MAC address to 00:00:00:00:00:00
It’s an illegal address, but most equipment will take it because test devices occasionally come from the factory with that MAC. But higher level stuff might barf on it because it’s technically illegal.
kazinator
This has been an option in Android network settings forever: randomize your MAC. I think it's enabled by default now? It's a basic privacy feature; you can be fingerprinted by your device's MAC.
jck
Yep. Android does this by default, but each ssid gets a randomized MAC which persists. It is still straightforward to trigger a MAC change manually tho. It is useful for privacy but imo useless for the public wifi limits use case since they almost always require an OTP via SMS to log in.
rahimnathwani
For devices running Android 11 or higher, users can enable non-persistent MAC randomization globally for all Wi-Fi networks (that have MAC randomization enabled) through the developer options screen. The option to enable non-persistent MAC randomization for all profiles is found at Settings > Developer Options > Wi-Fi non-persistent MAC randomization.
matsemann
Could you describe how? Quick searching doesn't show it to be "straightforward" as far as I can find.
hhh
you have both options in ios/macos, fixed random mac per ssid, and rotating
alt227
How does that work with MAC address conflicts and clashes? I naively thought every MAC address had to be unique.
diggan
There are like 50 trillion possible addresses, unlikely to clash in one network :)
NoahZuniga
No, this setting randomizes your MAC address between networks, but you keep the same MAC for a specific network. So if you want the network to think you're a new user, you'll need to change this specific network MAC address, and this isn't a setting enabled by default (and oftentimes is not even a setting)
khimaros
GrapheneOS has per-connection (as an alternative to per-network) randomization which is enabled by default
rahimnathwani
Android 11 or later allows the choice in Developer Options.
netsharc
It's also in the Apple devices, you just have to "forget network" and reconnect for the device to tell the network of its new fake MAC address.
ClawsOnPaws
Since this is only available for mac, couldn't this fairly easily be solved with shortcuts?
o_____________o
Alternatively for Mac,
visiondude
^ seems like the way to go. open source and more features.
netik
The trivial defense against this is time limited passwords for Wifi access. Deny all access until a valid password is entered, only permit that password and MAC address pair for n minutes.
Buy a coffee, get a new password, etc.
pimlottc
On a technical level it’s trivial, but you’re taking about having a shop replace their wifi router and/or update firmware, create some way for staff to see the current password and/or integrate with POS systems to print it on the receipt, update signage, etc. Hardly trivial for the average non-techie business owner.
reaperducer
So "trivial" that this is how it was done years ago, but then coffee shops gave up on it because it turned it not to be so trivial after all.
Their employees' time is more effectively spent making coffee than repeatedly providing low-level tech support for random password problems.
balls187
Haven’t ever encountered any place that had a wifi time limit. In the late 2000’s internet cafes had time limits but that was enforced on their own devices.
Is there a specific scenario where time limited wifi is common place?
mcshicks
I think the name refers to the limits some airlines have. JAL for instance offers one hour free on some flights.
glerk
Alternatively, disconnect from the wifi, use this command and reconnect:
sudo ifconfig en0 ether 02:11:22:33:44:55
Just ran into this on icelandair.
pcl
That’ll buy you one new turn of the crank; you’ll need to change numbers once every expiration period.
glerk
Pretty sure the electron app has the same limitation (popover notification says “join the network again for free wifi”, besides you wouldn’t be able to change the mac address if the network interface were actively in use)
Alternatively, if you don't want to run the whole Electron app, the money is this line: