From 22abec01f1de1c4f59437c484aa58defd0703f41 Mon Sep 17 00:00:00 2001 From: assnctr Date: Sat, 17 Sep 2022 21:17:16 +0300 Subject: [PATCH] Fix result type --- src/misc/FindMixedProxies.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/misc/FindMixedProxies.js b/src/misc/FindMixedProxies.js index af17ea0..e39edbe 100644 --- a/src/misc/FindMixedProxies.js +++ b/src/misc/FindMixedProxies.js @@ -1,4 +1,5 @@ import url from 'url'; +import { isIP } from './regexes.js'; const getProxyType = string => { try { @@ -29,7 +30,7 @@ const getProxyType = string => { if (nextPort >= 0 && nextPort <= 65535) { return { - type: 'url', + type: isIP(second.hostname) ? 'v4' : 'url', auth: `${log}:${pass}`, host: second.hostname, port: nextPort @@ -40,7 +41,7 @@ const getProxyType = string => { } return { - type: 'url', + type: isIP(second.hostname) ? 'v4' : 'url', auth: second.auth ? second.auth : 'none', host: second.hostname, port: Number(second.port)