mirror of
https://github.com/netchx/netch.git
synced 2026-03-14 17:43:18 +08:00
[Redirector] Add one feature
This commit is contained in:
@@ -322,13 +322,23 @@ void udpCanSend(ENDPOINT_ID id)
|
||||
|
||||
void udpSend(ENDPOINT_ID id, const unsigned char* target, const char* buffer, int length, PNF_UDP_OPTIONS options)
|
||||
{
|
||||
if (filterDNS && DNSHandler::IsDNS((PSOCKADDR_IN6)target))
|
||||
if (DNSHandler::IsDNS((PSOCKADDR_IN6)target))
|
||||
{
|
||||
UP += length;
|
||||
DNSHandler::CreateHandler(id, (PSOCKADDR_IN6)target, buffer, length, options);
|
||||
if (!filterDNS)
|
||||
{
|
||||
nf_udpPostSend(id, target, buffer, length, options);
|
||||
|
||||
wcout << "[Redirector][EventHandler][udpSend][" << id << "] DNS to " << ConvertIP((PSOCKADDR)target) << endl;
|
||||
return;
|
||||
wcout << "[Redirector][EventHandler][udpSend][" << id << "] B DNS to " << ConvertIP((PSOCKADDR)target) << endl;
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
UP += length;
|
||||
DNSHandler::CreateHandler(id, (PSOCKADDR_IN6)target, buffer, length, options);
|
||||
|
||||
wcout << "[Redirector][EventHandler][udpSend][" << id << "] H DNS to " << ConvertIP((PSOCKADDR)target) << endl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
udpContextLock.lock();
|
||||
|
||||
Reference in New Issue
Block a user