[WordPress] 外掛分享: CountryLock

首頁外掛目錄 › CountryLock
30+
安裝啟用
★★★★★
5/5 分(1 則評價)
146 天前
最後更新
問題解決
WordPress 5.0+ v1.0.8 上架:2025-11-09

內容簡介

總結:CountryLock 提供了一個簡單輕量的方式,讓您可以允許或封鎖來自各個國家的訪問者進入您的 WordPress 站點,設計為“設定後忘記”,無附加銷售,廣告或複雜配置。

1. 什麼是 CountryLock?
- CountryLock 提供了一個簡單的工具,允許或阻止來自各國的訪問者進入您的 WordPress 站點。

2. CountryLock 的主要功能有哪些?
- 主要切換:使用一個點擊啟用或禁用防火牆。
- 允許的國家清單:指定允許的兩個字母國家代碼(例如,US,CA),其他人會被阻止。
- 管理員繞過:已登錄的管理員可以繞過阻止(可切換)。
- IP 白名單:一個簡單的IP或CIDR範圍列表(例如 123.45.67.89 或 10.0.0.0/8),這些設備始終被允許。
- 阻止日誌:查看正在被阻止的國家和IP(可切換)。
- 零查找檢測:自動使用 Cloudflare(HTTP_CF_IPCOUNTRY)和其他常見的服務器級 GEO 標頭,立即做出零性能影響的決定。
- 遠程查找:作為備用,當沒有標頭時,可以查詢外部服務(ipapi.co)。

3. CountryLock 使用哪個外部服務?
- CountryLock 使用一個外部服務作為備用,用於確定訪問者的國家,如果沒有本地 GEO 標頭(如來自 Cloudflare 或服務器級 GeoIP 模組的標頭)。

4. 什麼是 ipapi.co 服務用於?
- ipapi.co 服務用於查詢訪問者的IP地址的原產國。

5. 什麼情況下會向 ipapi.co 服務發送數據?
- 如果啟用了“如果未檢測到地理標頭則使用遠程查找”設置並且未檢測到本地的 GeoIP 標頭,則訪問者的IP地址將被發送到該服務。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.8) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「CountryLock」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

CountryLock provides a simple, lightweight way to allow or block countries from accessing your WordPress site.
It’s designed to be “set it and forget it” with no upsells, ads, or complex configurations.
✨ Key Features

Master Toggle: Enable or disable the firewall with a single click.
Allowed Countries List: Specify which two-letter country codes (e.g., US, CA) are allowed. Everyone else is blocked.
Admin Bypass: Logged-in administrators can always bypass the block (toggleable).
IP Allowlist: A simple list of IPs or CIDR ranges (like 123.45.67.89 or 10.0.0.0/8) that are always allowed.
Block Logging: See which countries and IPs are being blocked (toggleable).
Zero-Lookup Detection: Automatically uses Cloudflare (HTTP_CF_IPCOUNTRY) and other common server-level GEO headers for instant decisions with zero performance impact.
Remote Lookup: As a fallback, it can query an external service (ipapi.co) if no headers are found.

External Services
This plugin uses one external service as a fallback to determine a visitor’s country if no local GEO headers (like those from Cloudflare or a server-level GeoIP module) are present.

Service: ipapi.co
What it’s used for: To look up the country of origin for a visitor’s IP address.
Data Sent: The visitor’s IP address is sent to the service. This happens only if the “Use remote lookup if no geo headers” setting is enabled AND no local GeoIP headers are detected.
Service Policies:

Terms of Service
Privacy Policy

延伸相關外掛

文章
Filter
Apply Filters
Mastodon