增加127.0.0.1的问题处理使用dns over https google

no_ymq_dev
Rico 8 years ago committed by GitHub
parent 9041ef8a8a
commit 4e243f6ec7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -19,6 +19,7 @@ use App\Models\BlockIp;
use App\Models\TelegramSession;
use App\Models\EmailVerify;
use App\Services\Config;
use App\Utils\DNSoverHTTPS;
use App\Utils\Radius;
use App\Utils\Tools;
use App\Services\Mail;
@ -105,6 +106,9 @@ class Job
$rule = preg_match("/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/",$node->server);
if (!$rule && (!$node->sort || $node->sort == 10)) {
$ip=gethostbyname($node->server);
if ($ip == "127.0.0.1"){
$ip = DNSoverHTTPS::gethostbyName($node->server);
}
$node->node_ip=$ip;
$node->save();

Loading…
Cancel
Save