- to disable it (as it was before) just enter 'nvram set mwan_diff=0 && nvram commit'
- to eliminate false negatives, increase this value (100 in one try)
- to eliminate false positives, decrease this value (see above)
Changelog:
- corrected Byte/KByte output in status output
- correction to checkRam() logic
- changed swift-run terminology into quick-run
- source the optional adblock.extra if present where default variables could be overwritten
- some corrections/simplifications to the shell status command
- introduced $hold variable to define hold time (defaults to 30 min)
- added sleep 1 to dnsrestart logi to facilitate the logging
- decrease maximum pidfile age from 90 to a more appropriate 30 min
- modify dnsrestart not to use system command "time" (fixes compatibility with MIPS builds)
Thanks @rs232
Changes:
- different approach to calculate execution time and make it hopefully compatible with a reboot
- added missing </b> in status-gui
- some greptimisation
- fixed handling of quoted lines in blacklist custom and whitelist and mapped files
- ignoring leading spaces (if any) from blacklist custom and whitelist and mapped files
- extend the leading spaces pruning to variables populated from NVRAM
- statically map grep and set to the version under /bin to avoid conflict with entware
- introduced "upgrade" function
- introduced "upgrade" silent function (no question asked)
- logw warning message when Custom path = /jffs
- match, log and skip Easylist format as part of the parsefile()
- extend the parsefile analisis to the first 500 unquoted lines
- minor tweak to the alias "domain"
- handle quoted text when this starts from the middle of the line
- shaffles code around for the parsing routing, removing comments first then checking the first 50 lines
- removed leftover <br> from the status-gui
- automatic removal of leftover list/headers from perm storage when not used and 15days+ old
- increase top of the list analysis from 50 to 500 lines on all the elif conditions
- reporting efficiency now uses lines and not bytes, also reports with double decimal e.g.: 0.78% and total line pruned e.g. 1033 lines
- corrected "- gt" typo to "-gt"
- removed the auto-pruning and it came with a "find" issue also it was not compatible with list-of-lists
- increase top of the list analysis from 50 to 500 lines (helps with lists that start with extensive comments)
- renamed "Adblock file" to "Blockfile" in GUI and command line status
- corrected some typos
- exclude blank lines custom/white when fetching content from nvram
- reclassified few messages from debug to info
- CheckRam() "would not fit" messages are now logged as errors
- configuration check for black_custom/whitelist are now excluding any quoted-line/extra-space from the comparison
- Black_custom & Whitelist procedures are run conditionally, e.g. skipped if empty
- automatically prune *.list/*.headers from custom path when they are not enabled and the file date is older than 14 days
Thanks @rs232
- Introduced new test routine
- Aligned the help output from command line to reflect the above
- Allow for URLs to have leading spaces (reduces unwanted errors)
- Added warning icon on the GUI when last run errors is greater than 0
- Tweaked command line colors
- Removed <li> references from the GUI and cleared up HTML warnings
- Split script messages into correct syslog level (debug/info/notification/error)
- Enhanced logging for better troubleshooting
- General optimization/speedup and code enhancement
- Introduced three routines to try to control memory usage and prevent issues: checkList(), checkRam() and safeDnsmasqRestart()
- New status/help command line function
- New reset/clear/snapshot/trace/enable/disable functions
- Handles whitelisted subdomains when its parent domain is blacklisted
- Strict whitelisted domain: no auto child resolution. Domains needs to be defined with a prefix '%' e.g. "%test.example.com"
- Custom-blacklist forced pruning. Domains defined with prepending + will force any defined subdomain to be pruned from the blockfile
- Handles user defined files with Windows/Unix EOL and missing EOL's CR
- New Snapshot and trace function facilitate the debugging
- Enhanced command line operation: 'adblock help' is your friend
- GUI integration
- Maximum filesize user definable from the GUI
- Custom path can be defined to operate the script e.g. on USB leaving RAM headroom for dnsmasq (and much larger domain lists)
- Custom path will also prevent unnecessary downloads if the source list hasn't been updated since the last download
- Quick recover of blocklist after a reboot
- Change in the script logic, when path is defined an attempt to update will result into a check first and the actual update is performed only when needed (e.g. one of the lists was updated or the relevant nvram variables have changed)
- Supports multiple lists format and is able to extract domains from any part of an unquoted line. Easylist format is tolerated but will lead to a number of false positives.
- Allow feeding of custom-blacklist and whitelists from local file (reduce nvram usage). Just define /path/file in the relevant GUI field -
- Adblock is automatically run in debug (a.k.a. trace mode) when loglevel=7 and putput found under /tmp/adblock.debug...
- Imposed hold-time of 30min betwen updates to prevent false calls
- Removed the now-unneccessary other hold-times found in v1
- lists are now populated with --local attribute instead of --address (15% RAM saving)
This version if fully backward compatible with v1 this means the user is not expected to change amy settings to make this working even in case of dirty firmware upgrade.
* A big thank you to @PetervdM for the support and testing
- avoid problems while starting/stopping in the GUI (and also in other cases)
- use chain_in_accept as ACCEPT string (for log, if enabled)
- remove FW rules if start of transmission daemon failed
- some other fixes
- avoid using nslookup if targets are already defined as IP
- WAN DNS servers manually defined are excluded from the IPLIST
- use one Target at the time, stop at the first successful test e.g. don't run them all
- optimised all the watchdog parameters (traceroute/ping/curl) to be quicker
- add control to force DHCP refresh for DHCP interfaces with no IP and not to perform a test if we still don't get an IP
- some minor fixes/changes
Thanks to @rs232
- rc: misc.c: check_wanup(): add checking for content of WAN state file; fix fopen/fclose; sprintf -> snprintf
- others: watchdog: fix hanging at nslookup in some cases
- www: basic-network.asp: add possibility to disable watchdog for given WAN if needed