From 082a4cfffbec1498c5934c95c51cb54eb74d270e Mon Sep 17 00:00:00 2001 From: Kirill Bushmin Date: Wed, 22 Apr 2026 13:21:17 +0300 Subject: [PATCH 1/2] CCL-7649 added alibaba and friendly --- nodes/CapmonsterCloud/captchas/alibaba.ts | 120 +++++++++++++++++++++ nodes/CapmonsterCloud/captchas/friendly.ts | 55 ++++++++++ nodes/CapmonsterCloud/fields.ts | 6 ++ nodes/CapmonsterCloud/taskBuilder.ts | 4 + nodes/CapmonsterCloud/types.ts | 2 + 5 files changed, 187 insertions(+) create mode 100644 nodes/CapmonsterCloud/captchas/alibaba.ts create mode 100644 nodes/CapmonsterCloud/captchas/friendly.ts diff --git a/nodes/CapmonsterCloud/captchas/alibaba.ts b/nodes/CapmonsterCloud/captchas/alibaba.ts new file mode 100644 index 0000000..04d9a5b --- /dev/null +++ b/nodes/CapmonsterCloud/captchas/alibaba.ts @@ -0,0 +1,120 @@ +import { IDataObject, IExecuteFunctions, INodeProperties } from 'n8n-workflow'; +import { userAgent } from '../const'; +import { getProxyFields } from '../proxy'; + +export const alibaba: INodeProperties[] = [ + { + displayName: 'Website URL', + name: 'websiteURL', + type: 'string', + required: true, + displayOptions: { show: { operation: ['alibaba'] } }, + default: '', + description: 'Full URL of the page with the CAPTCHA', + }, + { + displayName: 'Scene ID', + name: 'sceneId', + type: 'string', + required: true, + displayOptions: { show: { operation: ['alibaba'] } }, + default: '', + description: 'CAPTCHA scenario identifier (metadata.sceneId)', + }, + { + displayName: 'Prefix', + name: 'prefix', + type: 'string', + required: true, + displayOptions: { show: { operation: ['alibaba'] } }, + default: '', + description: 'CAPTCHA initialization parameter from captcha subdomain (metadata.prefix)', + }, + { + displayName: 'User ID', + name: 'userId', + type: 'string', + displayOptions: { show: { operation: ['alibaba'] } }, + default: '', + description: 'Optional user or session identifier (metadata.userId)', + }, + { + displayName: 'User User ID', + name: 'userUserId', + type: 'string', + displayOptions: { show: { operation: ['alibaba'] } }, + default: '', + description: 'Optional secondary user identifier (metadata.userUserId)', + }, + { + displayName: 'Verify Type', + name: 'verifyType', + type: 'string', + displayOptions: { show: { operation: ['alibaba'] } }, + default: '', + description: 'Optional captcha verification type/version (metadata.verifyType)', + }, + { + displayName: 'Region', + name: 'region', + type: 'string', + displayOptions: { show: { operation: ['alibaba'] } }, + default: '', + description: 'Optional processing region or data center (metadata.region)', + }, + { + displayName: 'User Certify ID', + name: 'userCertifyId', + type: 'string', + displayOptions: { show: { operation: ['alibaba'] } }, + default: '', + description: 'Optional verification ID for current captcha session (metadata.UserCertifyId)', + }, + { + displayName: 'API Get Lib', + name: 'apiGetLib', + type: 'string', + displayOptions: { show: { operation: ['alibaba'] } }, + default: '', + description: 'Optional captcha JS library URL (metadata.apiGetLib)', + }, + { + displayName: 'User Agent', + name: 'userAgent', + type: 'string', + displayOptions: { show: { operation: ['alibaba'] } }, + default: userAgent, + description: 'Optional Windows browser User-Agent', + }, +]; + +export const buildAlibabaTask = function (this: IExecuteFunctions, i: number): IDataObject { + const optionalMetadataEntries: Array<[string, string]> = [ + ['userId', this.getNodeParameter('userId', i) as string], + ['userUserId', this.getNodeParameter('userUserId', i) as string], + ['verifyType', this.getNodeParameter('verifyType', i) as string], + ['region', this.getNodeParameter('region', i) as string], + ['UserCertifyId', this.getNodeParameter('userCertifyId', i) as string], + ['apiGetLib', this.getNodeParameter('apiGetLib', i) as string], + ]; + + const optionalMetadata = optionalMetadataEntries.reduce((acc, [key, value]) => { + if (value) { + acc[key] = value; + } + return acc; + }, {} as IDataObject); + + return { + type: 'CustomTask', + class: 'alibaba', + websiteURL: this.getNodeParameter('websiteURL', i), + userAgent: this.getNodeParameter('userAgent', i), + metadata: { + sceneId: this.getNodeParameter('sceneId', i), + prefix: this.getNodeParameter('prefix', i), + ...optionalMetadata, + }, + ...getProxyFields.call(this, i), + }; +}; diff --git a/nodes/CapmonsterCloud/captchas/friendly.ts b/nodes/CapmonsterCloud/captchas/friendly.ts new file mode 100644 index 0000000..bcb95b8 --- /dev/null +++ b/nodes/CapmonsterCloud/captchas/friendly.ts @@ -0,0 +1,55 @@ +import { IDataObject, IExecuteFunctions, INodeProperties } from 'n8n-workflow'; +import { userAgent } from '../const'; +import { getProxyFields } from '../proxy'; + +export const friendly: INodeProperties[] = [ + { + displayName: 'Website URL', + name: 'websiteURL', + type: 'string', + required: true, + displayOptions: { show: { operation: ['friendly'] } }, + default: '', + description: 'Full URL of the page with the captcha', + }, + { + displayName: 'Website Key', + name: 'websiteKey', + type: 'string', + required: true, + displayOptions: { show: { operation: ['friendly'] } }, + default: '', + description: 'Friendly Captcha site key', + }, + { + displayName: 'API Get Lib', + name: 'apiGetLib', + type: 'string', + required: true, + displayOptions: { show: { operation: ['friendly'] } }, + default: '', + description: 'JS library URL used by Friendly Captcha (metadata.apiGetLib)', + }, + { + displayName: 'User Agent', + name: 'userAgent', + type: 'string', + displayOptions: { show: { operation: ['friendly'] } }, + default: userAgent, + description: 'Optional Windows browser User-Agent', + }, +]; + +export const buildFriendlyTask = function (this: IExecuteFunctions, i: number): IDataObject { + return { + type: 'CustomTask', + class: 'friendly', + websiteURL: this.getNodeParameter('websiteURL', i), + websiteKey: this.getNodeParameter('websiteKey', i), + userAgent: this.getNodeParameter('userAgent', i), + metadata: { + apiGetLib: this.getNodeParameter('apiGetLib', i), + }, + ...getProxyFields.call(this, i), + }; +}; diff --git a/nodes/CapmonsterCloud/fields.ts b/nodes/CapmonsterCloud/fields.ts index d661858..a9e0258 100644 --- a/nodes/CapmonsterCloud/fields.ts +++ b/nodes/CapmonsterCloud/fields.ts @@ -31,6 +31,8 @@ import { turnstileChallengeCfClearance } from './captchas/turnstileChallengeCfCl import { amazonFullChallenge } from './captchas/amazonFullChallenge'; import { amazonJsApi } from './captchas/amazonJsapi'; import { amazonInvisibleChallenge } from './captchas/amazonInvisibleChallenge'; +import { alibaba } from './captchas/alibaba'; +import { friendly } from './captchas/friendly'; import { TaskType } from './types'; @@ -39,6 +41,7 @@ const options: Array<{ name: string; value: TaskType }> = [ { name: 'Amazon Full Challenge', value: 'amazonFullChallenge' }, { name: 'Amazon Invisible Challenge', value: 'amazonInvisibleChallenge' }, { name: 'Amazon JS API', value: 'amazonJsApi' }, + { name: 'Alibaba', value: 'alibaba' }, { name: 'Basilisk', value: 'basilisk' }, { name: 'Binance', value: 'binance' }, { name: 'Castle', value: 'castle' }, @@ -48,6 +51,7 @@ const options: Array<{ name: string; value: TaskType }> = [ { name: 'Cloudflare Waiting Room', value: 'turnstileWaitRoom' }, { name: 'Complex Image Recognition', value: 'complexImageRecognition' }, { name: 'DataDome', value: 'datadome' }, + { name: 'Friendly Captcha', value: 'friendly' }, { name: 'FunCaptcha', value: 'funcaptcha' }, { name: 'Gee Test V3', value: 'geeTestV3' }, { name: 'Gee Test V4', value: 'geeTestV4' }, @@ -92,6 +96,7 @@ export const allFields: INodeProperties[] = [ ...turnstileWaitRoom, ...complexImageRecognition, ...datadome, + ...friendly, ...basilisk, ...tendi, ...binance, @@ -99,6 +104,7 @@ export const allFields: INodeProperties[] = [ ...amazonJsApi, ...amazonInvisibleChallenge, ...amazonFullChallenge, + ...alibaba, ...prosopo, ...temu, ...yidun, diff --git a/nodes/CapmonsterCloud/taskBuilder.ts b/nodes/CapmonsterCloud/taskBuilder.ts index 3c239f7..202b1f7 100644 --- a/nodes/CapmonsterCloud/taskBuilder.ts +++ b/nodes/CapmonsterCloud/taskBuilder.ts @@ -14,11 +14,13 @@ import { buildTurnstileWaitRoom } from './captchas/turnstileWaitRoom'; import { buildComplexImageRecognition } from './captchas/complexImageRecognition'; import { buildDataDome } from './captchas/datadome'; import { buildImageToText } from './captchas/imageToText'; +import { buildFriendlyTask } from './captchas/friendly'; import { buildBasiliskTask } from './captchas/basilisk'; import { buildTenDITask } from './captchas/tendi'; import { buildAmazonJsApi } from './captchas/amazonJsapi'; import { buildAmazonFullChallenge } from './captchas/amazonFullChallenge'; import { buildAmazonInvisibleChallenge } from './captchas/amazonInvisibleChallenge'; +import { buildAlibabaTask } from './captchas/alibaba'; import { buildBinanceTask } from './captchas/binance'; import { buildImpervaTask } from './captchas/imperva'; import { buildProsopoTask } from './captchas/prosopo'; @@ -50,11 +52,13 @@ export const taskBuilders: Record = { turnstileChallengeCfClearance: buildTurnstileChallengeCfClearance, complexImageRecognition: buildComplexImageRecognition, datadome: buildDataDome, + friendly: buildFriendlyTask, basilisk: buildBasiliskTask, tendi: buildTenDITask, amazonJsApi: buildAmazonJsApi, amazonFullChallenge: buildAmazonFullChallenge, amazonInvisibleChallenge: buildAmazonInvisibleChallenge, + alibaba: buildAlibabaTask, binance: buildBinanceTask, imperva: buildImpervaTask, prosopo: buildProsopoTask, diff --git a/nodes/CapmonsterCloud/types.ts b/nodes/CapmonsterCloud/types.ts index 7e4dc4c..8ee6b9e 100644 --- a/nodes/CapmonsterCloud/types.ts +++ b/nodes/CapmonsterCloud/types.ts @@ -14,11 +14,13 @@ export type TaskType = | 'turnstileWaitRoom' | 'complexImageRecognition' | 'datadome' + | 'friendly' | 'basilisk' | 'tendi' | 'amazonJsApi' | 'amazonFullChallenge' | 'amazonInvisibleChallenge' + | 'alibaba' | 'binance' | 'imperva' | 'prosopo' From 1eb3f8c7068c45f7e20fa57fbf074dc515350117 Mon Sep 17 00:00:00 2001 From: Kirill Bushmin Date: Wed, 22 Apr 2026 13:21:55 +0300 Subject: [PATCH 2/2] Release 0.1.0 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index b5e5858..a4cd50c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "n8n-nodes-capmonstercloud", - "version": "0.0.9", + "version": "0.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "n8n-nodes-capmonstercloud", - "version": "0.0.9", + "version": "0.1.0", "license": "MIT", "devDependencies": { "@n8n/node-cli": "*", diff --git a/package.json b/package.json index de2f218..7c4c980 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@zennolab_com/n8n-nodes-capmonstercloud", - "version": "0.0.9", + "version": "0.1.0", "publishConfig": { "access": "public" },