2019-09-04 17:43:15 +00:00
|
|
|
#include <windows.h>
|
|
|
|
|
|
|
|
#include <assert.h>
|
|
|
|
|
|
|
|
#include "hooklib/dns.h"
|
|
|
|
|
|
|
|
#include "platform/dns.h"
|
|
|
|
|
|
|
|
HRESULT dns_platform_hook_init(const struct dns_config *cfg)
|
|
|
|
{
|
|
|
|
HRESULT hr;
|
|
|
|
|
|
|
|
assert(cfg != NULL);
|
|
|
|
|
|
|
|
if (!cfg->enable) {
|
|
|
|
return S_FALSE;
|
|
|
|
}
|
|
|
|
|
2019-09-07 17:49:04 +00:00
|
|
|
hr = dns_hook_push(L"tenporouter.loc", cfg->router);
|
|
|
|
|
|
|
|
if (FAILED(hr)) {
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
|
|
|
hr = dns_hook_push(L"bbrouter.loc", cfg->router);
|
|
|
|
|
|
|
|
if (FAILED(hr)) {
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
2019-09-04 17:43:15 +00:00
|
|
|
hr = dns_hook_push(L"naominet.jp", cfg->startup);
|
|
|
|
|
|
|
|
if (FAILED(hr)) {
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
|
|
|
hr = dns_hook_push(L"anbzvarg.wc", cfg->startup);
|
|
|
|
|
|
|
|
if (FAILED(hr)) {
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
2023-11-12 20:16:02 +00:00
|
|
|
hr = dns_hook_push(L"op.auth.sys-all.net", cfg->startup);
|
|
|
|
|
|
|
|
if (FAILED(hr)) {
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
|
|
|
hr = dns_hook_push(L"at.auth.sys-all.net", cfg->startup);
|
|
|
|
|
|
|
|
if (FAILED(hr)) {
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
|
|
|
hr = dns_hook_push(L"at.sys-all.net", cfg->startup);
|
|
|
|
|
|
|
|
if (FAILED(hr)) {
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
2019-09-04 17:43:15 +00:00
|
|
|
hr = dns_hook_push(L"ib.naominet.jp", cfg->billing);
|
|
|
|
|
|
|
|
if (FAILED(hr)) {
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
|
|
|
hr = dns_hook_push(L"vo.anbzvarg.wc", cfg->billing);
|
|
|
|
|
|
|
|
if (FAILED(hr)) {
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
|
|
|
hr = dns_hook_push(L"aime.naominet.jp", cfg->aimedb);
|
|
|
|
|
|
|
|
if (FAILED(hr)) {
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
|
|
|
hr = dns_hook_push(L"nvzr.anbzvarg.wc", cfg->aimedb);
|
|
|
|
|
|
|
|
if (FAILED(hr)) {
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
2024-03-13 23:14:51 +00:00
|
|
|
// crossbeats REV.
|
2024-03-13 16:51:58 +00:00
|
|
|
hr = dns_hook_push(L"https://rev-ent.ac.capcom.jp:443", cfg->title);
|
|
|
|
|
|
|
|
if (FAILED(hr)) {
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
2024-02-25 18:03:05 +00:00
|
|
|
// AimePay
|
|
|
|
hr = dns_hook_push(L"api-aime.am-all.net", cfg->startup);
|
|
|
|
|
|
|
|
if (FAILED(hr)) {
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
|
|
|
// E-MONEY
|
|
|
|
hr = dns_hook_push(L"tasms-api-basis.thincacloud.com", cfg->startup);
|
|
|
|
|
|
|
|
if (FAILED(hr)) {
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
|
|
|
hr = dns_hook_push(L"shop.tfps.thincacloud.com", cfg->startup);
|
|
|
|
|
2024-05-19 09:37:57 +00:00
|
|
|
if (FAILED(hr)) {
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHN
|
|
|
|
// PowerOn
|
|
|
|
hr = dns_hook_push(L"at.sys-all.cn", cfg->startup);
|
|
|
|
|
|
|
|
if (FAILED(hr)) {
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
|
|
|
// WeChat AimeDB Server
|
|
|
|
hr = dns_hook_push(L"ai.sys-all.cn", cfg->aimedb);
|
|
|
|
|
2024-02-25 18:03:05 +00:00
|
|
|
if (FAILED(hr)) {
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
2019-11-17 05:08:25 +00:00
|
|
|
// if your ISP resolves bad domains, it will kill the network. These 2
|
|
|
|
// *cannot* resolve
|
|
|
|
|
|
|
|
hr = dns_hook_push(L"mobirouter.loc", NULL);
|
|
|
|
|
|
|
|
if (FAILED(hr)) {
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
|
|
|
hr = dns_hook_push(L"dslrouter.loc", NULL);
|
|
|
|
|
|
|
|
if (FAILED(hr)) {
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
2023-07-13 22:41:23 +00:00
|
|
|
// Disable api/polling to the original servers
|
|
|
|
|
2024-05-09 01:48:08 +00:00
|
|
|
hr = dns_hook_push(L"*.amlog.sys-all.net", NULL);
|
|
|
|
|
|
|
|
if (FAILED(hr)) {
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
|
|
|
hr = dns_hook_push(L"*.d-amlog.sys-all.net", NULL);
|
2023-07-13 22:41:23 +00:00
|
|
|
|
|
|
|
if (FAILED(hr)) {
|
|
|
|
return hr;
|
|
|
|
}
|
|
|
|
|
2019-09-04 17:43:15 +00:00
|
|
|
return S_OK;
|
|
|
|
}
|