From ac66e5490e146d87081275bef519b4557d23945d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=94=E5=A7=AC=E6=A1=91?= Date: Fri, 9 Jul 2021 21:33:19 +0800 Subject: [PATCH] Add Multi-IP support at node list page's network check --- app/Components/NetworkDetection.php | 2 +- app/Console/Commands/NodeStatusDetection.php | 7 +- app/Http/Controllers/Admin/NodeController.php | 17 +- app/Http/Controllers/OAuth/BaseController.php | 4 +- composer.lock | 198 +++++++++--------- resources/views/admin/node/index.blade.php | 7 +- routes/web.php | 2 +- 7 files changed, 116 insertions(+), 121 deletions(-) diff --git a/app/Components/NetworkDetection.php b/app/Components/NetworkDetection.php index a55a6243..65d98469 100644 --- a/app/Components/NetworkDetection.php +++ b/app/Components/NetworkDetection.php @@ -279,7 +279,7 @@ class NetworkDetection // 来源:https://ping.gd/ private function gd(string $ip, bool $is_icmp, int $port = 443) { - $url = "https://ping.gd/api/ip-test/{$ip}:{$port}"; + $url = "https://ping.gd/api/ip-test/{$ip}:".($port ?? 443); $checkName = $is_icmp ? 'ping_alive' : 'telnet_alive'; diff --git a/app/Console/Commands/NodeStatusDetection.php b/app/Console/Commands/NodeStatusDetection.php index 082764b3..48cc21d6 100644 --- a/app/Console/Commands/NodeStatusDetection.php +++ b/app/Console/Commands/NodeStatusDetection.php @@ -75,15 +75,12 @@ class NodeStatusDetection extends Command { $detectionCheckTimes = sysConfig('detection_check_times'); - foreach (Node::whereIsRelay(0)->whereStatus(1)->where('detection_type', '>', 0)->get() as $node) { - if ($node->detection_type === 0) { - continue; - } + foreach (Node::whereIsRelay(0)->whereStatus(1)->where('detection_type', '<>', 0)->get() as $node) { $node_id = (int) $node->id; // 使用DDNS的node先通过gethostbyname获取ipv4地址 foreach ($node->ips() as $ip) { if ($node->detection_type !== 1) { - $icmpCheck = (new NetworkDetection)->networkCheck($ip, true); + $icmpCheck = (new NetworkDetection)->networkCheck($ip, true, $node->single ? $node->port : 22); if ($icmpCheck !== false && $icmpCheck !== '通讯正常') { $data[$node_id][$ip]['icmp'] = $icmpCheck; } diff --git a/app/Http/Controllers/Admin/NodeController.php b/app/Http/Controllers/Admin/NodeController.php index 328e8504..80c2031c 100644 --- a/app/Http/Controllers/Admin/NodeController.php +++ b/app/Http/Controllers/Admin/NodeController.php @@ -131,22 +131,15 @@ class NodeController extends Controller return Response::json(['status' => 'fail', 'message' => '删除线路失败']); } - // 节点信息验证 + // 节点IP阻断检测 public function checkNode(Node $node): JsonResponse { - // 使用DDNS的node先获取ipv4地址 - if ($node->is_ddns) { - $ip = gethostbyname($node->server); - if (strcmp($ip, $node->server) !== 0) { - $node->ip = $ip; - } else { - return Response::json(['status' => 'fail', 'title' => 'IP获取错误', 'message' => $node->name.'IP获取失败']); - } + foreach ($node->ips() as $ip) { + $data[$ip][0] = (new NetworkDetection)->networkCheck($ip, true, $node->single ? $node->port : 22); // ICMP + $data[$ip][1] = (new NetworkDetection)->networkCheck($ip, false, $node->single ? $node->port : 22); // TCP } - $data[0] = (new NetworkDetection)->networkCheck($node->ip, true); //ICMP - $data[1] = (new NetworkDetection)->networkCheck($node->ip, false, $node->single ? $node->port : 22); //TCP - return Response::json(['status' => 'success', 'title' => '['.$node->name.']阻断信息', 'message' => $data]); + return Response::json(['status' => 'success', 'title' => '['.$node->name.']阻断信息', 'message' => $data ?? []]); } // 刷新节点地理位置 diff --git a/app/Http/Controllers/OAuth/BaseController.php b/app/Http/Controllers/OAuth/BaseController.php index f898e638..d47a0400 100644 --- a/app/Http/Controllers/OAuth/BaseController.php +++ b/app/Http/Controllers/OAuth/BaseController.php @@ -8,13 +8,15 @@ use App\Http\Controllers\Controller; use App\Models\User; use App\Models\UserOauth; use Auth; +use Illuminate\Http\Request; use Laravel\Socialite\Facades\Socialite; use Str; class BaseController extends Controller { - public function route($type, $action = null) + public function route(Request $request, string $type) { + $action = $request->input('action'); if ($action === 'binding') { return Socialite::driver($type)->with(['redirect_uri' => route('oauth.bind', ['type' => $type])])->redirect(); } diff --git a/composer.lock b/composer.lock index 388b8d79..feb54076 100644 --- a/composer.lock +++ b/composer.lock @@ -2585,16 +2585,16 @@ }, { "name": "league/commonmark", - "version": "1.6.4", + "version": "1.6.5", "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "c3c8b7217c52572fb42aaf84211abccf75a151b2" + "reference": "44ffd8d3c4a9133e4bd0548622b09c55af39db5f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/c3c8b7217c52572fb42aaf84211abccf75a151b2", - "reference": "c3c8b7217c52572fb42aaf84211abccf75a151b2", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/44ffd8d3c4a9133e4bd0548622b09c55af39db5f", + "reference": "44ffd8d3c4a9133e4bd0548622b09c55af39db5f", "shasum": "", "mirrors": [ { @@ -2688,7 +2688,7 @@ "type": "tidelift" } ], - "time": "2021-06-19T20:08:14+00:00" + "time": "2021-06-26T11:57:13+00:00" }, { "name": "league/flysystem", @@ -2854,16 +2854,16 @@ }, { "name": "league/oauth1-client", - "version": "v1.9.0", + "version": "v1.9.1", "source": { "type": "git", "url": "https://github.com/thephpleague/oauth1-client.git", - "reference": "1e7e6be2dc543bf466236fb171e5b20e1b06aee6" + "reference": "19a3ce488bb1547c906209e8293199ec34eaa5b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/oauth1-client/zipball/1e7e6be2dc543bf466236fb171e5b20e1b06aee6", - "reference": "1e7e6be2dc543bf466236fb171e5b20e1b06aee6", + "url": "https://api.github.com/repos/thephpleague/oauth1-client/zipball/19a3ce488bb1547c906209e8293199ec34eaa5b1", + "reference": "19a3ce488bb1547c906209e8293199ec34eaa5b1", "shasum": "", "mirrors": [ { @@ -2929,9 +2929,9 @@ ], "support": { "issues": "https://github.com/thephpleague/oauth1-client/issues", - "source": "https://github.com/thephpleague/oauth1-client/tree/v1.9.0" + "source": "https://github.com/thephpleague/oauth1-client/tree/v1.9.1" }, - "time": "2021-01-20T01:40:53+00:00" + "time": "2021-07-07T22:54:46+00:00" }, { "name": "maennchen/zipstream-php", @@ -3554,16 +3554,16 @@ }, { "name": "monolog/monolog", - "version": "2.2.0", + "version": "2.3.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "1cb1cde8e8dd0f70cc0fe51354a59acad9302084" + "reference": "df991fd88693ab703aa403413d83e15f688dae33" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/1cb1cde8e8dd0f70cc0fe51354a59acad9302084", - "reference": "1cb1cde8e8dd0f70cc0fe51354a59acad9302084", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/df991fd88693ab703aa403413d83e15f688dae33", + "reference": "df991fd88693ab703aa403413d83e15f688dae33", "shasum": "", "mirrors": [ { @@ -3588,7 +3588,7 @@ "php-amqplib/php-amqplib": "~2.4", "php-console/php-console": "^3.1.3", "phpspec/prophecy": "^1.6.1", - "phpstan/phpstan": "^0.12.59", + "phpstan/phpstan": "^0.12.91", "phpunit/phpunit": "^8.5", "predis/predis": "^1.1", "rollbar/rollbar": "^1.3", @@ -3640,7 +3640,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.2.0" + "source": "https://github.com/Seldaek/monolog/tree/2.3.0" }, "funding": [ { @@ -3652,20 +3652,20 @@ "type": "tidelift" } ], - "time": "2020-12-14T13:15:25+00:00" + "time": "2021-07-05T11:34:13+00:00" }, { "name": "myclabs/php-enum", - "version": "1.8.0", + "version": "1.8.3", "source": { "type": "git", "url": "https://github.com/myclabs/php-enum.git", - "reference": "46cf3d8498b095bd33727b13fd5707263af99421" + "reference": "b942d263c641ddb5190929ff840c68f78713e937" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/php-enum/zipball/46cf3d8498b095bd33727b13fd5707263af99421", - "reference": "46cf3d8498b095bd33727b13fd5707263af99421", + "url": "https://api.github.com/repos/myclabs/php-enum/zipball/b942d263c641ddb5190929ff840c68f78713e937", + "reference": "b942d263c641ddb5190929ff840c68f78713e937", "shasum": "", "mirrors": [ { @@ -3681,7 +3681,7 @@ "require-dev": { "phpunit/phpunit": "^9.5", "squizlabs/php_codesniffer": "1.*", - "vimeo/psalm": "^4.5.1" + "vimeo/psalm": "^4.6.2" }, "type": "library", "autoload": { @@ -3706,7 +3706,7 @@ ], "support": { "issues": "https://github.com/myclabs/php-enum/issues", - "source": "https://github.com/myclabs/php-enum/tree/1.8.0" + "source": "https://github.com/myclabs/php-enum/tree/1.8.3" }, "funding": [ { @@ -3718,7 +3718,7 @@ "type": "tidelift" } ], - "time": "2021-02-15T16:11:48+00:00" + "time": "2021-07-05T08:18:36+00:00" }, { "name": "namshi/jose", @@ -3795,16 +3795,16 @@ }, { "name": "nesbot/carbon", - "version": "2.49.0", + "version": "2.50.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "93d9db91c0235c486875d22f1e08b50bdf3e6eee" + "reference": "f47f17d17602b2243414a44ad53d9f8b9ada5fdb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/93d9db91c0235c486875d22f1e08b50bdf3e6eee", - "reference": "93d9db91c0235c486875d22f1e08b50bdf3e6eee", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/f47f17d17602b2243414a44ad53d9f8b9ada5fdb", + "reference": "f47f17d17602b2243414a44ad53d9f8b9ada5fdb", "shasum": "", "mirrors": [ { @@ -3862,15 +3862,15 @@ { "name": "Brian Nesbitt", "email": "brian@nesbot.com", - "homepage": "http://nesbot.com" + "homepage": "https://markido.com" }, { "name": "kylekatarnls", - "homepage": "http://github.com/kylekatarnls" + "homepage": "https://github.com/kylekatarnls" } ], "description": "An API extension for DateTime that supports 281 different languages.", - "homepage": "http://carbon.nesbot.com", + "homepage": "https://carbon.nesbot.com", "keywords": [ "date", "datetime", @@ -3890,20 +3890,20 @@ "type": "tidelift" } ], - "time": "2021-06-02T07:31:40+00:00" + "time": "2021-06-28T22:38:45+00:00" }, { "name": "nikic/php-parser", - "version": "v4.10.5", + "version": "v4.11.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "4432ba399e47c66624bc73c8c0f811e5c109576f" + "reference": "fe14cf3672a149364fb66dfe11bf6549af899f94" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/4432ba399e47c66624bc73c8c0f811e5c109576f", - "reference": "4432ba399e47c66624bc73c8c0f811e5c109576f", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/fe14cf3672a149364fb66dfe11bf6549af899f94", + "reference": "fe14cf3672a149364fb66dfe11bf6549af899f94", "shasum": "", "mirrors": [ { @@ -3950,9 +3950,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.10.5" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.11.0" }, - "time": "2021-05-03T19:11:20+00:00" + "time": "2021-07-03T13:36:55+00:00" }, { "name": "opis/closure", @@ -5407,16 +5407,16 @@ }, { "name": "stripe/stripe-php", - "version": "v7.86.0", + "version": "v7.88.0", "source": { "type": "git", "url": "https://github.com/stripe/stripe-php.git", - "reference": "7a56d1066305afe2601f39bed5b1caf277f829c7" + "reference": "7203d00ba9b09830c0c5d5c06a9558db43b8e0ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/stripe/stripe-php/zipball/7a56d1066305afe2601f39bed5b1caf277f829c7", - "reference": "7a56d1066305afe2601f39bed5b1caf277f829c7", + "url": "https://api.github.com/repos/stripe/stripe-php/zipball/7203d00ba9b09830c0c5d5c06a9558db43b8e0ea", + "reference": "7203d00ba9b09830c0c5d5c06a9558db43b8e0ea", "shasum": "", "mirrors": [ { @@ -5468,9 +5468,9 @@ ], "support": { "issues": "https://github.com/stripe/stripe-php/issues", - "source": "https://github.com/stripe/stripe-php/tree/v7.86.0" + "source": "https://github.com/stripe/stripe-php/tree/v7.88.0" }, - "time": "2021-06-25T16:48:21+00:00" + "time": "2021-07-09T20:01:03+00:00" }, { "name": "swiftmailer/swiftmailer", @@ -5803,16 +5803,16 @@ }, { "name": "symfony/error-handler", - "version": "v5.3.0", + "version": "v5.3.3", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "0e6768b8c0dcef26df087df2bbbaa143867a59b2" + "reference": "43323e79c80719e8a4674e33484bca98270d223f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/0e6768b8c0dcef26df087df2bbbaa143867a59b2", - "reference": "0e6768b8c0dcef26df087df2bbbaa143867a59b2", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/43323e79c80719e8a4674e33484bca98270d223f", + "reference": "43323e79c80719e8a4674e33484bca98270d223f", "shasum": "", "mirrors": [ { @@ -5858,7 +5858,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v5.3.0" + "source": "https://github.com/symfony/error-handler/tree/v5.3.3" }, "funding": [ { @@ -5874,7 +5874,7 @@ "type": "tidelift" } ], - "time": "2021-05-26T17:43:10+00:00" + "time": "2021-06-24T08:13:00+00:00" }, { "name": "symfony/event-dispatcher", @@ -6205,16 +6205,16 @@ }, { "name": "symfony/http-foundation", - "version": "v5.3.2", + "version": "v5.3.3", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "7b6dd714d95106b831aaa7f3c9c612ab886516bd" + "reference": "0e45ab1574caa0460d9190871a8ce47539e40ccf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/7b6dd714d95106b831aaa7f3c9c612ab886516bd", - "reference": "7b6dd714d95106b831aaa7f3c9c612ab886516bd", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/0e45ab1574caa0460d9190871a8ce47539e40ccf", + "reference": "0e45ab1574caa0460d9190871a8ce47539e40ccf", "shasum": "", "mirrors": [ { @@ -6264,7 +6264,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.3.2" + "source": "https://github.com/symfony/http-foundation/tree/v5.3.3" }, "funding": [ { @@ -6280,20 +6280,20 @@ "type": "tidelift" } ], - "time": "2021-06-12T10:15:17+00:00" + "time": "2021-06-27T09:19:40+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.3.2", + "version": "v5.3.3", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "e7021165d9dbfb4051296b8de827e92c8a7b5c87" + "reference": "90ad9f4b21ddcb8ebe9faadfcca54929ad23f9f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/e7021165d9dbfb4051296b8de827e92c8a7b5c87", - "reference": "e7021165d9dbfb4051296b8de827e92c8a7b5c87", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/90ad9f4b21ddcb8ebe9faadfcca54929ad23f9f8", + "reference": "90ad9f4b21ddcb8ebe9faadfcca54929ad23f9f8", "shasum": "", "mirrors": [ { @@ -6382,7 +6382,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v5.3.2" + "source": "https://github.com/symfony/http-kernel/tree/v5.3.3" }, "funding": [ { @@ -6398,7 +6398,7 @@ "type": "tidelift" } ], - "time": "2021-06-17T14:18:27+00:00" + "time": "2021-06-30T08:27:49+00:00" }, { "name": "symfony/mime", @@ -7597,16 +7597,16 @@ }, { "name": "symfony/string", - "version": "v5.3.2", + "version": "v5.3.3", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "0732e97e41c0a590f77e231afc16a327375d50b0" + "reference": "bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/0732e97e41c0a590f77e231afc16a327375d50b0", - "reference": "0732e97e41c0a590f77e231afc16a327375d50b0", + "url": "https://api.github.com/repos/symfony/string/zipball/bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1", + "reference": "bd53358e3eccec6a670b5f33ab680d8dbe1d4ae1", "shasum": "", "mirrors": [ { @@ -7666,7 +7666,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.3.2" + "source": "https://github.com/symfony/string/tree/v5.3.3" }, "funding": [ { @@ -7682,20 +7682,20 @@ "type": "tidelift" } ], - "time": "2021-06-06T09:51:56+00:00" + "time": "2021-06-27T11:44:38+00:00" }, { "name": "symfony/translation", - "version": "v5.3.2", + "version": "v5.3.3", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "7e2603bcc598e14804c4d2359d8dc4ee3c40391b" + "reference": "380b8c9e944d0e364b25f28e8e555241eb49c01c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/7e2603bcc598e14804c4d2359d8dc4ee3c40391b", - "reference": "7e2603bcc598e14804c4d2359d8dc4ee3c40391b", + "url": "https://api.github.com/repos/symfony/translation/zipball/380b8c9e944d0e364b25f28e8e555241eb49c01c", + "reference": "380b8c9e944d0e364b25f28e8e555241eb49c01c", "shasum": "", "mirrors": [ { @@ -7767,7 +7767,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v5.3.2" + "source": "https://github.com/symfony/translation/tree/v5.3.3" }, "funding": [ { @@ -7783,7 +7783,7 @@ "type": "tidelift" } ], - "time": "2021-06-06T09:51:56+00:00" + "time": "2021-06-27T12:22:47+00:00" }, { "name": "symfony/translation-contracts", @@ -7871,16 +7871,16 @@ }, { "name": "symfony/var-dumper", - "version": "v5.3.2", + "version": "v5.3.3", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "905a22c68b292ffb6f20d7636c36b220d1fba5ae" + "reference": "46aa709affb9ad3355bd7a810f9662d71025c384" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/905a22c68b292ffb6f20d7636c36b220d1fba5ae", - "reference": "905a22c68b292ffb6f20d7636c36b220d1fba5ae", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/46aa709affb9ad3355bd7a810f9662d71025c384", + "reference": "46aa709affb9ad3355bd7a810f9662d71025c384", "shasum": "", "mirrors": [ { @@ -7945,7 +7945,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.3.2" + "source": "https://github.com/symfony/var-dumper/tree/v5.3.3" }, "funding": [ { @@ -7961,20 +7961,20 @@ "type": "tidelift" } ], - "time": "2021-06-06T09:51:56+00:00" + "time": "2021-06-24T08:13:00+00:00" }, { "name": "symfony/yaml", - "version": "v5.3.2", + "version": "v5.3.3", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "71719ab2409401711d619765aa255f9d352a59b2" + "reference": "485c83a2fb5893e2ff21bf4bfc7fdf48b4967229" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/71719ab2409401711d619765aa255f9d352a59b2", - "reference": "71719ab2409401711d619765aa255f9d352a59b2", + "url": "https://api.github.com/repos/symfony/yaml/zipball/485c83a2fb5893e2ff21bf4bfc7fdf48b4967229", + "reference": "485c83a2fb5893e2ff21bf4bfc7fdf48b4967229", "shasum": "", "mirrors": [ { @@ -8026,7 +8026,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v5.3.2" + "source": "https://github.com/symfony/yaml/tree/v5.3.3" }, "funding": [ { @@ -8042,7 +8042,7 @@ "type": "tidelift" } ], - "time": "2021-06-06T09:51:56+00:00" + "time": "2021-06-24T08:13:00+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -9806,16 +9806,16 @@ }, { "name": "fakerphp/faker", - "version": "v1.14.1", + "version": "v1.15.0", "source": { "type": "git", "url": "https://github.com/FakerPHP/Faker.git", - "reference": "ed22aee8d17c7b396f74a58b1e7fefa4f90d5ef1" + "reference": "89c6201c74db25fa759ff16e78a4d8f32547770e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/ed22aee8d17c7b396f74a58b1e7fefa4f90d5ef1", - "reference": "ed22aee8d17c7b396f74a58b1e7fefa4f90d5ef1", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/89c6201c74db25fa759ff16e78a4d8f32547770e", + "reference": "89c6201c74db25fa759ff16e78a4d8f32547770e", "shasum": "", "mirrors": [ { @@ -9871,9 +9871,9 @@ ], "support": { "issues": "https://github.com/FakerPHP/Faker/issues", - "source": "https://github.com/FakerPHP/Faker/tree/v.1.14.1" + "source": "https://github.com/FakerPHP/Faker/tree/v1.15.0" }, - "time": "2021-03-30T06:27:33+00:00" + "time": "2021-07-06T20:39:40+00:00" }, { "name": "filp/whoops", @@ -12985,16 +12985,16 @@ }, { "name": "symfony/filesystem", - "version": "v5.3.0", + "version": "v5.3.3", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "348116319d7fb7d1faa781d26a48922428013eb2" + "reference": "19b71c8f313b411172dd5f470fd61f24466d79a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/348116319d7fb7d1faa781d26a48922428013eb2", - "reference": "348116319d7fb7d1faa781d26a48922428013eb2", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/19b71c8f313b411172dd5f470fd61f24466d79a9", + "reference": "19b71c8f313b411172dd5f470fd61f24466d79a9", "shasum": "", "mirrors": [ { @@ -13033,7 +13033,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.3.0" + "source": "https://github.com/symfony/filesystem/tree/v5.3.3" }, "funding": [ { @@ -13049,7 +13049,7 @@ "type": "tidelift" } ], - "time": "2021-05-26T17:43:10+00:00" + "time": "2021-06-30T07:27:52+00:00" }, { "name": "theseer/tokenizer", diff --git a/resources/views/admin/node/index.blade.php b/resources/views/admin/node/index.blade.php index 020dbb9e..dd980a8b 100644 --- a/resources/views/admin/node/index.blade.php +++ b/resources/views/admin/node/index.blade.php @@ -159,11 +159,14 @@ }, success: function(ret) { if (ret.status === 'success') { + let str = ''; + for (let i in ret.message) { + str += '' + i + '' + ret.message[i][0] + '' + ret.message[i][1] + ''; + } swal.fire({ title: ret.title, icon: 'info', - html: '
ICMP TCP
' + - ret.message[0] + '' + ret.message[1] + '
', + html: '' + str + '
IP ICMP TCP
', showConfirmButton: false, }); } else { diff --git a/routes/web.php b/routes/web.php index de00b9f9..649c9a45 100644 --- a/routes/web.php +++ b/routes/web.php @@ -22,7 +22,7 @@ Route::middleware(['isForbidden', 'affiliate', 'isMaintenance'])->group(function Route::get('{type}/register', 'BaseController@register')->name('register'); Route::get('{type}/redirect', 'BaseController@simple')->name('simple'); Route::get('{type}/unsubscribe', 'BaseController@unsubscribe')->name('unsubscribe'); - Route::get('{type}/{action}', 'BaseController@route')->name('route'); + Route::get('{type}/route', 'BaseController@route')->name('route'); }); Route::post('login', 'AuthController@login')->middleware('isSecurity'); // 登录