@iflow-mcp/roxybrowserlabs-roxybrowser-mcp-server 1.0.9

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.
@@ -0,0 +1,724 @@
1
+ import { request } from '../utils/index.js';
2
+ const channelList = [
3
+ {
4
+ label: 'IPRust.io',
5
+ type: 'checkChannel',
6
+ value: 'http://iprust.io/ip.json',
7
+ },
8
+ {
9
+ label: 'IP-API',
10
+ type: 'checkChannel',
11
+ value: 'http://pro.ip-api.com/json?key=c1ulk9X5j8NKqTV',
12
+ },
13
+ {
14
+ label: 'IP123.in',
15
+ type: 'checkChannel',
16
+ value: 'http://ip123.in/ip.json',
17
+ },
18
+ {
19
+ label: 'IPinfo',
20
+ type: 'checkChannel',
21
+ value: 'http://ipinfo.io',
22
+ },
23
+ ];
24
+ /** 代理列表 */
25
+ export class ProxyList {
26
+ name = 'roxy_list_proxies';
27
+ /**
28
+ * 仅当用户没有指定商店时调用
29
+ */
30
+ description = 'Get list of proxy configurations. If you want to get the list of proxies configurations you\'ve bought, please use `roxy_store_proxies`.';
31
+ inputSchema = {
32
+ type: 'object',
33
+ properties: {
34
+ workspaceId: {
35
+ type: 'number',
36
+ description: 'Workspace ID',
37
+ },
38
+ id: {
39
+ type: 'number',
40
+ description: 'Filter by proxy ID',
41
+ },
42
+ pageIndex: {
43
+ type: 'number',
44
+ description: 'Page index for pagination (default: 1)',
45
+ default: 1,
46
+ },
47
+ pageSize: {
48
+ type: 'number',
49
+ description: 'Number of items per page (default: 15)',
50
+ default: 15,
51
+ },
52
+ },
53
+ required: ['workspaceId'],
54
+ };
55
+ get schema() {
56
+ return {
57
+ name: this.name,
58
+ description: this.description,
59
+ inputSchema: this.inputSchema,
60
+ };
61
+ }
62
+ async handle(params) {
63
+ const searchParams = new URLSearchParams();
64
+ searchParams.append('workspaceId', params.workspaceId);
65
+ if (params.id)
66
+ searchParams.append('id', params.id);
67
+ if (params.page_index)
68
+ searchParams.append('page_index', params.pageIndex);
69
+ if (params.page_size)
70
+ searchParams.append('page_size', params.pageSize);
71
+ if (!params.workspaceId) {
72
+ throw new Error('workspaceId is required');
73
+ }
74
+ const result = await request(`/proxy/list?${searchParams}`);
75
+ let text = '';
76
+ if (result.code === 0) {
77
+ const data = result.data;
78
+ const proxyListText = data.rows.length > 0
79
+ ? data.rows.map((proxy, index) => {
80
+ const statusText = proxy.checkStatus === 1 ? '✅ available' : proxy.checkStatus === 2 ? '❌ unavailable' : '⏳ not checked';
81
+ const name = `proxy (id: ${proxy.id}) ${proxy.remark ? `remark: ${proxy.remark}` : ''}`;
82
+ const location = proxy.lastCountry
83
+ ? `${proxy.lastCity || ''}${proxy.lastCity && proxy.lastCountry ? ', ' : ''}${proxy.lastCountry}`
84
+ : null;
85
+ // 构建简洁的输出
86
+ let baseInfo = `${index + 1}. ${statusText} **${name}**\nprotocol: ${proxy.protocol || 'N/A'}\nipType: ${proxy.ipType || 'N/A'}\nbind profile count: ${proxy.bindCount || 'N/A'}\nDetection channel: ${proxy.checkChannel || 'N/A'}`;
87
+ const ipInfo = [];
88
+ if (proxy.host && proxy.port) {
89
+ ipInfo.push(...[proxy.host, ':', proxy.port]);
90
+ if (proxy.proxyUserName && proxy.proxyPassword) {
91
+ ipInfo.push(...['@', proxy.proxyUserName, ':', proxy.proxyPassword]);
92
+ }
93
+ }
94
+ if (location) {
95
+ baseInfo += `\n${ipInfo.length > 0 ? `${ipInfo.join('')}\n` : ''}\n📍 ${location}`;
96
+ }
97
+ return baseInfo;
98
+ }).join('\n\n')
99
+ : '';
100
+ text = `📋 **proxy list** (total: ${data.total})\n\n${proxyListText}`;
101
+ }
102
+ else {
103
+ text = `❌ **get proxy list failed**\n\n${result.msg}`;
104
+ }
105
+ return { content: [{ type: 'text', text }] };
106
+ }
107
+ }
108
+ /** 代理商店 */
109
+ export class ProxyStore {
110
+ name = 'roxy_store_proxies';
111
+ description = 'Get list of proxy configurations in the Proxy Store';
112
+ inputSchema = {
113
+ type: 'object',
114
+ properties: {
115
+ workspaceId: {
116
+ type: 'number',
117
+ description: 'Workspace ID',
118
+ },
119
+ pageIndex: {
120
+ type: 'number',
121
+ description: 'Page index for pagination (default: 1)',
122
+ default: 1,
123
+ },
124
+ pageSize: {
125
+ type: 'number',
126
+ description: 'Number of items per page (default: 15)',
127
+ default: 15,
128
+ },
129
+ type: {
130
+ type: 'number',
131
+ description: 'Type of proxies to get (0: list_use, 1: available_list)',
132
+ default: 0,
133
+ },
134
+ },
135
+ required: ['workspaceId'],
136
+ };
137
+ get schema() {
138
+ return {
139
+ name: this.name,
140
+ description: this.description,
141
+ inputSchema: this.inputSchema,
142
+ };
143
+ }
144
+ async handle(params) {
145
+ const searchParams = new URLSearchParams();
146
+ searchParams.append('workspaceId', params.workspaceId.toString());
147
+ if (params.page_index)
148
+ searchParams.append('page_index', params.page_index.toString());
149
+ if (params.page_size)
150
+ searchParams.append('page_size', params.page_size.toString());
151
+ if (params.type)
152
+ searchParams.append('type', params.type.toString());
153
+ const result = await request(`/proxy/bought_list?${searchParams}`);
154
+ let text = '';
155
+ if (result.code === 0) {
156
+ const data = result.data;
157
+ const proxyListText = data.rows.length > 0
158
+ ? data.rows.map((proxy, index) => {
159
+ const statusText = proxy.checkStatus === 1 ? '✅ available' : proxy.checkStatus === 2 ? '❌ unavailable' : '⏳ not checked';
160
+ const name = `proxy (id: ${proxy.id}) ${proxy.remark ? `remark: ${proxy.remark}` : ''}`;
161
+ const location = proxy.lastCountry
162
+ ? `${proxy.lastCity || ''}${proxy.lastCity && proxy.lastCountry ? ', ' : ''}${proxy.lastCountry}`
163
+ : null;
164
+ // 构建简洁的输出
165
+ let baseInfo = `${index + 1}. ${statusText} **${name}**\nprotocol: ${proxy.protocol || 'N/A'}\nipType: ${proxy.ipType || 'N/A'}\nbind profile count: ${proxy.bindCount || 'N/A'}\nDetection channel: ${proxy.checkChannel || 'N/A'}\nexpire date: ${proxy.expireDate}`;
166
+ const ipInfo = [proxy.host, ':', proxy.port];
167
+ if (proxy.proxyUserName) {
168
+ ipInfo.push(...[proxy.proxyUserName, '@', proxy.proxyPassword]);
169
+ }
170
+ if (location) {
171
+ baseInfo += `\n${ipInfo.join('')}\n📍 ${location}`;
172
+ }
173
+ return baseInfo;
174
+ }).join('\n\n')
175
+ : '';
176
+ text = `📋 **proxy store** (total: ${data.total})\n\n${proxyListText}`;
177
+ }
178
+ else {
179
+ text = `❌ **get proxy store failed**\n\n${result.msg}`;
180
+ }
181
+ return { content: [{ type: 'text', text }] };
182
+ }
183
+ }
184
+ class CreateProxy {
185
+ name = 'roxy_create_proxy';
186
+ description = 'Create a new proxy configuration with automatic IP detection';
187
+ inputSchema = {
188
+ type: 'object',
189
+ properties: {
190
+ workspaceId: {
191
+ type: 'number',
192
+ description: 'Workspace ID',
193
+ },
194
+ protocol: {
195
+ type: 'string',
196
+ enum: ['HTTP', 'HTTPS', 'SOCKS5', 'SSH'],
197
+ description: 'Proxy protocol type',
198
+ },
199
+ host: {
200
+ type: 'string',
201
+ description: 'Proxy host/IP address',
202
+ },
203
+ port: {
204
+ type: 'string',
205
+ description: 'Proxy port',
206
+ },
207
+ proxyUserName: {
208
+ type: 'string',
209
+ description: 'Proxy username',
210
+ },
211
+ proxyPassword: {
212
+ type: 'string',
213
+ description: 'Proxy password',
214
+ },
215
+ ipType: {
216
+ type: 'string',
217
+ enum: ['IPV4', 'IPV6'],
218
+ description: 'IP type (default: IPV4)',
219
+ },
220
+ checkChannel: {
221
+ type: 'string',
222
+ enum: channelList.map(item => item.label),
223
+ description: 'IP detection channel (default: IP123.in)',
224
+ },
225
+ refreshUrl: {
226
+ type: 'string',
227
+ description: 'Refresh URL for dynamic proxies',
228
+ },
229
+ remark: {
230
+ type: 'string',
231
+ description: 'Proxy remark/notes',
232
+ },
233
+ },
234
+ required: ['workspaceId', 'protocol', 'host', 'port'],
235
+ };
236
+ get schema() {
237
+ return {
238
+ name: this.name,
239
+ description: this.description,
240
+ inputSchema: this.inputSchema,
241
+ };
242
+ }
243
+ async handle(params) {
244
+ if (!params.workspaceId || !params.protocol || !params.host || !params.port) {
245
+ return {
246
+ content: [
247
+ {
248
+ type: 'text',
249
+ text: '❌ **Failed to create proxy:**\n\n workspaceId, protocol, host, and port are required',
250
+ },
251
+ ],
252
+ };
253
+ }
254
+ const { workspaceId, ipType = 'IPV4', checkChannel = 'IP123.in', ...proxyData } = params;
255
+ const proxyParams = {
256
+ workspaceId,
257
+ ...proxyData,
258
+ ipType,
259
+ checkChannel: checkChannel ? channelList.find(item => item.label === checkChannel)?.value : null,
260
+ proxyCategory: params.protocol,
261
+ };
262
+ const result = await request('/proxy/create', {
263
+ method: 'POST',
264
+ body: JSON.stringify(proxyParams),
265
+ });
266
+ let text = '';
267
+ if (result.code !== 0) {
268
+ if (result.data) {
269
+ text = `❌ **Failed to create proxy:**\n\n error message: ${result.msg}\n\n${result.data.map((item) => ` - index: ${item.index}, error message: ${item.msg.join(', ')}`).join('\n')}`;
270
+ }
271
+ else {
272
+ text = `❌ **Failed to create proxy:**\n\n error message: ${result.msg}`;
273
+ }
274
+ }
275
+ else {
276
+ text = `✅ **Proxy Created Successfully**
277
+
278
+ **Protocol:** ${params.protocol}
279
+ **Host:** ${params.host}:${params.port}${params.proxyUserName
280
+ ? `
281
+ **Username:** ${params.proxyUserName}`
282
+ : ''}${params.remark
283
+ ? `
284
+ **Remark:** ${params.remark}`
285
+ : ''}${params.checkChannel
286
+ ? `
287
+ **Check Channel:** ${params.checkChannel}`
288
+ : ''}
289
+
290
+ *Proxy configuration created. IP detection will be performed automatically.*`;
291
+ }
292
+ return {
293
+ content: [
294
+ {
295
+ type: 'text',
296
+ text,
297
+ },
298
+ ],
299
+ };
300
+ }
301
+ }
302
+ class BatchCreateProxies {
303
+ name = 'roxy_batch_create_proxies';
304
+ description = 'Batch create multiple proxy configurations';
305
+ inputSchema = {
306
+ type: 'object',
307
+ properties: {
308
+ workspaceId: {
309
+ type: 'number',
310
+ description: 'Workspace ID',
311
+ },
312
+ // checkChannel: {
313
+ // type: 'string',
314
+ // enum: channelList.map(item => item.label),
315
+ // description: 'Default IP detection channel for all proxies',
316
+ // },
317
+ proxyList: {
318
+ type: 'array',
319
+ description: 'Array of proxy configurations',
320
+ items: {
321
+ type: 'object',
322
+ properties: {
323
+ protocol: { type: 'string', enum: ['HTTP', 'HTTPS', 'SOCKS5', 'SSH'] },
324
+ host: { type: 'string' },
325
+ port: { type: 'string' },
326
+ proxyUserName: { type: 'string' },
327
+ proxyPassword: { type: 'string' },
328
+ ipType: { type: 'string', enum: ['IPV4', 'IPV6'] },
329
+ checkChannel: { type: 'string', enum: channelList.map(item => item.label) },
330
+ refreshUrl: { type: 'string' },
331
+ remark: { type: 'string' },
332
+ },
333
+ required: ['protocol', 'host', 'port'],
334
+ },
335
+ },
336
+ },
337
+ required: ['workspaceId', 'proxyList'],
338
+ };
339
+ get schema() {
340
+ return {
341
+ name: this.name,
342
+ description: this.description,
343
+ inputSchema: this.inputSchema,
344
+ };
345
+ }
346
+ async handle(params) {
347
+ if (!params.workspaceId || !params.proxyList || params.proxyList.length === 0) {
348
+ return {
349
+ content: [
350
+ {
351
+ type: 'text',
352
+ text: '❌ **Failed to batch create proxies:**\n\n workspaceId and proxyList are required',
353
+ },
354
+ ],
355
+ };
356
+ }
357
+ const { workspaceId, proxyList } = params;
358
+ proxyList.forEach((item) => {
359
+ item.ipType = item.ipType ? item.ipType : 'IPV4';
360
+ item.checkChannel = item.checkChannel ? channelList.find((channel) => channel.label === item.checkChannel)?.value : null;
361
+ });
362
+ const result = await request('/proxy/batch_create', {
363
+ method: 'POST',
364
+ body: JSON.stringify({ workspaceId, proxyList }),
365
+ });
366
+ let text = '';
367
+ if (result.code !== 0) {
368
+ if (result.data) {
369
+ text = `❌ **Failed to batch create proxies:**\n\n error message: ${result.msg}\n\n${result.data.map((item) => ` - index: ${item.index}, error message: ${item.msg.join(', ')}`).join('\n')}`;
370
+ }
371
+ else {
372
+ text = `❌ **Failed to batch create proxies:**\n\n error message: ${result.msg}`;
373
+ }
374
+ }
375
+ else {
376
+ text = `✅ **Batch Proxy Creation Successful**
377
+
378
+ **Count:** ${params.proxyList.length} proxy/proxies
379
+ **Workspace:** ${params.workspaceId}${params.checkChannel
380
+ ? `
381
+ **Default Check Channel:** ${params.checkChannel}`
382
+ : ''}
383
+
384
+ *All proxies have been created. IP detection will be performed automatically.*`;
385
+ }
386
+ return {
387
+ content: [
388
+ {
389
+ type: 'text',
390
+ text,
391
+ },
392
+ ],
393
+ };
394
+ }
395
+ }
396
+ class DetectProxy {
397
+ name = 'roxy_detect_proxy';
398
+ description = 'Detect/test a proxy configuration and update its IP information';
399
+ inputSchema = {
400
+ type: 'object',
401
+ properties: {
402
+ workspaceId: {
403
+ type: 'number',
404
+ description: 'Workspace ID',
405
+ },
406
+ id: {
407
+ type: 'number',
408
+ description: 'Proxy ID to detect',
409
+ },
410
+ },
411
+ required: ['workspaceId', 'id'],
412
+ };
413
+ get schema() {
414
+ return {
415
+ name: this.name,
416
+ description: this.description,
417
+ inputSchema: this.inputSchema,
418
+ };
419
+ }
420
+ async handle(params) {
421
+ if (!params.workspaceId || !params.id) {
422
+ return {
423
+ content: [
424
+ {
425
+ type: 'text',
426
+ text: '❌ **Failed to detect proxy:**\n\n workspaceId and id are required',
427
+ },
428
+ ],
429
+ };
430
+ }
431
+ const { workspaceId, id } = params;
432
+ const result = await request('/proxy/detect', {
433
+ method: 'POST',
434
+ body: JSON.stringify({ workspaceId, id }),
435
+ });
436
+ let text = '';
437
+ if (result.code !== 0) {
438
+ text = `❌ **Failed to detect proxy:**\n\n error message: ${result.msg}`;
439
+ }
440
+ else {
441
+ const data = result.data;
442
+ // checkStatus: 0, // 0 未检测 1 检测成功 2 检测失败
443
+ // lastIp: '',
444
+ // lastCity: '',
445
+ // lastCountry: '',
446
+ // timezone: '',
447
+ if (data) {
448
+ text = `✅ **Proxy Detection ${data.checkStatus === 1 ? 'Success' : data.checkStatus === 2 ? 'Failed' : ''}**
449
+
450
+ **ip address:** ${data.lastIp}
451
+ **country:** ${data.lastCountry}
452
+ **city:** ${data.lastCity}
453
+ **timezone:** ${data.timezone ? data.timezone : 'N/A'}
454
+ `;
455
+ }
456
+ else {
457
+ text = `✅ **Proxy Detection Started**
458
+
459
+ **Proxy ID:** ${params.id}
460
+ **Workspace:** ${params.workspaceId}
461
+
462
+ *Proxy detection is in progress. This may take a few seconds. Use \`roxy_list_proxies\` | \`roxy_store_proxies\` to check the updated status.*
463
+ `;
464
+ }
465
+ }
466
+ return {
467
+ content: [
468
+ {
469
+ type: 'text',
470
+ text,
471
+ },
472
+ ],
473
+ };
474
+ }
475
+ }
476
+ class ModifyProxy {
477
+ name = 'roxy_modify_proxy';
478
+ description = 'Modify/update an existing proxy configuration';
479
+ inputSchema = {
480
+ type: 'object',
481
+ properties: {
482
+ workspaceId: {
483
+ type: 'number',
484
+ description: 'Workspace ID',
485
+ },
486
+ id: {
487
+ type: 'number',
488
+ description: 'Proxy ID to modify',
489
+ },
490
+ protocol: {
491
+ type: 'string',
492
+ enum: ['HTTP', 'HTTPS', 'SOCKS5', 'SSH'],
493
+ description: 'Proxy protocol type',
494
+ },
495
+ host: {
496
+ type: 'string',
497
+ description: 'Proxy host/IP address',
498
+ },
499
+ port: {
500
+ type: 'string',
501
+ description: 'Proxy port',
502
+ },
503
+ proxyUserName: {
504
+ type: 'string',
505
+ description: 'Proxy username',
506
+ },
507
+ proxyPassword: {
508
+ type: 'string',
509
+ description: 'Proxy password',
510
+ },
511
+ ipType: {
512
+ type: 'string',
513
+ enum: ['IPV4', 'IPV6'],
514
+ description: 'IP type',
515
+ },
516
+ checkChannel: {
517
+ type: 'string',
518
+ enum: channelList.map(item => item.label),
519
+ description: 'IP detection channel',
520
+ },
521
+ refreshUrl: {
522
+ type: 'string',
523
+ description: 'Refresh URL for dynamic proxies',
524
+ },
525
+ remark: {
526
+ type: 'string',
527
+ description: 'Proxy remark/notes',
528
+ },
529
+ },
530
+ required: ['workspaceId', 'id'],
531
+ };
532
+ get schema() {
533
+ return {
534
+ name: this.name,
535
+ description: this.description,
536
+ inputSchema: this.inputSchema,
537
+ };
538
+ }
539
+ async handle(params) {
540
+ if (!params.workspaceId || !params.id) {
541
+ return {
542
+ content: [
543
+ {
544
+ type: 'text',
545
+ text: '❌ **Failed to modify proxy:**\n\n workspaceId and id are required',
546
+ },
547
+ ],
548
+ };
549
+ }
550
+ const { workspaceId, checkChannel = 'IPRust.io', ...proxyData } = params;
551
+ const proxyParams = {
552
+ workspaceId,
553
+ ...proxyData,
554
+ checkChannel: checkChannel ? channelList.find(item => item.label === checkChannel)?.value : null,
555
+ proxyCategory: params.protocol,
556
+ };
557
+ const result = await request('/proxy/modify', {
558
+ method: 'POST',
559
+ body: JSON.stringify(proxyParams),
560
+ });
561
+ let text = '';
562
+ if (result.code !== 0) {
563
+ text = `❌ **Failed to modify proxy:**\n\n error message: ${result.msg}`;
564
+ }
565
+ else {
566
+ text = `✅ **Proxy Modified Successfully**
567
+
568
+ **Proxy ID:** ${params.id}${params.protocol
569
+ ? `
570
+ **Protocol:** ${params.protocol}`
571
+ : ''}${params.host
572
+ ? `
573
+ **Host:** ${params.host}${params.port ? `:${params.port}` : ''}`
574
+ : ''}${params.remark
575
+ ? `
576
+ **Remark:** ${params.remark}`
577
+ : ''}
578
+
579
+ *Proxy configuration has been updated. Use \`roxy_detect_proxy\` to test the new configuration.*`;
580
+ }
581
+ return {
582
+ content: [
583
+ {
584
+ type: 'text',
585
+ text,
586
+ },
587
+ ],
588
+ };
589
+ }
590
+ }
591
+ class DeleteProxies {
592
+ name = 'roxy_delete_proxies';
593
+ description = 'Delete one or more proxy configurations';
594
+ inputSchema = {
595
+ type: 'object',
596
+ properties: {
597
+ workspaceId: {
598
+ type: 'number',
599
+ description: 'Workspace ID',
600
+ },
601
+ ids: {
602
+ type: 'array',
603
+ items: { type: 'number' },
604
+ description: 'Array of proxy IDs to delete',
605
+ },
606
+ },
607
+ required: ['workspaceId', 'ids'],
608
+ };
609
+ get schema() {
610
+ return {
611
+ name: this.name,
612
+ description: this.description,
613
+ inputSchema: this.inputSchema,
614
+ };
615
+ }
616
+ async handle(params) {
617
+ if (!params.workspaceId || !params.ids || params.ids.length === 0) {
618
+ return {
619
+ content: [
620
+ {
621
+ type: 'text',
622
+ text: '❌ **Failed to delete proxies:**\n\n workspaceId and ids are required',
623
+ },
624
+ ],
625
+ };
626
+ }
627
+ const { workspaceId, ids } = params;
628
+ const result = await request('/proxy/delete', {
629
+ method: 'POST',
630
+ body: JSON.stringify({ workspaceId, ids }),
631
+ });
632
+ let text = '';
633
+ if (result.code !== 0) {
634
+ text = `❌ **Failed to delete proxies:**\n\n error message: ${result.msg}`;
635
+ }
636
+ else {
637
+ text = `✅ **Proxies Deleted Successfully**
638
+
639
+ **Count:** ${params.ids.length} proxy/proxies
640
+ **Workspace:** ${params.workspaceId}
641
+
642
+ **Deleted Proxy IDs:**
643
+ ${params.ids.map((id, index) => ` ${index + 1}. ${id}`).join('\n')}
644
+
645
+ ⚠️ **Warning:** Deleted proxies cannot be recovered.`;
646
+ }
647
+ return {
648
+ content: [
649
+ {
650
+ type: 'text',
651
+ text,
652
+ },
653
+ ],
654
+ };
655
+ }
656
+ }
657
+ // class GetDetectChannels {
658
+ // name = 'roxy_get_detect_channels'
659
+ // description = 'Get available IP detection channels'
660
+ // inputSchema = {
661
+ // type: 'object',
662
+ // properties: {
663
+ // workspaceId: {
664
+ // type: 'number',
665
+ // description: 'Workspace ID',
666
+ // },
667
+ // },
668
+ // required: ['workspaceId'],
669
+ // }
670
+ // get schema() {
671
+ // return {
672
+ // name: this.name,
673
+ // description: this.description,
674
+ // inputSchema: this.inputSchema,
675
+ // }
676
+ // }
677
+ // async handle(params: any) {
678
+ // if (!params.workspaceId) {
679
+ // return {
680
+ // content: [
681
+ // {
682
+ // type: 'text',
683
+ // text: '❌ **Failed to get detect channels:**\n\n workspaceId is required',
684
+ // },
685
+ // ],
686
+ // }
687
+ // }
688
+ // const searchParams = new URLSearchParams()
689
+ // searchParams.append('workspaceId', params.workspaceId.toString())
690
+ // const result = await request(`/proxy/detect_channel?${searchParams}`, {
691
+ // method: 'GET',
692
+ // })
693
+ // const data = result.data
694
+ // let text = ''
695
+ // if (result.code !== 0) {
696
+ // text = `❌ **Failed to get detect channels:**\n\n error message: ${result.msg}`
697
+ // }
698
+ // else {
699
+ // const channelsText = data.checkChannel && data.checkChannel.length > 0
700
+ // ? data.checkChannel.map((channel: any) => `- **${channel.label}** (${channel.value})`).join('\n')
701
+ // : 'No detect channels available'
702
+ // text = `📡 **Available IP Detection Channels**
703
+ // ${channelsText}
704
+ // *These channels are used to detect proxy IP information (location, ISP, etc.).*`
705
+ // }
706
+ // return {
707
+ // content: [
708
+ // {
709
+ // type: 'text',
710
+ // text,
711
+ // },
712
+ // ],
713
+ // }
714
+ // }
715
+ // }
716
+ export const proxyList = new ProxyList();
717
+ export const proxyStore = new ProxyStore();
718
+ export const createProxy = new CreateProxy();
719
+ export const batchCreateProxies = new BatchCreateProxies();
720
+ export const detectProxy = new DetectProxy();
721
+ export const modifyProxy = new ModifyProxy();
722
+ export const deleteProxies = new DeleteProxies();
723
+ // export const getDetectChannels = new GetDetectChannels()
724
+ //# sourceMappingURL=proxy.js.map