Address Providers¶
- class Web(ipv4_url='https://ipv4.icanhazip.com/', ipv6_url='https://ipv6.icanhazip.com/')¶
Retrieves addresses from a web service (by default: icanhazip). This provider expects the response to contain only the address in plain text (no HTML).
- Parameters
ipv4_url – URL of the service that retrieves an IPv4 address
ipv6_url – URL of the service that retrieves an IPv6 address
- class Local(interface, allow_private=False)¶
Retrieves addresses from a local network interface. If you are behind NAT (which is often the case if you are using dynamic DNS), this provider will return not return any IPv4 address, unless you enable the
allow_private
option. Normally, you will want to use a different provider for IPv4 if you are behind NAT.- Parameters
interface – name of the interface to use
allow_private – consider a private address to be valid
- class ComcastRouter(ip, username='admin', password='password')¶
Scrapes the external IPv4 address from a Comcast/XFINITY router. This address provider does not support IPv6 because it doesn’t usually make sense to submit the router’s IPv6 address to a dynamic DNS service.
This has been tested with an Arris TG1682G, but may work with other routers using Comcast’s firmware.
- Parameters
ip – internal IP address of the router
username – username for the web interface (usually ‘admin’)
password – password for the web interface (router default is ‘password’)