iOS 11 WKWebView provides APIs which work like NSURLProtocol in UIWebView, it's useful to WKWebView DNS pollution problem.
New API -[WKWebViewConfiguration setURLSchemeHandler:forURLScheme:],provide WKURLSchemeHandler to handle the request with your network tool.
Reference: Apple API Doc