n8n-nodes-tls-request 1.2.2 → 2.0.0
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.
|
@@ -1,11 +1,84 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.TlsRequest = void 0;
|
|
4
7
|
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
const axios_1 = __importDefault(require("axios"));
|
|
9
|
+
const https_proxy_agent_1 = require("https-proxy-agent");
|
|
10
|
+
const browserSignatures = {
|
|
11
|
+
chrome_120: {
|
|
12
|
+
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
|
|
13
|
+
headers: {
|
|
14
|
+
'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8',
|
|
15
|
+
'accept-language': 'en-US,en;q=0.9',
|
|
16
|
+
'accept-encoding': 'gzip, deflate, br',
|
|
17
|
+
'sec-ch-ua': '"Not_A_Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"',
|
|
18
|
+
'sec-ch-ua-mobile': '?0',
|
|
19
|
+
'sec-ch-ua-platform': '"Windows"',
|
|
20
|
+
'upgrade-insecure-requests': '1',
|
|
21
|
+
'sec-fetch-dest': 'document',
|
|
22
|
+
'sec-fetch-mode': 'navigate',
|
|
23
|
+
'sec-fetch-site': 'none',
|
|
24
|
+
'sec-fetch-user': '?1',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
chrome_117: {
|
|
28
|
+
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36',
|
|
29
|
+
headers: {
|
|
30
|
+
'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8',
|
|
31
|
+
'accept-language': 'en-US,en;q=0.9',
|
|
32
|
+
'accept-encoding': 'gzip, deflate, br',
|
|
33
|
+
'sec-ch-ua': '"Google Chrome";v="117", "Not;A=Brand";v="8", "Chromium";v="117"',
|
|
34
|
+
'sec-ch-ua-mobile': '?0',
|
|
35
|
+
'sec-ch-ua-platform': '"Windows"',
|
|
36
|
+
'upgrade-insecure-requests': '1',
|
|
37
|
+
'sec-fetch-dest': 'document',
|
|
38
|
+
'sec-fetch-mode': 'navigate',
|
|
39
|
+
'sec-fetch-site': 'none',
|
|
40
|
+
'sec-fetch-user': '?1',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
firefox_117: {
|
|
44
|
+
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/117.0',
|
|
45
|
+
headers: {
|
|
46
|
+
'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8',
|
|
47
|
+
'accept-language': 'en-US,en;q=0.5',
|
|
48
|
+
'accept-encoding': 'gzip, deflate, br',
|
|
49
|
+
'upgrade-insecure-requests': '1',
|
|
50
|
+
'sec-fetch-dest': 'document',
|
|
51
|
+
'sec-fetch-mode': 'navigate',
|
|
52
|
+
'sec-fetch-site': 'none',
|
|
53
|
+
'sec-fetch-user': '?1',
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
firefox_102: {
|
|
57
|
+
userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0',
|
|
58
|
+
headers: {
|
|
59
|
+
'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
|
|
60
|
+
'accept-language': 'en-US,en;q=0.5',
|
|
61
|
+
'accept-encoding': 'gzip, deflate, br',
|
|
62
|
+
'upgrade-insecure-requests': '1',
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
safari_16_0: {
|
|
66
|
+
userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15',
|
|
67
|
+
headers: {
|
|
68
|
+
'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
|
|
69
|
+
'accept-language': 'en-US,en;q=0.9',
|
|
70
|
+
'accept-encoding': 'gzip, deflate, br',
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
safari_ios_16_0: {
|
|
74
|
+
userAgent: 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Mobile/15E148 Safari/604.1',
|
|
75
|
+
headers: {
|
|
76
|
+
'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
|
|
77
|
+
'accept-language': 'en-US,en;q=0.9',
|
|
78
|
+
'accept-encoding': 'gzip, deflate, br',
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
};
|
|
9
82
|
class TlsRequest {
|
|
10
83
|
constructor() {
|
|
11
84
|
this.description = {
|
|
@@ -14,7 +87,7 @@ class TlsRequest {
|
|
|
14
87
|
icon: 'fa:globe',
|
|
15
88
|
group: ['transform'],
|
|
16
89
|
version: 1,
|
|
17
|
-
description: 'Make HTTP requests with browser
|
|
90
|
+
description: 'Make HTTP requests with browser-like headers',
|
|
18
91
|
defaults: {
|
|
19
92
|
name: 'TLS Request',
|
|
20
93
|
},
|
|
@@ -45,24 +118,19 @@ class TlsRequest {
|
|
|
45
118
|
default: 'GET',
|
|
46
119
|
},
|
|
47
120
|
{
|
|
48
|
-
displayName: 'Browser
|
|
121
|
+
displayName: 'Browser Fingerprint',
|
|
49
122
|
name: 'browserId',
|
|
50
123
|
type: 'options',
|
|
51
124
|
options: [
|
|
52
125
|
{ name: 'Chrome 117', value: 'chrome_117' },
|
|
53
|
-
{ name: 'Chrome 118', value: 'chrome_118' },
|
|
54
|
-
{ name: 'Chrome 119', value: 'chrome_119' },
|
|
55
126
|
{ name: 'Chrome 120', value: 'chrome_120' },
|
|
56
127
|
{ name: 'Firefox 102', value: 'firefox_102' },
|
|
57
|
-
{ name: 'Firefox 110', value: 'firefox_110' },
|
|
58
128
|
{ name: 'Firefox 117', value: 'firefox_117' },
|
|
59
|
-
{ name: 'Safari 15.3', value: 'safari_15_3' },
|
|
60
|
-
{ name: 'Safari 15.6.1', value: 'safari_15_6_1' },
|
|
61
129
|
{ name: 'Safari 16.0', value: 'safari_16_0' },
|
|
62
|
-
{ name: 'Safari iOS 15.5', value: 'safari_ios_15_5' },
|
|
63
130
|
{ name: 'Safari iOS 16.0', value: 'safari_ios_16_0' },
|
|
64
131
|
],
|
|
65
132
|
default: 'chrome_120',
|
|
133
|
+
description: 'Select a browser fingerprint to use for the request',
|
|
66
134
|
},
|
|
67
135
|
{
|
|
68
136
|
displayName: 'Headers',
|
|
@@ -115,6 +183,18 @@ class TlsRequest {
|
|
|
115
183
|
placeholder: 'Add Option',
|
|
116
184
|
default: {},
|
|
117
185
|
options: [
|
|
186
|
+
{
|
|
187
|
+
displayName: 'Follow Redirects',
|
|
188
|
+
name: 'followRedirects',
|
|
189
|
+
type: 'boolean',
|
|
190
|
+
default: true,
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
displayName: 'Max Redirects',
|
|
194
|
+
name: 'maxRedirects',
|
|
195
|
+
type: 'number',
|
|
196
|
+
default: 10,
|
|
197
|
+
},
|
|
118
198
|
{
|
|
119
199
|
displayName: 'Proxy',
|
|
120
200
|
name: 'proxy',
|
|
@@ -123,10 +203,10 @@ class TlsRequest {
|
|
|
123
203
|
placeholder: 'http://user:pass@host:port',
|
|
124
204
|
},
|
|
125
205
|
{
|
|
126
|
-
displayName: '
|
|
127
|
-
name: '
|
|
206
|
+
displayName: 'Skip Certificate Verification',
|
|
207
|
+
name: 'insecureSkipVerify',
|
|
128
208
|
type: 'boolean',
|
|
129
|
-
default:
|
|
209
|
+
default: false,
|
|
130
210
|
},
|
|
131
211
|
{
|
|
132
212
|
displayName: 'Timeout (Seconds)',
|
|
@@ -134,12 +214,6 @@ class TlsRequest {
|
|
|
134
214
|
type: 'number',
|
|
135
215
|
default: 30,
|
|
136
216
|
},
|
|
137
|
-
{
|
|
138
|
-
displayName: 'Skip Certificate Verification',
|
|
139
|
-
name: 'insecureSkipVerify',
|
|
140
|
-
type: 'boolean',
|
|
141
|
-
default: false,
|
|
142
|
-
},
|
|
143
217
|
],
|
|
144
218
|
},
|
|
145
219
|
],
|
|
@@ -148,24 +222,7 @@ class TlsRequest {
|
|
|
148
222
|
async execute() {
|
|
149
223
|
const items = this.getInputData();
|
|
150
224
|
const returnData = [];
|
|
151
|
-
// Lazy load the library
|
|
152
|
-
if (!Session) {
|
|
153
|
-
// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports
|
|
154
|
-
const tlsClient = require('node-tls-client');
|
|
155
|
-
Session = tlsClient.Session;
|
|
156
|
-
initTLS = tlsClient.initTLS;
|
|
157
|
-
}
|
|
158
|
-
// Initialize TLS once per execution
|
|
159
|
-
try {
|
|
160
|
-
await initTLS();
|
|
161
|
-
}
|
|
162
|
-
catch (error) {
|
|
163
|
-
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
164
|
-
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `TLS init failed: ${errorMessage}`);
|
|
165
|
-
}
|
|
166
225
|
for (let i = 0; i < items.length; i++) {
|
|
167
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
168
|
-
let session;
|
|
169
226
|
try {
|
|
170
227
|
const url = this.getNodeParameter('url', i);
|
|
171
228
|
const method = this.getNodeParameter('method', i);
|
|
@@ -174,12 +231,18 @@ class TlsRequest {
|
|
|
174
231
|
if (!url) {
|
|
175
232
|
throw new n8n_workflow_1.NodeOperationError(this.getNode(), 'URL is required', { itemIndex: i });
|
|
176
233
|
}
|
|
234
|
+
// Get browser signature
|
|
235
|
+
const browserConfig = browserSignatures[browserId] || browserSignatures.chrome_120;
|
|
177
236
|
// Build headers
|
|
178
|
-
const headers = {
|
|
237
|
+
const headers = {
|
|
238
|
+
...browserConfig.headers,
|
|
239
|
+
'user-agent': browserConfig.userAgent,
|
|
240
|
+
};
|
|
241
|
+
// Add custom headers
|
|
179
242
|
const headerItems = this.getNodeParameter('headers.parameter', i, []);
|
|
180
243
|
for (const item of headerItems) {
|
|
181
244
|
if (item.name) {
|
|
182
|
-
headers[item.name] = item.value;
|
|
245
|
+
headers[item.name.toLowerCase()] = item.value;
|
|
183
246
|
}
|
|
184
247
|
}
|
|
185
248
|
// Get body
|
|
@@ -190,74 +253,54 @@ class TlsRequest {
|
|
|
190
253
|
body = undefined;
|
|
191
254
|
}
|
|
192
255
|
}
|
|
193
|
-
//
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
256
|
+
// Build axios config
|
|
257
|
+
const axiosConfig = {
|
|
258
|
+
method: method.toLowerCase(),
|
|
259
|
+
url,
|
|
260
|
+
headers,
|
|
197
261
|
timeout: (options.timeout || 30) * 1000,
|
|
198
|
-
|
|
262
|
+
maxRedirects: options.followRedirects !== false ? (options.maxRedirects || 10) : 0,
|
|
263
|
+
httpsAgent: options.insecureSkipVerify
|
|
264
|
+
? // eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports
|
|
265
|
+
new (require('https').Agent)({ rejectUnauthorized: false })
|
|
266
|
+
: undefined,
|
|
199
267
|
};
|
|
268
|
+
// Handle proxy
|
|
200
269
|
if (options.proxy) {
|
|
201
|
-
|
|
270
|
+
axiosConfig.httpsAgent = new https_proxy_agent_1.HttpsProxyAgent(options.proxy);
|
|
202
271
|
}
|
|
203
|
-
|
|
204
|
-
sessionConfig.insecureSkipVerify = true;
|
|
205
|
-
}
|
|
206
|
-
// Create session and make request
|
|
207
|
-
session = new Session(sessionConfig);
|
|
208
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
209
|
-
const requestOptions = { headers };
|
|
272
|
+
// Handle body
|
|
210
273
|
if (body !== undefined) {
|
|
211
|
-
|
|
212
|
-
}
|
|
213
|
-
// Make request based on method
|
|
214
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
215
|
-
let response;
|
|
216
|
-
switch (method) {
|
|
217
|
-
case 'GET':
|
|
218
|
-
response = await session.get(url, requestOptions);
|
|
219
|
-
break;
|
|
220
|
-
case 'POST':
|
|
221
|
-
response = await session.post(url, requestOptions);
|
|
222
|
-
break;
|
|
223
|
-
case 'PUT':
|
|
224
|
-
response = await session.put(url, requestOptions);
|
|
225
|
-
break;
|
|
226
|
-
case 'PATCH':
|
|
227
|
-
response = await session.patch(url, requestOptions);
|
|
228
|
-
break;
|
|
229
|
-
case 'DELETE':
|
|
230
|
-
response = await session.delete(url, requestOptions);
|
|
231
|
-
break;
|
|
232
|
-
case 'HEAD':
|
|
233
|
-
response = await session.head(url, requestOptions);
|
|
234
|
-
break;
|
|
235
|
-
case 'OPTIONS':
|
|
236
|
-
response = await session.options(url, requestOptions);
|
|
237
|
-
break;
|
|
238
|
-
default:
|
|
239
|
-
throw new n8n_workflow_1.NodeOperationError(this.getNode(), `Unsupported method: ${method}`, { itemIndex: i });
|
|
240
|
-
}
|
|
241
|
-
// Parse response body if JSON
|
|
242
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
243
|
-
let responseData = response.body;
|
|
244
|
-
if (typeof response.body === 'string') {
|
|
245
|
-
try {
|
|
246
|
-
responseData = JSON.parse(response.body);
|
|
247
|
-
}
|
|
248
|
-
catch {
|
|
249
|
-
// Keep as string
|
|
250
|
-
}
|
|
274
|
+
axiosConfig.data = body;
|
|
251
275
|
}
|
|
276
|
+
// Make request
|
|
277
|
+
const response = await (0, axios_1.default)(axiosConfig);
|
|
252
278
|
returnData.push({
|
|
253
279
|
json: {
|
|
254
280
|
status: response.status,
|
|
281
|
+
statusText: response.statusText,
|
|
255
282
|
headers: response.headers,
|
|
256
|
-
|
|
283
|
+
data: response.data,
|
|
257
284
|
},
|
|
258
285
|
});
|
|
259
286
|
}
|
|
260
287
|
catch (error) {
|
|
288
|
+
if (axios_1.default.isAxiosError(error)) {
|
|
289
|
+
const axiosError = error;
|
|
290
|
+
if (axiosError.response) {
|
|
291
|
+
// Server responded with error status
|
|
292
|
+
returnData.push({
|
|
293
|
+
json: {
|
|
294
|
+
status: axiosError.response.status,
|
|
295
|
+
statusText: axiosError.response.statusText,
|
|
296
|
+
headers: axiosError.response.headers,
|
|
297
|
+
data: axiosError.response.data,
|
|
298
|
+
error: true,
|
|
299
|
+
},
|
|
300
|
+
});
|
|
301
|
+
continue;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
261
304
|
if (this.continueOnFail()) {
|
|
262
305
|
const errorMessage = error instanceof Error ? error.message : 'Unknown error';
|
|
263
306
|
returnData.push({
|
|
@@ -267,17 +310,6 @@ class TlsRequest {
|
|
|
267
310
|
}
|
|
268
311
|
throw new n8n_workflow_1.NodeOperationError(this.getNode(), error, { itemIndex: i });
|
|
269
312
|
}
|
|
270
|
-
finally {
|
|
271
|
-
// Always close the session
|
|
272
|
-
if (session && typeof session.close === 'function') {
|
|
273
|
-
try {
|
|
274
|
-
await session.close();
|
|
275
|
-
}
|
|
276
|
-
catch {
|
|
277
|
-
// Ignore close errors
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
313
|
}
|
|
282
314
|
return [returnData];
|
|
283
315
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TlsRequest.node.js","sourceRoot":"","sources":["../../../nodes/TlsRequest/TlsRequest.node.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TlsRequest.node.js","sour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AAC;QAED,OAAO,CAAC,UAAU,CAAC,CAAC;IACxB,CAAC;CACJ;AA5PD,gCA4PC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "n8n-nodes-tls-request",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "n8n node for making HTTP requests with
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "n8n node for making HTTP requests with browser-like headers and signatures (Chrome, Firefox, Safari)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"n8n-community-node-package"
|
|
7
7
|
],
|
|
@@ -30,9 +30,6 @@
|
|
|
30
30
|
"dist/nodes/TlsRequest/TlsRequest.node.js"
|
|
31
31
|
]
|
|
32
32
|
},
|
|
33
|
-
"dependencies": {
|
|
34
|
-
"node-tls-client": "^2.1.0"
|
|
35
|
-
},
|
|
36
33
|
"devDependencies": {
|
|
37
34
|
"@types/node": "^18.0.0",
|
|
38
35
|
"@typescript-eslint/eslint-plugin": "^8.54.0",
|
|
@@ -41,5 +38,9 @@
|
|
|
41
38
|
"eslint-plugin-n8n-nodes-base": "^1.16.6",
|
|
42
39
|
"n8n-workflow": "*",
|
|
43
40
|
"typescript": "^5.0.0"
|
|
41
|
+
},
|
|
42
|
+
"dependencies": {
|
|
43
|
+
"axios": "^1.13.4",
|
|
44
|
+
"https-proxy-agent": "^7.0.6"
|
|
44
45
|
}
|
|
45
46
|
}
|