소스 검색

fix dns port string to int

Tokumeikoi 5 년 전
부모
커밋
54a8542e0f
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      app/Services/ServerService.php

+ 6 - 0
app/Services/ServerService.php

@@ -59,6 +59,12 @@ class ServerService
                 array_push($dns->servers, '1.1.1.1');
                 array_push($dns->servers, 'localhost');
             }
+            $dns->servers = array_map(function ($v) {
+               if (is_object($v)) {
+                   $v->port = (int)$v->port;
+               }
+               return $v;
+            }, $dns->servers);
             $json->dns = $dns;
             $json->outbound->settings->domainStrategy = 'UseIP';
         }