Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: github.com/jeessy2/ddns-go/v5 #607

Merged
merged 1 commit into from
Mar 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ddns-go

[![GitHub release](https://img.shields.io/github/release/jeessy2/ddns-go.svg?logo=github&style=flat-square) ![GitHub release downloads](https://img.shields.io/github/downloads/jeessy2/ddns-go/total?logo=github)](https://github.com/jeessy2/ddns-go/releases/latest) [![Go version](https://img.shields.io/github/go-mod/go-version/jeessy2/ddns-go)](https://github.com/jeessy2/ddns-go/blob/master/go.mod) [![](https://goreportcard.com/badge/github.com/jeessy2/ddns-go/v4)](https://goreportcard.com/report/github.com/jeessy2/ddns-go/v4) [![](https://img.shields.io/docker/image-size/jeessy/ddns-go)](https://registry.hub.docker.com/r/jeessy/ddns-go) [![](https://img.shields.io/docker/pulls/jeessy/ddns-go)](https://registry.hub.docker.com/r/jeessy/ddns-go)
[![GitHub release](https://img.shields.io/github/release/jeessy2/ddns-go.svg?logo=github&style=flat-square) ![GitHub release downloads](https://img.shields.io/github/downloads/jeessy2/ddns-go/total?logo=github)](https://github.com/jeessy2/ddns-go/releases/latest) [![Go version](https://img.shields.io/github/go-mod/go-version/jeessy2/ddns-go)](https://github.com/jeessy2/ddns-go/blob/master/go.mod) [![](https://goreportcard.com/badge/github.com/jeessy2/ddns-go/v5)](https://goreportcard.com/report/github.com/jeessy2/ddns-go/v5) [![](https://img.shields.io/docker/image-size/jeessy/ddns-go)](https://registry.hub.docker.com/r/jeessy/ddns-go) [![](https://img.shields.io/docker/pulls/jeessy/ddns-go)](https://registry.hub.docker.com/r/jeessy/ddns-go)

自动获得你的公网 IPv4 或 IPv6 地址,并解析到对应的域名服务。

Expand Down
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"strings"
"sync"

"github.com/jeessy2/ddns-go/v4/util"
"github.com/jeessy2/ddns-go/v5/util"
"gopkg.in/yaml.v3"
)

Expand Down
2 changes: 1 addition & 1 deletion config/domains.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/url"
"strings"

"github.com/jeessy2/ddns-go/v4/util"
"github.com/jeessy2/ddns-go/v5/util"
)

// 固定的主域名
Expand Down
2 changes: 1 addition & 1 deletion config/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"net/url"
"strings"

"github.com/jeessy2/ddns-go/v4/util"
"github.com/jeessy2/ddns-go/v5/util"
)

// Webhook Webhook
Expand Down
4 changes: 2 additions & 2 deletions dns/alidns.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"net/http"
"net/url"

"github.com/jeessy2/ddns-go/v4/config"
"github.com/jeessy2/ddns-go/v4/util"
"github.com/jeessy2/ddns-go/v5/config"
"github.com/jeessy2/ddns-go/v5/util"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions dns/baidu.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"net/http"
"strconv"

"github.com/jeessy2/ddns-go/v4/config"
"github.com/jeessy2/ddns-go/v4/util"
"github.com/jeessy2/ddns-go/v5/config"
"github.com/jeessy2/ddns-go/v5/util"
)

// https://cloud.baidu.com/doc/BCD/s/4jwvymhs7
Expand Down
4 changes: 2 additions & 2 deletions dns/callback.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"net/url"
"strings"

"github.com/jeessy2/ddns-go/v4/config"
"github.com/jeessy2/ddns-go/v4/util"
"github.com/jeessy2/ddns-go/v5/config"
"github.com/jeessy2/ddns-go/v5/util"
)

type Callback struct {
Expand Down
4 changes: 2 additions & 2 deletions dns/cloudflare.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"net/http"
"strconv"

"github.com/jeessy2/ddns-go/v4/config"
"github.com/jeessy2/ddns-go/v4/util"
"github.com/jeessy2/ddns-go/v5/config"
"github.com/jeessy2/ddns-go/v5/util"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions dns/dnspod.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"log"
"net/url"

"github.com/jeessy2/ddns-go/v4/config"
"github.com/jeessy2/ddns-go/v4/util"
"github.com/jeessy2/ddns-go/v5/config"
"github.com/jeessy2/ddns-go/v5/util"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions dns/godaddy.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"net/http"
"strconv"

"github.com/jeessy2/ddns-go/v4/config"
"github.com/jeessy2/ddns-go/v4/util"
"github.com/jeessy2/ddns-go/v5/config"
"github.com/jeessy2/ddns-go/v5/util"
)

type godaddyRecord struct {
Expand Down
8 changes: 4 additions & 4 deletions dns/google_domain.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"net/url"
"strings"

"github.com/jeessy2/ddns-go/v4/config"
"github.com/jeessy2/ddns-go/v4/util"
"github.com/jeessy2/ddns-go/v5/config"
"github.com/jeessy2/ddns-go/v5/util"
)

const (
Expand All @@ -18,8 +18,8 @@ const (
// https://support.google.com/domains/answer/6147083?hl=zh-Hans#zippy=%2C使用-api-更新您的动态-dns-记录
// GoogleDomain Google Domain
type GoogleDomain struct {
DNS config.DNS
Domains config.Domains
DNS config.DNS
Domains config.Domains
}

// GoogleDomainResp 修改域名解析结果
Expand Down
10 changes: 5 additions & 5 deletions dns/huawei.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"net/http"
"strconv"

"github.com/jeessy2/ddns-go/v4/config"
"github.com/jeessy2/ddns-go/v4/util"
"github.com/jeessy2/ddns-go/v5/config"
"github.com/jeessy2/ddns-go/v5/util"
)

const (
Expand All @@ -19,9 +19,9 @@ const (
// https://support.huaweicloud.com/api-dns/dns_api_64001.html
// Huaweicloud Huaweicloud
type Huaweicloud struct {
DNS config.DNS
Domains config.Domains
TTL int
DNS config.DNS
Domains config.Domains
TTL int
}

// HuaweicloudZonesResp zones response
Expand Down
4 changes: 2 additions & 2 deletions dns/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"log"
"time"

"github.com/jeessy2/ddns-go/v4/config"
"github.com/jeessy2/ddns-go/v4/util"
"github.com/jeessy2/ddns-go/v5/config"
"github.com/jeessy2/ddns-go/v5/util"
)

// DNS interface
Expand Down
4 changes: 2 additions & 2 deletions dns/porkbun.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"log"
"net/http"

"github.com/jeessy2/ddns-go/v4/config"
"github.com/jeessy2/ddns-go/v4/util"
"github.com/jeessy2/ddns-go/v5/config"
"github.com/jeessy2/ddns-go/v5/util"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/jeessy2/ddns-go/v4
module github.com/jeessy2/ddns-go/v5

go 1.19

Expand All @@ -7,4 +7,4 @@ require (
gopkg.in/yaml.v3 v3.0.1
)

require golang.org/x/sys v0.0.0-20220730100132-1609e554cd39 // indirect
require golang.org/x/sys v0.6.0 // indirect
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
github.com/kardianos/service v1.2.2 h1:ZvePhAHfvo0A7Mftk/tEzqEZ7Q4lgnR8sGz4xu1YX60=
github.com/kardianos/service v1.2.2/go.mod h1:CIMRFEJVL+0DS1a3Nx06NaMn4Dz63Ng6O7dl0qH0zVM=
golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20220730100132-1609e554cd39 h1:aNCnH+Fiqs7ZDTFH6oEFjIfbX2HvgQXJ6uQuUbTobjk=
golang.org/x/sys v0.0.0-20220730100132-1609e554cd39/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
Expand Down
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ import (
"strconv"
"time"

"github.com/jeessy2/ddns-go/v4/config"
"github.com/jeessy2/ddns-go/v4/dns"
"github.com/jeessy2/ddns-go/v4/util"
"github.com/jeessy2/ddns-go/v4/web"
"github.com/jeessy2/ddns-go/v5/config"
"github.com/jeessy2/ddns-go/v5/dns"
"github.com/jeessy2/ddns-go/v5/util"
"github.com/jeessy2/ddns-go/v5/web"
"github.com/kardianos/service"
)

Expand Down
4 changes: 2 additions & 2 deletions web/basic_auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"strings"
"time"

"github.com/jeessy2/ddns-go/v4/config"
"github.com/jeessy2/ddns-go/v4/util"
"github.com/jeessy2/ddns-go/v5/config"
"github.com/jeessy2/ddns-go/v5/util"
)

// ViewFunc func
Expand Down
2 changes: 1 addition & 1 deletion web/netInterfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"net/http"

"github.com/jeessy2/ddns-go/v4/config"
"github.com/jeessy2/ddns-go/v5/config"
)

// Ipv4NetInterfaces 获得Ipv4网卡信息
Expand Down
6 changes: 3 additions & 3 deletions web/save.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"strings"
"time"

"github.com/jeessy2/ddns-go/v4/config"
"github.com/jeessy2/ddns-go/v4/dns"
"github.com/jeessy2/ddns-go/v4/util"
"github.com/jeessy2/ddns-go/v5/config"
"github.com/jeessy2/ddns-go/v5/dns"
"github.com/jeessy2/ddns-go/v5/util"
)

var startTime = time.Now().Unix()
Expand Down
2 changes: 1 addition & 1 deletion web/webhookTest.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/http"
"strings"

"github.com/jeessy2/ddns-go/v4/config"
"github.com/jeessy2/ddns-go/v5/config"
)

// WebhookTest 测试webhook
Expand Down
2 changes: 1 addition & 1 deletion web/writing.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"os"
"strings"

"github.com/jeessy2/ddns-go/v4/config"
"github.com/jeessy2/ddns-go/v5/config"
)

//go:embed writing.html
Expand Down