Save
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
namespace process;
|
||||
use Workerman\Connection\TcpConnection;
|
||||
|
||||
class DnsProcess
|
||||
{
|
||||
|
||||
public function onMessage($connection, $data)
|
||||
{
|
||||
$data=json_decode($data);
|
||||
$type=$data->type; #查询类型
|
||||
$name=$data->name; #查询内容(一般是域名,PTR时为倒序IP)
|
||||
$rip=$connection->getRemoteIp(); #客户端IP
|
||||
|
||||
$connection->send($return);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user