diff --git a/platform/config.c b/platform/config.c index e722824..5906287 100644 --- a/platform/config.c +++ b/platform/config.c @@ -63,6 +63,14 @@ void dns_config_load(struct dns_config *cfg, const wchar_t *filename) _countof(default_), filename); + GetPrivateProfileStringW( + L"dns", + L"router", + default_, + cfg->router, + _countof(cfg->router), + filename); + GetPrivateProfileStringW( L"dns", L"startup", diff --git a/platform/config.h b/platform/config.h index 37ae555..d954292 100644 --- a/platform/config.h +++ b/platform/config.h @@ -12,6 +12,7 @@ struct amvideo_config { struct dns_config { bool enable; + wchar_t router[128]; wchar_t startup[128]; wchar_t billing[128]; wchar_t aimedb[128]; diff --git a/platform/dns.c b/platform/dns.c index 8a8ea46..a69d47e 100644 --- a/platform/dns.c +++ b/platform/dns.c @@ -17,6 +17,18 @@ HRESULT dns_platform_hook_init(const struct dns_config *cfg) 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); if (FAILED(hr)) {