- Python 97.5%
- Shell 2.5%
| Scripts | ||
| .gitignore | ||
| install.sh | ||
| LICENSE | ||
| main.py | ||
| README.md | ||
| run.sh | ||
| settings.json | ||
| webpages.txt | ||
WANDoctor
"I'll doctor your WAN if you say another word."
Python script to simplify internet and/or router stability testing. The primary purpose is to simulate human usage of the internet, along with connecting, disconnecting, browsing and doing nothing.
This tool is an old Linux tool, but will be updated if someone decides to use it.
Quick start
This program uses Python3, WebKit2 and NetworkManager. The dependencies are automatically installed using the install.sh bash script.
install.sh also creates a default run.sh file.
Settings are the first argument to the run.sh script. Automatically, it's settings.json, but if you want to run your own, run main.py with the setting path as the first argument.
Webpages to browse are located in webpages.txt. They contain the protocol (http:// or https://) and are separated by a newline.
Functionality
Settings
Settings are located in the settings.json file by default, but you can modify the path in the run.sh script.
If the settings file does not exist, default settings from ./Scripts/default_settings.json are used instead.
The JSON file is loaded on the start of the program only, so if you wish to modify it, stop the program and then start it again.
If a numeric setting in the settings is an object with 'min' and 'max', the resulting number will be randomly selected from this range
Browsing
The script selects one of the scenarios from the settings and begins simulating browsing according to it.
After all browsers are opened with their respective delays, the duration period begins.
After the duration expires, all the browsers are closed. After closing, a new scenario is selected.
This repeats every loop, unless the doctor is in Idle Mode or Disconnected.
Connecting / Disconnecting
After the specified amount of scenarios happening, WANDoctor disconnects you from the primary internet connection, stopping all further browsing activities. When the delay passes, the connection is reestablished and browsing resumes.
These disconnections and reconnections do not happen during Idle Mode. SSID is automatically taken at the start of the program
Idle Mode
When the time specified in the schedule is reached, Idle Mode is started and browsing is immediately halted. In this time, no browsing and disconnections happen.
Diagnostic Report
Reporting triggers on every single appointed time in the schedule. The report briefly describes the current status of WANDoctor and information regarding the functionalities specified above.