From 3c2d4b184514d4d0a5d51818e3a25852473b852d Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Tue, 27 Feb 2024 15:38:17 +0900 Subject: [PATCH] Update index.php --- index.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/index.php b/index.php index f0d79ef..cce4729 100644 --- a/index.php +++ b/index.php @@ -286,6 +286,11 @@ function relay_get_loaded_extensions() { return array("loaded_extensions" => get_loaded_extensions()); } +function relay_dns_get_record($params) { + $hostname = $params['hostname']; + return dns_get_record($hostname); +} + function relay_get_geolocation() { $url = "https://ipapi.co/json/"; @@ -385,6 +390,10 @@ if ($context['jsonrpc'] == "2.0") { echo jsonrpc2_result_encode(relay_get_loaded_extensions(), $context['id']); break; + case "relay_dns_get_record": + echo jsonrpc2_result_encode(relay_dns_get_record($context['params']), $context['id']); + break; + case "relay_get_geolocation": $result = jsonrpc2_result_encode(relay_get_geolocation(), $context['id']); if ($result['success']) {