All Projects → spotify → Dns Java

spotify / Dns Java

Licence: apache-2.0
DNS wrapper library that provides SRV lookup functionality

Programming Languages

java
68154 projects - #9 most used programming language

Labels

Projects that are alternatives of or similar to Dns Java

Ip Attack
Auto IP or Domain Attack Tool ( #1 )
Stars: ✭ 162 (-11.48%)
Mutual labels:  dns
Dnsperf
DNS Performance Testing Tools
Stars: ✭ 171 (-6.56%)
Mutual labels:  dns
Browsertunnel
Surreptitiously exfiltrate data from the browser over DNS
Stars: ✭ 177 (-3.28%)
Mutual labels:  dns
Pihole Unbound
Guide to setup Unbound recursive DNS resolver with Pi-Hole. With additional configs for speed and security!! 🚀🔒
Stars: ✭ 165 (-9.84%)
Mutual labels:  dns
Dnsguide
A guide to writing a DNS Server from scratch in Rust
Stars: ✭ 2,226 (+1116.39%)
Mutual labels:  dns
Blokada
The official repo for Blokada for Android and iOS.
Stars: ✭ 2,427 (+1226.23%)
Mutual labels:  dns
Sites Using Cloudflare
💔 Archived list of domains using Cloudflare DNS at the time of the CloudBleed announcement.
Stars: ✭ 1,914 (+945.9%)
Mutual labels:  dns
Txeh
Go library and CLI utilty for /etc/hosts management.
Stars: ✭ 181 (-1.09%)
Mutual labels:  dns
Partyloud
A simple tool to generate fake web browsing and mitigate tracking
Stars: ✭ 170 (-7.1%)
Mutual labels:  dns
Rrda
REST API allowing to perform DNS queries over HTTP
Stars: ✭ 176 (-3.83%)
Mutual labels:  dns
Dnsmasqweb
基于DNSmasq的DNS解析、以及DHCP地址分配系统
Stars: ✭ 166 (-9.29%)
Mutual labels:  dns
Sslify
Rapidly SSLify Your Server!
Stars: ✭ 168 (-8.2%)
Mutual labels:  dns
Dcompass
[WIP] High-performance programmable DNS server aiming at robustness, speed, and flexibility
Stars: ✭ 174 (-4.92%)
Mutual labels:  dns
Dns Proxy
Simple DNS Proxy written in Node.JS. Override hosts, domains, or tlds. Redirect certain domains to different nameservers.
Stars: ✭ 165 (-9.84%)
Mutual labels:  dns
Dnsproxy
防 DNS 缓存污染,兼顾查询质量与速度
Stars: ✭ 177 (-3.28%)
Mutual labels:  dns
Dnstrace
DNS resolution tracing tool
Stars: ✭ 165 (-9.84%)
Mutual labels:  dns
Recsech
Recsech is a tool for doing Footprinting and Reconnaissance on the target web. Recsech collects information such as DNS Information, Sub Domains, HoneySpot Detected, Subdomain takeovers, Reconnaissance On Github and much more you can see in Features in tools .
Stars: ✭ 173 (-5.46%)
Mutual labels:  dns
Dns Heaven
Fixes stupid macOS DNS stack (/etc/resolv.conf)
Stars: ✭ 182 (-0.55%)
Mutual labels:  dns
Netdot
Network Documentation Tool
Stars: ✭ 180 (-1.64%)
Mutual labels:  dns
Dnslib
A Python library to encode/decode DNS wire-format packets
Stars: ✭ 174 (-4.92%)
Mutual labels:  dns

Circle CI Coverage Status Maven Central License

spotify-dns-java

This small DNS wrapper library provides some useful pieces of functionality related to SRV lookups.

Resilience

Sometimes it is useful to default to previously returned, retained values, if a dns lookup should fail or return an empty result. This behavior is controlled by the retainingDataOnFailures() and retentionDurationMillis(long) methods in DnsSrvResolvers.DnsSrvResolverBuilder.

Watching for Changes

It's often useful to update where you try to connect based on changes in lookup results, and this library provides functionality that allows you to get notified when things change by implementing this interface (defined in the ChangeNotifier interface):

  interface Listener<T> {

    /**
     * Signal that set of records changed.
     *
     * @param changeNotification An object containing details about the change
     */
    void onChange(ChangeNotification<T> changeNotification);
  }

  /**
   * A change event containing the current and previous set of records.
   */
  interface ChangeNotification<T> {
    Set<T> current();
    Set<T> previous();
  }

Take a look at the PollingUsage example for an example.

Metrics

If you have a statistics system that can be integrated with using the munin protocol, the method metered() in DnsSrvResolvers.DnsSrvResolverBuilder enables this in conjunction with the spotify munin forwarder. Have a look at the BasicUsage example for details on how to set that up.

Usage

The entry point to lookups is through an instance of DnsSrvResolver obtained via the DnsSrvResolvers factory class.

To periodically check a set of records and react to changes, use the DnsSrvWatcher interface obtained via the DnsSrvWatchers factory class.

For example code, have a look at BasicUsage example and PollingUsage example

To include the latest released version in your maven project, do:

  <dependency>
    <groupId>com.spotify</groupId>
    <artifactId>dns</artifactId>
    <version>3.2.2</version>
  </dependency>

NOTE: version 3.1.0 is broken; you cannot use the retention feature in that version.

License

This software is released under the Apache License 2.0. More information in the file LICENSE distributed with this project.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].