1
0
mirror of https://github.com/taigrr/godns synced 2025-01-18 04:03:25 -08:00

Compare commits

...

14 Commits

Author SHA1 Message Date
Timothy
5ad83edfe8
Merge pull request #99 from iskrisis/patch-1
Update README.md
2021-03-01 10:17:21 +08:00
iskrisis
069fd1dcb5
Update README.md 2021-02-28 18:09:15 +01:00
Timothy
fa03a1b959
Merge pull request #98 from jlsalvador/patch-1
Clarifies the status of DDNS for root domains
2021-03-01 00:53:19 +08:00
José Luis Salvador Rufo
17c9b6fa17
Clarifies the status of DDNS for root domains
Proposed by https://github.com/TimothyYe/godns/issues/76
2021-02-28 17:28:33 +01:00
Timothy
6dfbb60dfd
Merge pull request #96 from shaworth/patch-1
Location of config in container has changed
2021-02-24 10:37:46 +08:00
Timothy
07e5d7f99e
Update README.md 2021-02-24 10:30:28 +08:00
Shannon Haworth
10c67fa23a
Location of config in container has changed
Changed the documentation so that the binary will find the configuration file.
2021-02-23 02:57:15 -05:00
Timothy
afc6ba8241
update Makefile 2021-02-20 11:47:48 +08:00
Timothy
7ac3eed730
Merge branch 'master' of github.com:TimothyYe/godns 2021-02-20 11:40:59 +08:00
Timothy
ac7dc021eb
update Dockerfile 2021-02-20 11:40:35 +08:00
Timothy Ye
2154fcc762 update Makefile 2021-02-05 17:52:38 +00:00
Timothy
99af25e496
Merge pull request #94 from jlsalvador/patch-1
Update domain for Cloudflare
2021-01-31 00:37:43 +08:00
Timothy
dd4805df92
Update go.yml 2021-01-30 23:49:07 +08:00
José Luis Salvador Rufo
cdf32c509d
Update domain for Cloudflare
Fix #33
2021-01-29 14:24:06 +01:00
5 changed files with 27 additions and 25 deletions

View File

@ -7,10 +7,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.13.6
- name: Set up Go 1.15.7
uses: actions/setup-go@v1
with:
go-version: 1.13.6
go-version: 1.15.7
id: go
- name: Check out code into the Go module directory

View File

@ -2,13 +2,8 @@ FROM golang:alpine AS builder
RUN mkdir /godns
ADD . /godns/
WORKDIR /godns
RUN go build -o godns cmd/godns/godns.go
RUN CGO_ENABLED=0 go build -o godns cmd/godns/godns.go
FROM alpine
RUN apk add --no-cache ca-certificates tzdata
RUN mkdir /usr/local/godns
COPY --from=builder /godns/godns /usr/local/godns
RUN chmod +x /usr/local/godns/godns
RUN rm -rf /var/cache/apk/*
WORKDIR /usr/local/godns
ENTRYPOINT ["./godns", "-c", "/usr/local/godns/config.json"]
FROM gcr.io/distroless/base
COPY --from=builder /godns/godns /godns
ENTRYPOINT ["/godns"]

View File

@ -2,15 +2,15 @@
BINARY=godns
# Builds the project
build:
GO111MODULE=on go build cmd/godns/godns.go -o ${BINARY} -ldflags "-X main.Version=${VERSION}"
GO111MODULE=on go build -ldflags "-X main.Version=${VERSION}" -o ${BINARY} cmd/godns/godns.go
# Installs our project: copies binaries
install:
GO111MODULE=on go install
image:
# Build docker image
go clean
docker buildx build --platform linux/amd64,linux/386,linux/arm64,linux/arm/v7 -t timothyye/godns:${VERSION} . --push
docker buildx build --platform linux/amd64,linux/386,linux/arm64,linux/arm/v7 -t timothyye/godns:latest . --push
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t timothyye/godns:${VERSION} . --push
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 -t timothyye/godns:latest . --push
release:
# Clean
go clean

View File

@ -22,6 +22,8 @@
[GoDNS](https://github.com/TimothyYe/godns) is a dynamic DNS (DDNS) client tool. It is a rewrite in [Go](https://golang.org) of my early [DynDNS](https://github.com/TimothyYe/DynDNS) open source project.
Currently supports updating A records for subdomains. Doesn't support updating of root domains.
---
- [Supported DNS Providers](#supported-dns-providers)
- [Supported Platforms](#supported-platforms)
@ -59,16 +61,16 @@
---
## Supported DNS Providers
| Provider | IPv4 support | IPv6 support |
| ------------------------------------- | :----------------: | :----------------: |
| [Cloudflare][cloudflare] | :white_check_mark: | :white_check_mark: |
| [Google Domains][google.domains] | :white_check_mark: | :white_check_mark: |
| [DNSPod][dnspod] | :white_check_mark: | :white_check_mark: |
| [HE.net (Hurricane Electric)][he.net] | :white_check_mark: | :white_check_mark: |
| [AliDNS][alidns] | :white_check_mark: | :x: |
| [DuckDNS][duckdns] | :white_check_mark: | :white_check_mark: |
| [Dreamhost][dreamhost] | :white_check_mark: | :white_check_mark: |
| [No-IP][no-ip] | :white_check_mark: | :white_check_mark: |
| Provider | IPv4 support | IPv6 support | Root Domain | Subdomains |
| ------------------------------------- | :----------------: | :----------------: | :----------------: | :----------------: |
| [Cloudflare][cloudflare] | :white_check_mark: | :white_check_mark: | :white_check_mark: | :white_check_mark: |
| [Google Domains][google.domains] | :white_check_mark: | :white_check_mark: | :x: | :white_check_mark: |
| [DNSPod][dnspod] | :white_check_mark: | :white_check_mark: | :x: | :white_check_mark: |
| [HE.net (Hurricane Electric)][he.net] | :white_check_mark: | :white_check_mark: | :x: | :white_check_mark: |
| [AliDNS][alidns] | :white_check_mark: | :x: | :x: | :white_check_mark: |
| [DuckDNS][duckdns] | :white_check_mark: | :white_check_mark: | :x: | :white_check_mark: |
| [Dreamhost][dreamhost] | :white_check_mark: | :white_check_mark: | :x: | :white_check_mark: |
| [No-IP][no-ip] | :white_check_mark: | :white_check_mark: | :x: | :white_check_mark: |
[cloudflare]: https://cloudflare.com
[google.domains]: https://domains.google
@ -79,6 +81,8 @@
[dreamhost]: https://www.dreamhost.com
[no-ip]: https://www.noip.com
Tip: You can follow this [issue](https://github.com/TimothyYe/godns/issues/76) to view the current status of DDNS for root domains.
## Supported Platforms
* Linux
@ -582,7 +586,7 @@ With `/path/to/config.json` your local configuration file, run:
```bash
docker run \
-d --name godns --restart=always \
-v /path/to/config.json:/usr/local/godns/config.json \
-v /path/to/config.json:/config.json \
timothyye/godns:latest
```

View File

@ -128,6 +128,9 @@ func (handler *Handler) DomainLoop(domain *godns.Domain, panicChan chan<- godns.
// Check if record is present in domain conf
func recordTracked(domain *godns.Domain, record *DNSRecord) bool {
if record.Name == domain.DomainName {
return true
}
for _, subDomain := range domain.SubDomains {
sd := fmt.Sprintf("%s.%s", subDomain, domain.DomainName)
if record.Name == sd {