This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ID of the config, e.g. A1234BCD. | |
const configID = "A1234BCD"; | |
// API key, found at the bottom of your account page in https://my.nextdns.io/account | |
const APIKey = "xxxxxxxxxxxxxxxxxxxxxxxxxx"; | |
// Mark true or false. If true, failed links will be retried 3 times at progressively increasing intervals. | |
// If false, failed links will not be retried. | |
const retryFailedLinks = true; | |
// Time delay between requests in milliseconds. | |
// 800 seems to not give any errors but is rather slow while anything faster will give errors (in limited testing). | |
// If you want to go lower, it is recommended that "retryFailedLinks" is true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/swift | |
import Foundation | |
let path = URL(fileURLWithPath: NSString(string: "~/Library/Application Support/.ffuserdata").expandingTildeInPath) | |
let data = try! NSData(contentsOf: path) as Data | |
let dictionary = try! NSKeyedUnarchiver.unarchiveTopLevelObjectWithData(data) as! NSDictionary | |
let mutableDictionary = dictionary.mutableCopy() as! NSMutableDictionary | |
for (key, value) in mutableDictionary { |