feat: clear dns cache
This commit is contained in:
parent
bf6184dffe
commit
c0ede2899a
|
@ -94,6 +94,9 @@ class MetaDNS: NSObject {
|
|||
|
||||
|
||||
@objc func flushDnsCache() {
|
||||
if #available(OSX 10.15, *) {
|
||||
CommonUtils.runCommand("/usr/bin/dscacheutil", args: ["-flushcache"])
|
||||
}
|
||||
CommonUtils.runCommand("/usr/bin/killall", args: ["-HUP", "mDNSResponder"])
|
||||
|
||||
print("flushDnsCache")
|
||||
|
|
Loading…
Reference in New Issue