Commit Graph

482 Commits

Author SHA1 Message Date
dependabot[bot]
b96fc6e672
build(deps): bump docker/build-push-action from 4 to 5 (#859)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4 to 5.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-14 09:47:27 +08:00
dependabot[bot]
71827f57e5
build(deps): bump docker/setup-buildx-action from 2 to 3 (#858)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-12 20:59:18 +08:00
dependabot[bot]
3479baa62b
build(deps): bump docker/metadata-action from 4 to 5 (#857)
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 4 to 5.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Upgrade guide](https://github.com/docker/metadata-action/blob/master/UPGRADE.md)
- [Commits](https://github.com/docker/metadata-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-12 20:58:13 +08:00
dependabot[bot]
c637b2e229
build(deps): bump docker/login-action from 2 to 3 (#856)
Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-12 20:57:54 +08:00
dependabot[bot]
11865d9dd1
build(deps): bump goreleaser/goreleaser-action from 4 to 5 (#855)
Bumps [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) from 4 to 5.
- [Release notes](https://github.com/goreleaser/goreleaser-action/releases)
- [Commits](https://github.com/goreleaser/goreleaser-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: goreleaser/goreleaser-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-12 20:57:33 +08:00
dependabot[bot]
86a595b223
build(deps): bump docker/setup-qemu-action from 2 to 3 (#854)
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-12 20:57:14 +08:00
A1lo
0e620feaa9
feat: save data-theme state in localstorage (#850)
* feat: save data-theme state in localstorage

* fix: prefer the state in localstorage than the scheme preference

* do not save state when using default theme

* fix: determine the correct theme mode
2023-09-10 05:30:51 -07:00
dependabot[bot]
fb931d84cc
build(deps): bump actions/checkout from 3 to 4 (#838)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 18:27:57 +08:00
WaterLemons2k
12debf4154
ci: issues-similarity-analysis (#837) 2023-09-04 16:47:05 +08:00
WaterLemons2k
5b77583b49
refactor: set InsecureSkipVerify only once (#822) 2023-08-17 16:37:09 +08:00
WaterLemons2k
98756f2124
refactor: set custom DNS server only once (#821)
* refactor: set custom DNS server only once

Every time an HTTP client is created, an attempt is made to modify the `dialer.Resolver`.

So now it only attempts to change the `dialer.Resolver` once when necessary (e.g. by passing the `-dns` parameter or running the `WaitForNetworkConnected` function).

Also, rename `dns.go` and `dns_test.go` to `net_resolver.go` and `net_resolver_test.go`

---

Move `wait_net.go` to the `internal` package to prevent it from being mistaken as a DNS provider.

Ignore false positive.

* test(net_resolver): clean up after testing
2023-08-17 15:29:19 +08:00
WaterLemons2k
8bfd2afa1d
docs: use new note syntax [skip ci] (#817)
* docs: use new note syntax

https://github.com/orgs/community/discussions/16925#discussioncomment-6506860

* docs: no line break [skip ci]
2023-08-12 21:26:40 +08:00
WaterLemons2k
352e6b8762
feat: self update (#806)
Added package `update` and `semver` that can be used for selfupdate.

Most of the code was copied from [go-selfupdate](https://github.com/creativeprojects/go-selfupdate), [go-update](https://github.com/inconshreveable/go-update) and [semver](https://github.com/Masterminds/semver). Most of the unneeded code has been removed, so there is no need to add new dependencies.

In addition, users with the `mips` arch will not be able to selfupdate, as there is no way to get the float of the MIPS arch.

Tested OS and arch:
- [x] linux/amd64
- [x] linux/arm64
- [x] windows/amd64
2023-08-06 18:56:53 +08:00
jeessy2
57b3aa6fe0
docs: namecheap don't supports ipv6 ddns (#805) 2023-08-04 19:24:46 +08:00
老卫同学
5fa178381f
支持namesilo (#796)
* 支持namesilo
2023-08-04 19:16:31 +08:00
jeessy2
fb9efd27bf
chore: updrade dependencies (#789) 2023-07-26 23:40:16 +08:00
WaterLemons2k
3d87280ff8
fix(service): add missing flags to Arguments (#788)
Co-authored-by: nikkoozz <58021642+nikkoozz@users.noreply.github.com>
2023-07-26 08:21:19 -07:00
WaterLemons2k
6bc09d799c
feat(web): validate password (#779)
* feat(web): validate password

https://github.com/wagslane/go-password-validator

* fix: validate password only if password is non-empty
2023-07-21 14:43:58 +08:00
WaterLemons2k
b486804b50
chore: get HEAD commit when version is missing tag (#777)
Also, add more instructions to `bug_report.yml` on how to find
the ddns-go version.
2023-07-20 21:45:23 +08:00
jeessy2
68c59d0fb7
feat: Making saving more secure (#773)
* feat: Making saving more secure
2023-07-19 21:59:56 +08:00
WaterLemons2k
89363a78d1
fix: no more Restricted Shell (#772) 2023-07-19 17:00:30 +08:00
WaterLemons2k
e009a82a47
fix(GoDaddy): use @ as name when subdomain is missing (#770) 2023-07-14 16:21:28 +08:00
WaterLemons2k
b66340e2e4
fix: typos (#766) 2023-07-11 20:55:54 +08:00
WaterLemons2k
b7bc021425
docs: improve ISSUE_TEMPLATEs [skip ci] (#763)
* docs: improve ISSUE_TEMPLATEs

* docs(feature_request): add checklist [skip ci]
2023-07-08 21:32:54 +08:00
WaterLemons2k
4d33865890
fix: set DNS server when err contains loopback server (#748)
* docs: android needs a custom DNS server

* fix: set DNS server when is Termux

* fix: set DNS server when err contains `[::1]:53`

* docs: indicates that a DNS server wii be sets if err contains loopback server
2023-06-21 17:52:35 +08:00
WaterLemons2k
37c567b957
docs: install with Homebrew (#743) 2023-06-17 22:43:34 -07:00
WaterLemons2k
c24cd1223e
ci(release): add homebrew (#741) 2023-06-15 17:19:32 +08:00
WaterLemons2k
e283f7a9c8
chore(web): hide DnsID when idLabel is empty (#739)
* chore(web): hide `DnsID` when `idLabel` is empty

* fix: do not disable when `idLabel` is empty
2023-06-14 20:57:43 +08:00
WaterLemons2k
841031505b
fix(wait_net): use util.CreateHTTPClient to get URL (#737) 2023-06-13 17:21:42 +08:00
WaterLemons2k
8e5ba0a399
feat: no more delay on first run (#728)
* feat: no more delay on first run

To do this, make sure the service waits for the network to be ready
before starting.

* chore: remove outdated comment

* feat: WaitForNetworkConnected

* feat: use `endPoint` as the domain to test network
2023-06-07 19:02:16 +08:00
WaterLemons2k
49b0511d24
fix: add -v flag to output version (#722) 2023-06-05 09:18:07 +08:00
WaterLemons2k
35d6ac7cc2
fix(open_explorer): don't execute command on Termux (#718)
* fix(open_explorer): don't execute command on Termux

* fix: build arm64 in the `test` CI
2023-06-03 09:51:28 +08:00
WaterLemons2k
412777b011
fix(config): print log when gettype is unknown (#719) 2023-06-02 22:20:55 +08:00
WaterLemons2k
6151c3be09
fix(domains): DomainName does not match with staticMainDomain when the query string exists (#716)
* fix(domains): `DomainName` does not match with `staticMainDomain` when the query string exists

* fix: wrong example comment
2023-05-30 16:30:40 +08:00
WaterLemons2k
6645d78924
feat: support DNSPod API 3.0 (#713)
* feat: support Tencent Cloud DNSPod API 3.0

https://cloud.tencent.com/document/api/1427/56193

* chore: no longer need `tencentCloudHost`

* chore(TencentCloudSigner): no longer used `fmt`

* perf(TencentCloudSigner): use `strings.Builder` to build strings

https://pkg.go.dev/strings#Builder
2023-05-26 22:36:06 +08:00
feranwq
89166e69e6
fix: Fix the problem that ip cache time is one less (#712) 2023-05-26 18:49:31 +08:00
feranwq
d69bbe6e0f
feat: ip cache time configable (#708) 2023-05-25 16:51:50 +08:00
WaterLemons2k
cc9be6ef79
fix(webhook): notification when RequestBody JSON is invalid (#705)
* fix(webhook): RequestBody must be valid JSON

* fix: notification when JSON is invalid

* feat: hasJSONPrefix

6c71a7e4fe/cmd/fpt/script.go (L292)
d6f2a52155/lib/utils/jsontools.go (L49)
2023-05-22 22:52:55 +08:00
Guten Ye
73ea376ce7
feat: webhook supports headers (#626)
* feat: webhook supports headers

* change rows to 1

* WebhookRequestHeaders改成WebhookHeaders

* 简化parts[0]

* 默认\r\n

* RequestHeaders -> WebhookHeaders

* fix test

* change new line break

* RequestHeaders -> Headers
2023-05-10 14:00:18 +08:00
WaterLemons2k
39330ca62c
Revert #656 (#697) 2023-05-08 17:40:01 +08:00
WaterLemons2k
7cf96bd9e2
docs(namecheap): IPv6 is not supported (#692)
* fix(namecheap): IPv6 is not supported

Ref: https://www.namecheap.com/support/knowledgebase/article.aspx/29/11/how-to-dynamically-update-the-hosts-ip-with-an-http-request/

> NOTE: It is only possible to dynamically update IPv4 addresses (A records) at this time. Currently, IPv6 is not supported by our Dynamic DNS.

* chore: typo [skip ci]
2023-04-29 09:27:02 +08:00
jeessy2
39bfef88d6
feat: save from the public network within 5 minutes (#688) 2023-04-24 21:13:05 +08:00
WaterLemons2k
d42a7e2eb8
feat: custom DNS server (#682)
* feat: custom DNS server
2023-04-24 20:52:33 +08:00
WaterLemons2k
7aa0b18107
ci: success in forked repository (#670)
There're two workflows in forked repository that will fail: `docker-image.yml` and `release.yml`.

`docker-image.yml` fails because the secrets it needs does not exist in forked repository. Running it only in the `jeessy2/ddns-go` repository to fix this.

`release.yml` fails because the default `GITHUB_TOKEN` permission is now read-only. Add `contents: write` to fix this.

References:
- https://docs.github.com/actions/using-workflows/workflow-syntax-for-github-actions#example-only-run-job-for-specific-repository
- https://github.blog/changelog/2023-02-02-github-actions-updating-the-default-github_token-permissions-to-read-only/
- https://github.com/goreleaser/goreleaser-action#environment-variables
2023-04-12 23:58:59 +08:00
jeessy2
62bd1424ab docs: format webhook json 2023-04-10 18:20:15 +08:00
PairZhu
309385417f
feat: Optimize the front-end logs code (#663) 2023-04-09 21:27:43 +08:00
WaterLemons2k
ee8162760b
feat: checkbox to disable Webhook (#656)
* feat: checkbox to enable Webhook

* fix: true when `webhookenable` key missing

* feat: `WebhookStatus` button

* chore: better comment for `getWebhookStatus`

* feat: reuse checkbox

The button is no longer used.

* chore: move `WebhookStatus` above `WebhookURL` [skip ci]

* refactor(`getWebhookStatus`): use conditional operator

https://developer.mozilla.org/docs/Web/JavaScript/Reference/Operators/Conditional_Operator

* refactor(`WebhookStatus`): moves the part that changes the value to `addEventListener`

Add a new function `isWebhookStatusDisable`.

* feat: checkbox to disable Webhook

* chore(html): re-add blank line [skip ci]
2023-04-04 20:49:43 +08:00
WaterLemons2k
947ff9832d
fix: If Bash does not exist, use sh (#654)
* fix: If Bash does not exist, use sh

https://gist.github.com/miguelmota/ed4ec562b8cd1781e7b20151b37de8a0
2023-03-30 20:21:29 +08:00
jeessy2
55f4462d03
ci(stale): 'days-before-stale' change to 30 (#647) 2023-03-24 23:45:34 +08:00
dependabot[bot]
8587a4766f
build(deps): bump actions/stale from 7 to 8 (#645)
Bumps [actions/stale](https://github.com/actions/stale) from 7 to 8.
- [Release notes](https://github.com/actions/stale/releases)
- [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/stale/compare/v7...v8)

---
updated-dependencies:
- dependency-name: actions/stale
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-24 23:41:44 +08:00