This is a Windows-only tool for automatic WI-FI switching. Basically, its functionality can be broken down into 3 steps:
- Connect to the WI-FI network specified in the config
- Ping websites with the most uptime (google.com, amazon.com, microsoft.com by default)
- Switch WI-FI to the other one in the config, if it fails to reach the websites
I had a weird infrastructure at work, where the main Windows server connects to a wireless modem by WI-FI and shares that internet by LAN with everyone else.
If currently working modem decides to fail, the only way to recover is to manually switch to other's modem WI-FI.
This tool does that automatically, giving much more uptime across the office, even without my presence.
This app WILL NOT be maintained and improved further. It had served the functionality I needed, and I don't need it anymore. I WILL NOT accept your PR, create a fork instead.
- Install Windows 10 or 11 if still didn't
- Install memory-safe (!) Rust compiler
- Install Microsoft Visual Studio and Windows SDK
- If you have Git, clone this repository, or download it from GitHub, if not
git clone https://github.com/kerdl/wifu
- CD to it
cd wifu
- Run
cargo run --release
First startup will produce the following output:
o The app was initialized and a config file was created here: .\wifu-data\cfg.json
! Now, open the config file and fill in the networks you want to use with this app
? "How to" instructions can be found here: https://github.com/kerdl/wifu
- Now, open the config file located at the path. It should look like this:
{
"ping": {
"domains": {
"list": [
"google.com",
"amazon.com",
"microsoft.com"
],
"mode": "firstIpFromEach"
},
"timeoutMs": 1500,
"intervalMs": 1000,
"maxErrors": 3
},
"interfaces": {
"priority": []
},
"wifi": {
"networks": [],
"scan": {
"timeoutMs": 3000
},
"connect": {
"timeoutMs": 4000
},
"disconnect": {
"timeoutMs": 4000
}
}
}
- Add a couple of networks to the
wifi.networks
list:
"networks": [
{
"ssid": "Home Wifi",
"password": "amogUSSR",
},
{
"ssid": "Unprotected WiFi",
},
{
"ssid": "Unprotected WiFi 2",
"password": null
}
]
The final config would look like this:
{
"ping": {
"domains": {
"list": [
"google.com",
"amazon.com",
"microsoft.com"
],
"mode": "firstIpFromEach"
},
"timeoutMs": 1500,
"intervalMs": 1000,
"maxErrors": 3
},
"interfaces": {
"priority": []
},
"wifi": {
"networks": [
{
"ssid": "Home Wifi",
"password": "amogUSSR",
},
{
"ssid": "Unprotected WiFi",
},
{
"ssid": "Unprotected WiFi 2",
"password": null
}
],
"scan": {
"timeoutMs": 3000
},
"connect": {
"timeoutMs": 4000
},
"disconnect": {
"timeoutMs": 4000
}
}
}
- Run again
cargo run --release
The full config documentation can be found here