api-turnstile 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -17
- package/package.json +16 -14
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# API Turnstile — CAPTCHA-Free API Bot Protection & Abuse Prevention
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
4
|
<img src="https://sentinel.risksignal.name.ng/sentinel-logo.png" alt="Sentinel Logo" width="120" />
|
|
5
|
-
<h3>
|
|
5
|
+
<h3>Turnstile for API</h3>
|
|
6
6
|
<p>Cloudflare Turnstile protects browsers. <b>Sentinel protects APIs.</b></p>
|
|
7
7
|
<p>
|
|
8
8
|
<a href="https://www.npmjs.com/package/api-turnstile"><img src="https://img.shields.io/npm/v/api-turnstile?color=orange&style=flat-square" alt="NPM Version" /></a>
|
|
@@ -13,25 +13,30 @@
|
|
|
13
13
|
|
|
14
14
|
---
|
|
15
15
|
|
|
16
|
-
**
|
|
16
|
+
> **CAPTCHA-free API bot protection for Node.js and serverless APIs.**
|
|
17
|
+
> **Block bots, scripts, credential stuffing, and automation attacks — without rate limits or CAPTCHAs.**
|
|
18
|
+
> **API Turnstile is a Cloudflare Turnstile alternative built specifically for APIs.**
|
|
17
19
|
|
|
18
|
-
|
|
20
|
+
## What Is API Turnstile?
|
|
19
21
|
|
|
20
|
-
|
|
22
|
+
API Turnstile is an API bot protection and abuse prevention middleware for Node.js, Express, Next.js, Bun, and serverless environments.
|
|
23
|
+
It blocks automated attacks such as credential stuffing, fake account creation, payment fraud, and API scraping — without CAPTCHAs or browser JavaScript.
|
|
21
24
|
|
|
22
|
-
|
|
23
|
-
- **🛡️ Adaptive Defenses**: Automatically escalates cryptographic challenges (BWT) for suspicious IPs.
|
|
24
|
-
- **🔌 Multi-Framework**: First-class support for Node.js (Express/Fastify) and Edge Runtimes (Next.js/Bun).
|
|
25
|
-
- **🕹️ CLI Intelligence**: Stream live traffic decisions directly to your terminal with `sentinel tail`.
|
|
26
|
-
- **🎯 Outcome-Based**: Focuses on business results (e.g., bot reduction, capital saved) rather than just "block counts".
|
|
25
|
+
## Key Features
|
|
27
26
|
|
|
28
|
-
|
|
27
|
+
- **Sub-50ms Latency**: Built on a globally distributed decision engine.
|
|
28
|
+
- **Adaptive Defenses**: Automatically escalates cryptographic challenges (BWT) for suspicious IPs.
|
|
29
|
+
- **Multi-Framework**: First-class support for Node.js (Express/Fastify) and Edge Runtimes (Next.js/Bun).
|
|
30
|
+
- **CLI Intelligence**: Stream live traffic decisions directly to your terminal with `sentinel tail`.
|
|
31
|
+
- **Outcome-Based**: Focuses on business results (e.g., bot reduction, capital saved) rather than just "block counts".
|
|
32
|
+
|
|
33
|
+
## Installation
|
|
29
34
|
|
|
30
35
|
```bash
|
|
31
36
|
npm install api-turnstile
|
|
32
37
|
```
|
|
33
38
|
|
|
34
|
-
##
|
|
39
|
+
## Quick Start
|
|
35
40
|
|
|
36
41
|
### Express / Node.js
|
|
37
42
|
```javascript
|
|
@@ -61,7 +66,7 @@ export default sentinelEdge({
|
|
|
61
66
|
});
|
|
62
67
|
```
|
|
63
68
|
|
|
64
|
-
##
|
|
69
|
+
## Configuration Deep Dive
|
|
65
70
|
|
|
66
71
|
| Option | Type | Default | Description |
|
|
67
72
|
| :--- | :--- | :--- | :--- |
|
|
@@ -77,7 +82,7 @@ export default sentinelEdge({
|
|
|
77
82
|
- **`balanced`**: Blocks obvious bots and high-risk signals.
|
|
78
83
|
- **`strict`**: Enforces zero-tolerance for automation and proxy traffic.
|
|
79
84
|
|
|
80
|
-
##
|
|
85
|
+
## Sentinel CLI
|
|
81
86
|
|
|
82
87
|
The package includes a powerful CLI for real-time forensics and monitoring.
|
|
83
88
|
|
|
@@ -95,7 +100,7 @@ sentinel check 1.2.3.4
|
|
|
95
100
|
sentinel stats
|
|
96
101
|
```
|
|
97
102
|
|
|
98
|
-
##
|
|
103
|
+
## Behavioral Work Tokens (BWT)
|
|
99
104
|
|
|
100
105
|
BWT is Sentinel's secret weapon. When an IP is deemed "unstable" (not yet high-risk enough to block), Sentinel issues a cryptographic challenge.
|
|
101
106
|
|
|
@@ -103,12 +108,12 @@ BWT is Sentinel's secret weapon. When an IP is deemed "unstable" (not yet high-r
|
|
|
103
108
|
2. Bot scripts (Headless Chrome, curl, python-requests) fail to solve the token.
|
|
104
109
|
3. Your server rejects the request before it ever hits your business logic.
|
|
105
110
|
|
|
106
|
-
##
|
|
111
|
+
## Links
|
|
107
112
|
|
|
108
113
|
- **[Dashboard & API Management](https://sentinel.risksignal.name.ng)**
|
|
109
114
|
- **[Documentation](https://sentinel.risksignal.name.ng/docs)**
|
|
110
115
|
- **[GitHub Repository](https://github.com/00xf5/sentinelapinpm)**
|
|
111
116
|
|
|
112
|
-
##
|
|
117
|
+
## License
|
|
113
118
|
|
|
114
119
|
MIT © [Sentinel Security](https://sentinel.risksignal.name.ng)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "api-turnstile",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.6",
|
|
4
|
+
"description": "CAPTCHA-free API bot protection and abuse prevention middleware for Node.js, Express, Next.js, and serverless APIs.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"bin": {
|
|
@@ -14,17 +14,19 @@
|
|
|
14
14
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
15
15
|
},
|
|
16
16
|
"keywords": [
|
|
17
|
-
"api",
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
17
|
+
"api security",
|
|
18
|
+
"api bot protection",
|
|
19
|
+
"api abuse prevention",
|
|
20
|
+
"anti bot",
|
|
21
|
+
"bot protection",
|
|
22
|
+
"captcha free",
|
|
23
|
+
"cloudflare turnstile alternative",
|
|
24
|
+
"credential stuffing",
|
|
25
|
+
"signup fraud",
|
|
26
|
+
"rate limiting alternative",
|
|
27
|
+
"express middleware",
|
|
28
|
+
"nextjs api",
|
|
29
|
+
"serverless security"
|
|
28
30
|
],
|
|
29
31
|
"author": "Sentinel Security",
|
|
30
32
|
"license": "MIT",
|
|
@@ -62,4 +64,4 @@
|
|
|
62
64
|
"engines": {
|
|
63
65
|
"node": ">=18.0.0"
|
|
64
66
|
}
|
|
65
|
-
}
|
|
67
|
+
}
|