=== Botward - Smart Bot Protection and Early Traffic Filter ===
Contributors: dasweb22
Tags: bot protection, spam, captcha, firewall, security
Requires at least: 5.9
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 1.7.5
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Smart bot protection for WordPress: silent browser check, math challenge, early traffic filter, rate limits and an under-attack mode.

== Description ==

Botward keeps bots away from your site without annoying real visitors.

* **Silent browser check** in Smart mode: ordinary visitors see nothing, suspicious ones get a simple math question.
* **Risk scoring**, a hidden honeypot trap and automatic IP blocking.
* **Early traffic filter**: User-Agent deny list, request rate limit and an "Under attack" mode you can switch on by hand.
* **Verified search bots** (Google, Bing, Yandex, Baidu, Apple) and link-preview bots are never challenged.
* **Decision log and blocked list**: why each visitor was challenged or blocked, a 7 day table, CSV and .htaccess exports.
* Works with page caches (WP Rocket, LiteSpeed and others), Cloudflare and reverse proxies.
* No external scripts, no tracking, no cookies for visitors who are not challenged.

= Botward Pro (separate paid plugin) =

Botward Pro is a separate plugin from the author's website. It adds analytics with a live chart, Telegram reports and attack alerts, country rules and an "Under attack" mode that turns on by itself. This free plugin does not contain Pro code, nothing in it is locked or disabled, and it never downloads code. You can ask for a 7 day Pro trial on the "Botward Pro" page (see External services).

Plugin website: https://dasweb.pro/botward/

== External services ==

This plugin works fully without any external service. Two optional features contact a service, only after you act:

1. **Pro trial request** (free plugin, "Botward Pro" page). When you tick the consent box and press "Start the 7 day trial", the plugin sends your email address and your site domain (plus the plugin version) to the license server at https://dasweb.pro/wp-json/botward/v1/ so the author can issue the trial. Nothing is sent before you press the button. Terms: https://dasweb.pro/botward/terms/ Privacy policy: https://dasweb.pro/botward/privacy/
2. **Botward Pro only**: license check (domain, email, key, version, about once a day) with the same server, and optional Telegram notifications. When you enter your own bot token and chat ID, summary and alert texts (site name, counters, time) are sent to the Telegram Bot API at https://api.telegram.org. Telegram terms: https://telegram.org/tos and privacy policy: https://telegram.org/privacy

== Privacy ==

The plugin stores IP addresses, User-Agent strings and visited paths of blocked or suspicious visitors in the site database so you can review and unblock them. Data is kept only on your site. To remove it when the plugin is deleted, enable "Delete all plugin data when the plugin is deleted" in Settings → General.

== Installation ==
1. Plugins → Add New → Upload Plugin → botward.zip → Activate.
2. Botward → Settings → "Add my IP" to the whitelist.
3. Behind Cloudflare or a reverse proxy: choose the matching "IP source".
4. Using page caching? Open Botward → Caching and follow the section for your cache.

== Frequently Asked Questions ==

= Will Botward block Google, Bing and other search engines? =
No. Verified search bots (Google, Bing, Yandex, Baidu, Apple) are never challenged or blocked. They are verified by reverse DNS, so a fake User-Agent does not help. Link preview bots (Facebook, Telegram, WhatsApp and similar) are also let through by default.

= Will my visitors see a CAPTCHA? =
In Smart mode ordinary visitors pass a silent browser check and see nothing. Only suspicious visitors get a short math question. It uses no images and no third-party service.

= Does it work with page caching and Cloudflare? =
Yes. Open Botward → Caching for instructions for WP Rocket (configured automatically), LiteSpeed Cache, nginx and Cloudflare. Behind Cloudflare or a reverse proxy, choose the matching "IP source" in Settings, otherwise all visitors look like one IP address.

= I blocked myself. How do I get back in? =
Rename the plugin folder `botward` through FTP or your hosting file manager, then rename it back and use Botward → Settings → "Add my IP" to whitelist yourself. If only the login page is the problem, add `define( 'BOTWARD_DISABLE_LOGIN', true );` to wp-config.php, and remove it when you are done.

= Does it protect the login page and comments? =
Yes. Failed logins are limited per IP, the login, registration and password reset forms show the check, and comments are accepted only from browsers that passed it. You can also disable XML-RPC in Settings.

= Does it slow my site down? =
Blocked IPs, denied crawlers, rate-limited requests and country rules (Pro) are stopped early, before the theme and most plugins are loaded, so a bot flood puts much less load on your server.

= Does it send any data to external services? =
No. The free plugin works fully without any external service. Only if you press "Start the 7 day trial" on the Botward Pro page, your email and site domain are sent to the author's license server. See "External services" above.

= Does it use cookies? =
Only a technical cookie (`botward_pass`) in the browser of a visitor who has passed the check. Visitors who are never challenged get no cookie.

= Where is the visitor data stored, and what about privacy laws? =
IP addresses, User-Agent strings and visited paths of blocked or suspicious visitors are stored in your site's database only. You are the data controller, so mention this security processing in your own privacy policy. Old records are deleted automatically after the retention period you set in Settings → General.

= What is the difference between Botward and Botward Pro? =
Nothing is locked in the free plugin. Botward Pro is a separate plugin that adds analytics with a live chart, Telegram reports and alerts, country rules and an automatically switched "Under attack" mode. It keeps your settings when you switch between the two.

= Can I translate the plugin? =
Yes. English is the base language, Russian and Turkish are included. See "Translations" below.

= Where can I get help? =
Open a topic in the plugin's support forum on wordpress.org, or read the documentation at https://dasweb.pro/docs/botward/.

== Screenshots ==

1. Overview: protection status, counters, the last 7 days and the decision log.
2. The math challenge a suspicious visitor sees.
3. Settings: protection mode, sensitivity and automatic blocking.
4. Blocked IPs with search, unblock and export.

== Translations ==
English is the base language. Translate with Loco Translate (Loco → Plugins → Botward → New language)
or edit languages/botward.pot. Russian (ru_RU) and Turkish (tr_TR) translations are included.
Texts left empty in Settings use the translatable defaults.

== Changelog ==

= 1.7.5 =
* Fix: output escaping in admin screens.

= 1.7.4 =
* Fix: challenge page assets are now printed through the WordPress enqueue API; translation files are managed by translate.wordpress.org.

= 1.7.3 =
* Fix: code cleanup after automated plugin checks.

= 1.7.2 =
* Fix: compatibility checks (minimum WordPress is now 5.9), cleaner database queries.

= 1.7.1 =
* Improved license protection for Botward Pro.

= 1.7.0 =
* New: free and Pro editions. Pro adds analytics, Telegram notifications, country rules and automatic "Under attack" mode.
* New: 7 day Pro trial from the "Botward Pro" page.

= 1.6.0 =
* Renamed to Botward.

= 1.5.0 =
* New: Telegram notifications (daily summary and attack alerts).

= 1.4.0 =
* New: settings split into tabs, mobile-friendly overview tables.

= 1.3.0 =
* New: analytics tab with live chart and recommendations.

= 1.2.0 =
* New: early blocking, crawler deny list, request rate limit, country rules and "Under attack" mode.

= 1.1.0 =
* New: automatic blocking of suspicious visitors and a decision log.

= 1.0.0 =
* Initial release.
