google-ddns
Version:
Google Dynamic DNS client update tool. Updates the DNS IP address to the current public IP.
836 lines (291 loc) • 16 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: Options</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: Options</h1>
<section>
<header>
<h2><span class="attribs"><span class="type-signature"></span></span>
<span class="ancestors"><a href="DEDA-Google-DDNS.html">DEDA-Google-DDNS</a>.</span>Options<span class="signature">()</span><span class="type-signature"></span></h2>
<div class="class-description"><p>The options files can be a JS or JSON file. In this example it is only a JS so we can add document and comments to the fields.
Only the fields that do not have default values are required.</p></div>
</header>
<article>
<div class="container-overview">
<h2>Constructor</h2>
<h4 class="name" id="Options"><span class="type-signature"></span>new Options<span class="signature">()</span><span class="type-signature"></span></h4>
<h5 class="subsection-title">Properties:</h5>
<table class="props">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>hostname</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The dynamic DNS hostname</p></td>
</tr>
<tr>
<td class="name"><code>username</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The dynamic DNS username.</p></td>
</tr>
<tr>
<td class="name"><code>password</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The dynamic DNS password.</p></td>
</tr>
<tr>
<td class="name"><code>publicIpUrl</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
https://domains.google.com/checkip
</td>
<td class="description last"><p>he HTTP/HTTPS URL used to check the current public IP of the device.
The default value uses Google's provided URl but users can override this URL.</p></td>
</tr>
<tr>
<td class="name"><code>updateIpUrl</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
https://domains.google.com/nic/update?hostname=%HOSTNAME%&myip=%IPADDRESS%
</td>
<td class="description last"><p>The HTTPS URL of the Google DNS API update. Typically this should not change unless Google decides to change the URL or format.</p></td>
</tr>
<tr>
<td class="name"><code>userAgent</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
Nodejs google-ddns
</td>
<td class="description last"><p>The HTTP header User-Agent to send when updating the IP address. This is required by the Google Dynamic DNS API to identify the dynamic DNS client.</p></td>
</tr>
<tr>
<td class="name"><code>failOnUnresolvedHostName</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
false
</td>
<td class="description last"><p>Indicates whether to fail or keep going during synchronizing if the current host name was not resolved.
This typically happens if the domain was created and has not yet been applied or propagated. See TTL (Time-to-Live) for more information.
Every though this can fail, the update can sill be successful.</p></td>
</tr>
<tr>
<td class="name"><code>maxUnresolvedHostNameFail</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
3
</td>
<td class="description last"><p>This works in conjunction with failOnUnresolvedHostName to make sure we don't keep failing over and over with no error back reporting.</p></td>
</tr>
<tr>
<td class="name"><code>useHostIPAddressCache</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
true
</td>
<td class="description last"><p>Indicates whether to cache and use the last resolved host IP address or resolve every-time. Generally speaking we
don't need to resolve the host every-time since it will not change unless we change it. This saves having to do a DNS request every interval. Use the hostIPAddressCacheExpires
to do a check every once in a while.</p></td>
</tr>
<tr>
<td class="name"><code>hostIPAddressCacheExpires</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
3600
</td>
<td class="description last"><p>If useHostIPAddressCache is set to true, this timer is used to force a host IP address checked/resolution every once
in a while rather than never. The time is in seconds and defaults to every hour.</p></td>
</tr>
<tr>
<td class="name"><code>debug</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
false
</td>
<td class="description last"><p>Set the debug mode on or off. The debug mode will write debug and status information to the console.</p></td>
</tr>
<tr>
<td class="name"><code>runService</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
true
</td>
<td class="description last"><p>Defines whether to run the application as a service as a one time call to update the google domain IP address.</p></td>
</tr>
<tr>
<td class="name"><code>checkInterval</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
60
</td>
<td class="description last"><p>Used by the service. The amount of time in seconds to wait before checking if the public IP has changed.</p></td>
</tr>
<tr>
<td class="name"><code>maxConsecutiveErrors</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
10
</td>
<td class="description last"><p>Used by the service. The maximum number of consecutive errors before stopping the check timer loop.</p></td>
</tr>
<tr>
<td class="name"><code>exitOnMaxErrors</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
true
</td>
<td class="description last"><p>Used by the service. Defines whether to exit process when the max consecutive errors has been reached.</p></td>
</tr>
<tr>
<td class="name"><code>logPath</code></td>
<td class="type">
<span class="param-type">string</span>
|
<span class="param-type">boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
'./logs.log'
</td>
<td class="description last"><p>Used by the service. Defines the log output path. Set to false to disable output logs.</p></td>
</tr>
<tr>
<td class="name"><code>logToConsole</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
true
</td>
<td class="description last"><p>Used by the service. Defines whether to log output to the console or not.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-author">Author:</dt>
<dd class="tag-author">
<ul>
<li><a href="mailto:charbel.choueiri@gmail.com">Charbel Choueiri</a></li>
</ul>
</dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="options.js.html">options.js</a>, <a href="options.js.html#line3">line 3</a>
</li></ul></dd>
</dl>
</div>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="DEDA-Google-DDNS.DynamicDNS.html">DynamicDNS</a></li><li><a href="DEDA-Google-DDNS.Options.html">Options</a></li><li><a href="DEDA-Google-DDNS.Service.html">Service</a></li></ul><h3>Namespaces</h3><ul><li><a href="DEDA-Google-DDNS.html">DEDA-Google-DDNS</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Jul 01 2018 11:49:49 GMT-0400 (Eastern Daylight Time)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>