*Check if resolved dns is an ip or domain, return false otherwise
This commit is contained in:
parent
3cef7a78d9
commit
7b59584c57
|
@ -26,6 +26,10 @@ export default class ServerProvider extends BaseProvider {
|
|||
async handleProxy(details: OnRequestDetailsType): Promise<any> {
|
||||
const dns = await this.resolveDns(details);
|
||||
|
||||
return { type: "http", host: dns, port: 80 };
|
||||
if (isIp(dns) || isDomain(dns)) {
|
||||
return { type: "http", host: dns, port: 80 };
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Reference in New Issue