mirror of
https://github.com/Stone-Red-Code/HotspotAutoLogin.git
synced 2026-11-01 23:05:40 +01:00
Add Auto mode (network auto-detection) and Start with Windows
- Auto mode (Auto button or --auto): picks the profile matching the connected network instead of forcing one profile's SSID. Wi-Fi is matched by SSID; Ethernet profiles by whether their portal is reachable. Unknown networks are left alone. config.json is reloaded each check. - Watches for network changes every 5 seconds while waiting, so switching between Ethernet and Wi-Fi is handled right away. - Auto mode backs off instead of exiting after repeated errors. - Start with Windows checkbox (HKCU Run key, --auto --background). - --background flag to start without the log window. - Resolve the program directory for both script and PyInstaller builds, so startup launches find config.json. - Ignore Hyper-V/WSL vEthernet adapters when detecting Ethernet. - Fix crash when pressing Enter in the profile list. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
bbbb76d577
commit
53bf01733e
@@ -26,6 +26,15 @@ HotspotAutoLogin is a script that designed to automate the login process for Wi-
|
||||
- Any important events or actions taken by the script are logged both in a log file (log.txt) and in the log window that can be accessed via the system tray icon.
|
||||
- The script reads its configuration from a config.json file. This file contains the necessary information, such as your login credentials, the URL of the authentication portal, the SSID (network name) to which you want to connect, and the frequency of network checks in seconds.
|
||||
|
||||
## `Auto Mode & Start with Windows`
|
||||
- **Auto mode:** Click the **Auto** button in the profile selection window (or run with `--auto`). Instead of using a single profile, the program looks at the network you are actually connected to and picks the matching profile automatically:
|
||||
- **Wi-Fi:** the profile whose `ssid` matches the connected Wi-Fi (case-insensitive).
|
||||
- **Ethernet:** profiles without an `ssid` are Ethernet profiles. The one whose login `url` is reachable on the current network is used.
|
||||
- If the connected network doesn't match any profile, nothing is sent and the program just waits for a known network. It never forces a connection to another network in this mode.
|
||||
- `config.json` is re-read on every check, so edits apply without restarting.
|
||||
- **Start with Windows:** Tick **Start with Windows (Auto)** in the profile selection window. The program will then start at sign-in in Auto mode, in the background (tray icon only). Untick it to disable. This uses the current user's `Run` registry key, so no admin rights are needed.
|
||||
- Command line flags: `--auto` (skip profile selection, use Auto mode) and `--background` (don't open the log window at startup). E.g. `run.bat --auto`.
|
||||
|
||||
## `Usage`
|
||||
- Edit the config.json file with your specific information, including your login credentials, the portal URL, the SSID of the network you want to connect to, and the check interval in seconds. [Click to learn how to Configure the config.json](#how-to-configure-the-configjson)
|
||||
- When you run the script, a system tray icon will appear. Right-click on the icon to access options like showing the log or exiting the application.
|
||||
|
||||
Reference in New Issue
Block a user