Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Catalin Pirvu committed May 2, 2018
1 parent b1bc9c9 commit d8af567
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 23 deletions.
42 changes: 31 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,55 @@
# DNS Proxy
A simple DNS proxy written in go on top of [github.com/miekg/dns](https://github.com/miekg/dns)
A simple DNS proxy written in go based on [github.com/miekg/dns](https://github.com/miekg/dns)

## How to use it


# Docker
```
```
# Download executables
## Docker

```shell
$ docker run -p 153:53/udp katakonst/go-dns-proxy:latest -use-outbound -json-config='{
"defaultDns": "8.8.8.8:53",
"servers": {
"google.com" : "8.8.8.8:53"
},
"domains": {
"test.com." : "8.8.8.8"
}
}'
```

## Download executables

[Download](https://github.com/katakonst/go-dns-proxy/releases)
```

# GO get
## Go get

```shell
$ go get github.com/katakonst/go-dns-proxy
$ go-dns-proxy -use-outbound -json-config='{
"defaultDns": "8.8.8.8:53",
"servers": {
"google.com" : "8.8.8.8:53"
},
"domains": {
"test.com." : "8.8.8.8"
}
}'
```


## Arguments & Options
## Arguments

```
-file config filename
-log-level log level
-log-level log level(info or error)
-expiration cache expiration time in seconds
-use-outbound use outbound address as host for server
-config-json configs as json
```

## Config file format

```
```json
{
"host": "192.168.1.4:53",
"defaultDns": "8.8.8.8:53",
Expand Down
11 changes: 0 additions & 11 deletions circle.yml

This file was deleted.

2 changes: 1 addition & 1 deletion dns_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (proxy *DNSProxy) processOtherTypes(dnsServer string, q *dns.Question, requ
if len(msg.Answer) > 0 {
return &msg.Answer[0], nil
}
return nil, nil
return nil, fmt.Errorf("not found")
}

func (proxy *DNSProxy) processTypeA(dnsServer string, q *dns.Question, requestMsg *dns.Msg) (*dns.RR, error) {
Expand Down

0 comments on commit d8af567

Please sign in to comment.