Skip to content

Commit 22abec0

Browse files
author
assnctr
committed
Fix result type
1 parent cfe9951 commit 22abec0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/misc/FindMixedProxies.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import url from 'url';
2+
import { isIP } from './regexes.js';
23

34
const getProxyType = string => {
45
try {
@@ -29,7 +30,7 @@ const getProxyType = string => {
2930

3031
if (nextPort >= 0 && nextPort <= 65535) {
3132
return {
32-
type: 'url',
33+
type: isIP(second.hostname) ? 'v4' : 'url',
3334
auth: `${log}:${pass}`,
3435
host: second.hostname,
3536
port: nextPort
@@ -40,7 +41,7 @@ const getProxyType = string => {
4041
}
4142

4243
return {
43-
type: 'url',
44+
type: isIP(second.hostname) ? 'v4' : 'url',
4445
auth: second.auth ? second.auth : 'none',
4546
host: second.hostname,
4647
port: Number(second.port)

0 commit comments

Comments
 (0)