Updated BungeeRotator to reflect new API key and abide by new rate limits.

This commit is contained in:
Jonathan Williams 2015-03-07 21:47:02 -08:00
parent 90dbd64b17
commit 521891f409
3 changed files with 20 additions and 10 deletions

View File

@ -119,21 +119,31 @@ public class BungeeRotator
for (String address : usServers)
{
recordsToAdd.add(new ARecord("us", address, 300));
log("Addding server address in DNS : " + "us " + address);
log("Adding server address in DNS : " + "us " + address);
}
for (String address : euServers)
{
recordsToAdd.add(new ARecord("eu", address, 300));
log("Addding server address in DNS : " + "eu " + address);
}
if (recordsToAdd.size() > 0)
{
new ApiPostCall("https://api.dnsmadeeasy.com/V2.0/dns/managed/", 962728, "/records/", "createMulti").Execute(recordsToAdd);
log("Created " + recordsToAdd.size() + " records.");
}
recordsToAdd.clear();
for (String address : euServers)
{
recordsToAdd.add(new ARecord("eu", address, 300));
log("Adding server address in DNS : " + "eu " + address);
}
if (recordsToAdd.size() > 0)
{
new ApiPostCall("https://api.dnsmadeeasy.com/V2.0/dns/managed/", 962728, "/records/", "createMulti").Execute(recordsToAdd);
log("Created " + recordsToAdd.size() + " records.");
}
recordsToAdd.clear();
if (recordsToDelete.size() > 0)
{
StringBuilder idBuilder = new StringBuilder();

View File

@ -51,13 +51,13 @@ public abstract class DnsMadeEasyApiCallBase
try
{
String timeStamp = getServerTime();
SecretKeySpec keySpec = new SecretKeySpec("8c9af8cc-d306-4df3-8de8-944deafa8239".getBytes(), "HmacSHA1");
SecretKeySpec keySpec = new SecretKeySpec("35bb3b97-3815-4b63-b60b-eb1882c07b40".getBytes(), "HmacSHA1");
Mac mac = Mac.getInstance("HmacSHA1");
mac.init(keySpec);
byte[] hashBytes = mac.doFinal((timeStamp + "").getBytes());
Hex.encodeHexString(hashBytes);
request.addHeader("x-dnsme-apiKey", "610e21ee-4250-4b55-b637-a1fcc3847850");
request.addHeader("x-dnsme-apiKey", "a9750980-b7df-4a7e-a047-2ade43628f0d");
request.addHeader("x-dnsme-requestDate", timeStamp + "");
request.addHeader("x-dnsme-hmac", Hex.encodeHexString(hashBytes));
request.addHeader("Content-Type", "application/json");

View File

@ -6,6 +6,6 @@ public class DnsRecord
public String name;
public String type;
public String value;
public String gtdLocation;
public String gtdLocation = "DEFAULT";
public int ttl;
}