This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/3proxy | |
system "echo 3proxy up!" | |
# you may use system to execute some external command if proxy starts | |
nserver 9.9.9.9 | |
nserver 149.112.112.112 | |
nscache 65536 | |
timeouts 1 5 30 60 180 1800 15 60 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const _ = require('lodash'); | |
const axios = require('axios'); | |
const qs = require('querystring'); | |
const axiosCookieJarSupport = require('axios-cookiejar-support').default; | |
const tough = require('tough-cookie'); | |
class Router { | |
axios; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** namespace App\Actors **/ | |
const Actor = require('./Actor'); | |
class BotcheckActor extends Actor { | |
platform = 'botcheck'; | |
constructor(env) { | |
const config = require('../../config/actors/botcheck'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { IncomingMessage, RequestListener, ServerResponse } from "http" | |
import { createServer, Server } from "https" | |
import puppeteer, { | |
Browser, | |
BrowserLaunchArgumentOptions, | |
Protocol | |
} from "puppeteer-core" | |
import { Page } from "./types" | |
import Cookie = Protocol.Network.Cookie |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import puppeteer from "puppeteer-extra" | |
import recaptcha from "puppeteer-extra-plugin-recaptcha" | |
/** | |
* Install the Recaptcha Plugin | |
*/ | |
puppeteer.use( | |
recaptcha({ | |
provider: { | |
id: "2captcha", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { createWriteStream, ensureDir } from "fs-extra" | |
import got from "got" | |
import { Stream } from "stream" | |
export type Platform = | |
| "Win_x64" | |
| "Win" | |
| "Mac" | |
| "Mac_Arm" | |
| "Linux_x64" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Buffer } from "buffer" | |
import { createHash } from "crypto" | |
import { HTTPRequest, Protocol } from "puppeteer-core" | |
import { isPuppeteerPage, Page } from "../types" | |
type CaptureSnapshotResponse = Protocol.DOMSnapshot.CaptureSnapshotResponse | |
type RequestHook = (request: HTTPRequest) => Promise<void> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { randomInt } from "node:crypto" | |
import type Puppeteer from "puppeteer-core" | |
/** Recast Puppeteer private properties **/ | |
type Page = Omit<Puppeteer.Page, "_client"> & { | |
readonly _client: Puppeteer.CDPSession | |
} | |
type ElementHandle = Omit<Puppeteer.ElementHandle, "_page"> & { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function containsString(src: string | null | undefined, toFind: string): boolean { | |
return src != null && src.indexOf(toFind) >= 0 | |
} | |
export function normalizePath(eslintPackagePath: string | undefined): string | undefined { | |
if (eslintPackagePath === undefined) return undefined | |
if (eslintPackagePath.charAt(eslintPackagePath.length - 1) !== '/' && | |
eslintPackagePath.charAt(eslintPackagePath.length - 1) !== '\\') { | |
eslintPackagePath = eslintPackagePath + '/'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Types **/ | |
type JobId = string | |
type JobHandler<T> = () => Promise<T> | |
interface Job<T = any> { | |
id: JobId | |
handle: JobHandler<T> | |
locked: boolean | |
result?: any | |
} |
OlderNewer