Compare commits
3 Commits
master
...
71aa54057f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71aa54057f | ||
|
|
a7c78ba1b6 | ||
|
|
4586494580 |
27
.gitea/workflows/release.yml
Normal file
27
.gitea/workflows/release.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
tags:
|
||||
- 'v*.*.*'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
uses: Wavyzz/ci-workflows/.github/workflows/docker-build-publish.yml@v1
|
||||
with:
|
||||
registry_host: ${{ secrets.REGISTRY_HOST }}
|
||||
images: |
|
||||
[
|
||||
{
|
||||
"name": "cf-bypass-fast",
|
||||
"cache_ref": "cf-bypass-fast:buildcache",
|
||||
"dockerfile": "./Dockerfile"
|
||||
},
|
||||
]
|
||||
secrets:
|
||||
registry_user: ${{ secrets.REGISTRY_USER }}
|
||||
registry_password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
ci_token: ${{ secrets.CI_GITEA_TOKEN }}
|
||||
|
||||
@@ -75,12 +75,14 @@ Bypass Cloudflare protection and get cookies/tokens.
|
||||
{
|
||||
"mode": "iuam",
|
||||
"domain": "https://olamovies.watch/generate",
|
||||
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
|
||||
}
|
||||
```
|
||||
|
||||
#### Parameters
|
||||
- **`mode`** (required): `"iuam"` or `"turnstile"`
|
||||
- **`domain`** (required): Target website URL
|
||||
- **`user_agent`** (optional): User-Agent to use for the browser session
|
||||
- **`proxy`** (optional): Proxy configuration object
|
||||
|
||||
#### Response (Success)
|
||||
|
||||
8
index.js
8
index.js
@@ -97,6 +97,9 @@ app.post('/cloudflare', async (req, res) => {
|
||||
if (!data || typeof data.mode !== 'string') {
|
||||
return res.status(400).json({ message: 'Bad Request: missing or invalid mode' })
|
||||
}
|
||||
if (data.user_agent && typeof data.user_agent !== 'string') {
|
||||
return res.status(400).json({ message: 'Bad Request: invalid user_agent' })
|
||||
}
|
||||
if (authToken && data.authToken !== authToken) {
|
||||
return res.status(401).json({ message: 'Unauthorized' })
|
||||
}
|
||||
@@ -126,6 +129,9 @@ app.post('/cloudflare', async (req, res) => {
|
||||
page = ctx.page
|
||||
|
||||
await page.goto('about:blank')
|
||||
if (data.user_agent) {
|
||||
await page.setUserAgent(data.user_agent)
|
||||
}
|
||||
|
||||
switch (data.mode) {
|
||||
case "turnstile":
|
||||
@@ -167,4 +173,4 @@ app.use((req, res) => {
|
||||
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
module.exports = app
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user