mirror of
https://gitea.tendokyu.moe/Dniel97/segatools.git
synced 2024-11-30 23:57:15 +01:00
platform/dns.c: Intercept router host names
This commit is contained in:
parent
29d9561a28
commit
0242c5efc8
@ -63,6 +63,14 @@ void dns_config_load(struct dns_config *cfg, const wchar_t *filename)
|
|||||||
_countof(default_),
|
_countof(default_),
|
||||||
filename);
|
filename);
|
||||||
|
|
||||||
|
GetPrivateProfileStringW(
|
||||||
|
L"dns",
|
||||||
|
L"router",
|
||||||
|
default_,
|
||||||
|
cfg->router,
|
||||||
|
_countof(cfg->router),
|
||||||
|
filename);
|
||||||
|
|
||||||
GetPrivateProfileStringW(
|
GetPrivateProfileStringW(
|
||||||
L"dns",
|
L"dns",
|
||||||
L"startup",
|
L"startup",
|
||||||
|
@ -12,6 +12,7 @@ struct amvideo_config {
|
|||||||
|
|
||||||
struct dns_config {
|
struct dns_config {
|
||||||
bool enable;
|
bool enable;
|
||||||
|
wchar_t router[128];
|
||||||
wchar_t startup[128];
|
wchar_t startup[128];
|
||||||
wchar_t billing[128];
|
wchar_t billing[128];
|
||||||
wchar_t aimedb[128];
|
wchar_t aimedb[128];
|
||||||
|
@ -17,6 +17,18 @@ HRESULT dns_platform_hook_init(const struct dns_config *cfg)
|
|||||||
return S_FALSE;
|
return S_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
hr = dns_hook_push(L"naominet.jp", cfg->startup);
|
hr = dns_hook_push(L"naominet.jp", cfg->startup);
|
||||||
|
|
||||||
if (FAILED(hr)) {
|
if (FAILED(hr)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user