An open API service indexing awesome lists of open source software.

https://github.com/stariy95/dns-client

Small DNS client library intended primary for network utilities and testing applications
https://github.com/stariy95/dns-client

Last synced: 8 months ago
JSON representation

Small DNS client library intended primary for network utilities and testing applications

Awesome Lists containing this project

README

          

# DNS Client

[![Verify build](https://github.com/stariy95/dns-client/actions/workflows/build.yml/badge.svg)](https://github.com/stariy95/dns-client/actions/workflows/build.yml)
[![Maven Central](https://img.shields.io/maven-central/v/com.kendamasoft/dns-client.svg?colorB=brightgreen)](https://search.maven.org/artifact/com.kendamasoft/dns-client)

Compact DNS client library intended primary for network utilities and testing applications.
It is fully compatible with Android 2.3 and newer and with standalone JRE 7 and newer.

## Release Notes

### 1.1.0

- Initial support for DNS-over-HTTPS protocol
- Support additional records types

### 1.0.0

- Initial release

## Installation:

### Gradle
```
dependencies {
compile 'com.kendamasoft:dns-client:1.1.0'
}
```

### Maven
```

com.kendamasoft
dns-client
1.1.0

```

## Usage:

```java
import java.io.IOException;
import com.kendamasoft.dns.protocol.*;

public class DnsTest {

static public void main(String... args) throws IOException {
Message request = new MessageBuilder()
.setName("example.com")
.setType(RecordType.ANY)
.build();

Message response = new DnsConnectionAuto().doRequest(request);
for (ResourceRecord record : response.getAllRecords()) {
System.out.println(record);
}
}
}
```