mirror of
https://github.com/cmur2/dyndnsd.git
synced 2025-08-08 08:33:56 +02:00
Compare commits
197 Commits
v3.4.8
...
dependabot
Author | SHA1 | Date | |
---|---|---|---|
![]() |
26dc6bb6ec | ||
1171e0cb92 | |||
6a933194f3 | |||
e546d03d9f | |||
![]() |
65d52675c9 | ||
![]() |
636d6f6379 | ||
![]() |
26381244aa | ||
![]() |
d51937c68b | ||
![]() |
dbc4073b66 | ||
![]() |
d83f8d8e69 | ||
95acdcbc70 | |||
![]() |
38fdf44c1f | ||
![]() |
e3d57ea3aa | ||
![]() |
90166c8ef2 | ||
![]() |
98b413eb6b | ||
![]() |
43df61b819 | ||
![]() |
8ee945ed31 | ||
![]() |
1ae0642541 | ||
![]() |
be33b1917a | ||
![]() |
e6c9773b8e | ||
![]() |
5a54dbe0c7 | ||
![]() |
aa20275888 | ||
![]() |
049e14afa5 | ||
![]() |
54544b75d1 | ||
![]() |
3274741721 | ||
![]() |
8d8a85a78f | ||
![]() |
cdfe350828 | ||
![]() |
337c86f47b | ||
![]() |
20d359f328 | ||
![]() |
4cf6591f38 | ||
![]() |
5a9244694a | ||
![]() |
015ee60420 | ||
![]() |
2d4b94c129 | ||
![]() |
aefd59aea8 | ||
![]() |
10fd5699ac | ||
![]() |
ecf425dd61 | ||
![]() |
70ad2148b9 | ||
![]() |
93e252443a | ||
![]() |
d9f0119ab8 | ||
![]() |
bf225b8e6a | ||
![]() |
6a9e05fb97 | ||
![]() |
bc4210d5ce | ||
![]() |
a54235fcf2 | ||
![]() |
be87ba8f31 | ||
![]() |
5e947316f6 | ||
c71b23d35e | |||
2258edaae6 | |||
![]() |
f8878077cf | ||
![]() |
2deb5f3337 | ||
![]() |
ca92b894cb | ||
e45902f5cf | |||
![]() |
9ae88964ec | ||
![]() |
90ae7543d7 | ||
![]() |
37413bcd3b | ||
![]() |
7af351c384 | ||
![]() |
68dac5c6f3 | ||
![]() |
c7130c7ee4 | ||
![]() |
3c3c1fcb24 | ||
![]() |
425318a0d1 | ||
![]() |
c2eda1648b | ||
![]() |
d72cfeddd8 | ||
![]() |
6463999ab4 | ||
![]() |
b56922c3c8 | ||
![]() |
71666776b4 | ||
![]() |
c4e6e16afb | ||
![]() |
05f86550be | ||
![]() |
edcd7e1e47 | ||
![]() |
6f29034aef | ||
dd7553d5fd | |||
![]() |
a21f6a4cad | ||
![]() |
31a7f54827 | ||
![]() |
d415451c8e | ||
![]() |
699c907a84 | ||
![]() |
1ad23c8716 | ||
![]() |
c538a6b07f | ||
![]() |
fe3f17cd02 | ||
![]() |
0e9b17cb0b | ||
![]() |
0f793f92d8 | ||
![]() |
0fd3833b9c | ||
![]() |
5bc5977704 | ||
![]() |
684d1f0578 | ||
![]() |
14bac86e9d | ||
![]() |
12afe16a78 | ||
![]() |
75059044de | ||
![]() |
9f7ebfe59c | ||
![]() |
ac42413580 | ||
![]() |
415bb36754 | ||
481504f174 | |||
![]() |
d68a93a94f | ||
![]() |
69d2378747 | ||
![]() |
ac929f65aa | ||
f648c28f18 | |||
![]() |
2e6e69810e | ||
![]() |
e9398eab71 | ||
65f8dbb21b | |||
![]() |
6b6f6cf3a4 | ||
![]() |
9af4f03013 | ||
![]() |
b77c3b0996 | ||
![]() |
600cbeb453 | ||
![]() |
b2d369cc4c | ||
![]() |
31e73c7c4a | ||
![]() |
52874542a7 | ||
![]() |
1daf68376d | ||
![]() |
b5f5fa9105 | ||
![]() |
ea1d4baa04 | ||
![]() |
944d3fbc5d | ||
![]() |
78721c5b15 | ||
![]() |
fce992b842 | ||
![]() |
a2a51d63ac | ||
![]() |
b19213d099 | ||
![]() |
ede79802d3 | ||
![]() |
d4483b02a2 | ||
![]() |
1fbad10a24 | ||
![]() |
da28c76a68 | ||
![]() |
e5c66824ab | ||
3d787a46ea | |||
3a5b1bcb27 | |||
![]() |
d066b3ecee | ||
![]() |
71b0fda5ee | ||
b1e948a2dc | |||
![]() |
e22035919b | ||
![]() |
1ffd1de964 | ||
![]() |
39c7dc7837 | ||
![]() |
7528e8084e | ||
![]() |
343a56a6ba | ||
![]() |
6111edc067 | ||
![]() |
0e0d9dfc86 | ||
fadaf4840c | |||
![]() |
9281e6958b | ||
![]() |
ec1e836a89 | ||
![]() |
d80268c1b8 | ||
![]() |
d04e039b2a | ||
![]() |
c14618c503 | ||
![]() |
0e700e8b7b | ||
![]() |
d256c86420 | ||
![]() |
a589148d9e | ||
![]() |
232b3f32a2 | ||
![]() |
3c83eb4347 | ||
![]() |
800618f434 | ||
![]() |
1e61a12b48 | ||
![]() |
7bcaf18f7e | ||
![]() |
c0d69f591f | ||
![]() |
2228e742cf | ||
![]() |
e7f528377b | ||
![]() |
537682804f | ||
![]() |
7ffab915ac | ||
![]() |
d515a87640 | ||
![]() |
4a7eba5ad6 | ||
![]() |
52bb8ee9d2 | ||
![]() |
eb1d88807b | ||
![]() |
7c2104b0ce | ||
4237d35fcc | |||
![]() |
451ed20f5d | ||
![]() |
a2879c6c9a | ||
![]() |
f882381f9d | ||
![]() |
fb536da665 | ||
![]() |
49b7b07b52 | ||
![]() |
2854155db2 | ||
![]() |
b40c6f8c30 | ||
![]() |
44605f0f04 | ||
![]() |
63bf4123bd | ||
![]() |
990d4617e8 | ||
![]() |
0030e41a8d | ||
![]() |
97a913f97c | ||
![]() |
b1ff774a55 | ||
![]() |
683767ed8c | ||
![]() |
a45c1cca82 | ||
![]() |
0a053ad577 | ||
![]() |
51eae6da2f | ||
![]() |
fa1d9c7e30 | ||
![]() |
b56adc8b79 | ||
![]() |
88c8bcefeb | ||
![]() |
6c8510910a | ||
![]() |
6faae0d0fd | ||
![]() |
3b34e00fc3 | ||
![]() |
d1463cc790 | ||
![]() |
aea182efcb | ||
![]() |
990dc14a48 | ||
558445af2e | |||
3f784ccaa1 | |||
dbc61d72fb | |||
2838ad9eae | |||
![]() |
84e513b4a2 | ||
![]() |
0a4a052cc9 | ||
![]() |
b9f0a07aba | ||
![]() |
cb9f6f7027 | ||
12dcc3eb42 | |||
90f4442e94 | |||
![]() |
193997958f | ||
9eb9849004 | |||
![]() |
4df5b8fa63 | ||
![]() |
45b522f7cc | ||
![]() |
817dd810e3 | ||
09461aa013 | |||
![]() |
367a542f74 | ||
![]() |
6642d9a7a2 | ||
9580f1478f |
17
.github/actionlint-matcher.json
vendored
Normal file
17
.github/actionlint-matcher.json
vendored
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"problemMatcher": [
|
||||||
|
{
|
||||||
|
"owner": "actionlint",
|
||||||
|
"pattern": [
|
||||||
|
{
|
||||||
|
"regexp": "^(?:\\x1b\\[\\d+m)?(.+?)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*: (?:\\x1b\\[\\d+m)*(.+?)(?:\\x1b\\[\\d+m)* \\[(.+?)\\]$",
|
||||||
|
"file": 1,
|
||||||
|
"line": 2,
|
||||||
|
"column": 3,
|
||||||
|
"message": 4,
|
||||||
|
"code": 5
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
13
.github/dependabot.yml
vendored
Normal file
13
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: "bundler"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
commit-message:
|
||||||
|
prefix: "gems"
|
||||||
|
labels: ["dependabot"]
|
||||||
|
open-pull-requests-limit: 10
|
||||||
|
pull-request-branch-name:
|
||||||
|
separator: "-"
|
13
.github/renovate.json5
vendored
13
.github/renovate.json5
vendored
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
extends: [
|
extends: [
|
||||||
"config:base",
|
"config:recommended",
|
||||||
":dependencyDashboard",
|
":dependencyDashboard",
|
||||||
":prHourlyLimitNone",
|
":prHourlyLimitNone",
|
||||||
":prConcurrentLimitNone",
|
":prConcurrentLimitNone",
|
||||||
@@ -20,24 +20,19 @@
|
|||||||
matchManagers: ["bundler"],
|
matchManagers: ["bundler"],
|
||||||
enabled: false,
|
enabled: false,
|
||||||
},
|
},
|
||||||
// prevent minor updates to Alpine 3.14 due to https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.14.0#faccessat2
|
|
||||||
{
|
|
||||||
matchManagers: ["dockerfile"],
|
|
||||||
matchUpdateTypes: ["minor"],
|
|
||||||
enabled: false,
|
|
||||||
},
|
|
||||||
// Commit message formats
|
// Commit message formats
|
||||||
{
|
{
|
||||||
matchDatasources: ["docker"],
|
matchDatasources: ["docker"],
|
||||||
commitMessagePrefix: "docker: ",
|
commitMessagePrefix: "docker: ",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
matchDatasources: ["github-actions"],
|
matchManagers: ["github-actions"],
|
||||||
commitMessagePrefix: "ci: ",
|
commitMessagePrefix: "ci: ",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
regexManagers: [
|
customManagers: [
|
||||||
{
|
{
|
||||||
|
customType: "regex",
|
||||||
fileMatch: ["\.rb$", "^Rakefile$"],
|
fileMatch: ["\.rb$", "^Rakefile$"],
|
||||||
matchStrings: [
|
matchStrings: [
|
||||||
"renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)\\s.*_version = '(?<currentValue>.*)'\\s"
|
"renovate: datasource=(?<datasource>.*?) depName=(?<depName>.*?)\\s.*_version = '(?<currentValue>.*)'\\s"
|
||||||
|
12
.github/workflows/cd.yml
vendored
12
.github/workflows/cd.yml
vendored
@@ -1,3 +1,4 @@
|
|||||||
|
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
||||||
---
|
---
|
||||||
name: cd
|
name: cd
|
||||||
|
|
||||||
@@ -10,11 +11,11 @@ jobs:
|
|||||||
release-dockerimage:
|
release-dockerimage:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Extract dyndnsd version from tag name
|
- name: Extract dyndnsd version from tag name
|
||||||
run: |
|
run: |
|
||||||
echo "DYNDNSD_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
|
echo "DYNDNSD_VERSION=${GITHUB_REF#refs/*/v}" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
- name: Wait for dyndnsd ${{ env.DYNDNSD_VERSION }} gem to be available
|
- name: Wait for dyndnsd ${{ env.DYNDNSD_VERSION }} gem to be available
|
||||||
run: |
|
run: |
|
||||||
@@ -22,6 +23,7 @@ jobs:
|
|||||||
for retry in $(seq 1 5); do
|
for retry in $(seq 1 5); do
|
||||||
echo "Checking if dyndnsd $DYNDNSD_VERSION gem is retrievable from rubygems.org (try #$retry)..."
|
echo "Checking if dyndnsd $DYNDNSD_VERSION gem is retrievable from rubygems.org (try #$retry)..."
|
||||||
sudo gem install dyndnsd -v "$DYNDNSD_VERSION"
|
sudo gem install dyndnsd -v "$DYNDNSD_VERSION"
|
||||||
|
# shellcheck disable=SC2181
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
@@ -31,16 +33,16 @@ jobs:
|
|||||||
|
|
||||||
# https://github.com/marketplace/actions/build-and-push-docker-images
|
# https://github.com/marketplace/actions/build-and-push-docker-images
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v1
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Login to Docker Hub
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v1
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
username: cmur2
|
username: cmur2
|
||||||
password: ${{ secrets.DOCKER_TOKEN }}
|
password: ${{ secrets.DOCKER_TOKEN }}
|
||||||
|
|
||||||
- name: Build and push Docker image for dyndnsd ${{ env.DYNDNSD_VERSION }}
|
- name: Build and push Docker image for dyndnsd ${{ env.DYNDNSD_VERSION }}
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: docker
|
context: docker
|
||||||
build-args: |
|
build-args: |
|
||||||
|
30
.github/workflows/ci.yml
vendored
30
.github/workflows/ci.yml
vendored
@@ -1,3 +1,4 @@
|
|||||||
|
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
||||||
---
|
---
|
||||||
name: ci
|
name: ci
|
||||||
|
|
||||||
@@ -14,14 +15,15 @@ jobs:
|
|||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
ruby-version:
|
ruby-version:
|
||||||
- '2.5'
|
|
||||||
- '2.6'
|
|
||||||
- '2.7'
|
|
||||||
- '3.0'
|
- '3.0'
|
||||||
|
- '3.1'
|
||||||
|
- '3.2'
|
||||||
|
- '3.3'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
- name: Set up Ruby ${{ matrix.ruby-version }}
|
- name: Set up Ruby ${{ matrix.ruby-version }}
|
||||||
uses: ruby/setup-ruby@v1
|
uses: ruby/setup-ruby@v1
|
||||||
with:
|
with:
|
||||||
@@ -31,3 +33,23 @@ jobs:
|
|||||||
- name: Lint and Test
|
- name: Lint and Test
|
||||||
run: |
|
run: |
|
||||||
bundle exec rake ci
|
bundle exec rake ci
|
||||||
|
|
||||||
|
actionlint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Check workflow files
|
||||||
|
run: |
|
||||||
|
echo "::add-matcher::.github/actionlint-matcher.json"
|
||||||
|
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
|
||||||
|
./actionlint
|
||||||
|
|
||||||
|
renovate-config-validator:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: ghcr.io/renovatebot/renovate
|
||||||
|
options: --user root
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Check Renovate config
|
||||||
|
run: renovate-config-validator --strict
|
||||||
|
1
.github/workflows/dockerhub.yml
vendored
1
.github/workflows/dockerhub.yml
vendored
@@ -1,3 +1,4 @@
|
|||||||
|
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
||||||
---
|
---
|
||||||
name: dockerhub
|
name: dockerhub
|
||||||
|
|
||||||
|
8
.github/workflows/vulnscan.yml
vendored
8
.github/workflows/vulnscan.yml
vendored
@@ -1,3 +1,4 @@
|
|||||||
|
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
||||||
---
|
---
|
||||||
name: vulnscan
|
name: vulnscan
|
||||||
|
|
||||||
@@ -10,15 +11,14 @@ jobs:
|
|||||||
scan-released-dockerimages:
|
scan-released-dockerimages:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
TRIVY_LIGHT: 'true'
|
|
||||||
TRIVY_IGNORE_UNFIXED: 'true'
|
TRIVY_IGNORE_UNFIXED: 'true'
|
||||||
TRIVY_REMOVED_PKGS: 'true'
|
TRIVY_REMOVED_PKGS: 'true'
|
||||||
steps:
|
steps:
|
||||||
- name: Install Trivy
|
- name: Install Trivy
|
||||||
run: |
|
run: |
|
||||||
mkdir -p $GITHUB_WORKSPACE/bin
|
mkdir -p "$GITHUB_WORKSPACE/bin"
|
||||||
echo "$GITHUB_WORKSPACE/bin" >> "$GITHUB_PATH"
|
echo "$GITHUB_WORKSPACE/bin" >> "$GITHUB_PATH"
|
||||||
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/master/contrib/install.sh | sh -s -- -b $GITHUB_WORKSPACE/bin
|
curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/master/contrib/install.sh | sh -s -- -b "$GITHUB_WORKSPACE/bin"
|
||||||
- name: Download Trivy DB
|
- name: Download Trivy DB
|
||||||
run: |
|
run: |
|
||||||
trivy image --download-db-only
|
trivy image --download-db-only
|
||||||
@@ -36,7 +36,7 @@ jobs:
|
|||||||
for image in $ALL_IMAGES; do
|
for image in $ALL_IMAGES; do
|
||||||
if [[ "$image" = cmur2/dyndnsd:v$major_version.* ]]; then
|
if [[ "$image" = cmur2/dyndnsd:v$major_version.* ]]; then
|
||||||
echo -e "\nScanning newest patch release $image of major v$major_version...\n"
|
echo -e "\nScanning newest patch release $image of major v$major_version...\n"
|
||||||
if ! trivy image --skip-update --exit-code 1 "$image"; then
|
if ! trivy image --skip-db-update --scanners vuln --exit-code 1 "$image"; then
|
||||||
EXIT_CODE=1
|
EXIT_CODE=1
|
||||||
fi
|
fi
|
||||||
break
|
break
|
||||||
|
@@ -3,9 +3,12 @@ require:
|
|||||||
- rubocop-rspec
|
- rubocop-rspec
|
||||||
|
|
||||||
AllCops:
|
AllCops:
|
||||||
TargetRubyVersion: '2.5'
|
TargetRubyVersion: '3.0'
|
||||||
NewCops: enable
|
NewCops: enable
|
||||||
|
|
||||||
|
Gemspec/DevelopmentDependencies:
|
||||||
|
EnforcedStyle: gemspec
|
||||||
|
|
||||||
Gemspec/RequireMFA:
|
Gemspec/RequireMFA:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
|
124
CHANGELOG.md
124
CHANGELOG.md
@@ -1,5 +1,129 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 3.10.0
|
||||||
|
|
||||||
|
IMPROVEMENTS:
|
||||||
|
|
||||||
|
- add Ruby 3.3 support
|
||||||
|
|
||||||
|
OTHER:
|
||||||
|
|
||||||
|
- update base of Docker image to Alpine 3.19.0 (from 3.18.3 before)
|
||||||
|
|
||||||
|
## 3.9.2 (August 10th, 2023)
|
||||||
|
|
||||||
|
OTHER:
|
||||||
|
|
||||||
|
- update base of Docker image to Alpine 3.18.3 (from 3.18.2 before)
|
||||||
|
|
||||||
|
## 3.9.1 (July 6, 2023)
|
||||||
|
|
||||||
|
OTHER:
|
||||||
|
|
||||||
|
- update base of Docker image to Alpine 3.18.2 (from 3.18.0 before)
|
||||||
|
|
||||||
|
## 3.9.0 (June 8, 2023)
|
||||||
|
|
||||||
|
IMPROVEMENTS:
|
||||||
|
|
||||||
|
- Drop EOL Ruby 2.7 support, now minimum version supported is Ruby 3.0
|
||||||
|
|
||||||
|
## 3.8.2 (April 1st, 2023)
|
||||||
|
|
||||||
|
OTHER:
|
||||||
|
|
||||||
|
- update base of Docker image to Alpine 3.17.3 (from 3.17.2 before)
|
||||||
|
|
||||||
|
## 3.8.1 (March 2nd, 2023)
|
||||||
|
|
||||||
|
OTHER:
|
||||||
|
|
||||||
|
- update base of Docker image to Alpine 3.17.2 (from 3.17.1 before)
|
||||||
|
|
||||||
|
## 3.8.0 (January 13th, 2023)
|
||||||
|
|
||||||
|
IMPROVEMENTS:
|
||||||
|
|
||||||
|
- add Ruby 3.2 support
|
||||||
|
|
||||||
|
OTHER:
|
||||||
|
|
||||||
|
- update base of Docker image to Alpine 3.17.1 (from 3.17.0 before)
|
||||||
|
|
||||||
|
## 3.7.3 (December 29th, 2022)
|
||||||
|
|
||||||
|
OTHER:
|
||||||
|
|
||||||
|
- update base of Docker image to Alpine 3.17.0 (from 3.16.2 before)
|
||||||
|
|
||||||
|
## 3.7.2 (November 10th, 2022)
|
||||||
|
|
||||||
|
OTHER:
|
||||||
|
|
||||||
|
- re-release 3.7.1 to rebuild Docker image with security vulnerabilities fixes
|
||||||
|
|
||||||
|
## 3.7.1 (September 20th, 2022)
|
||||||
|
|
||||||
|
IMPROVEMENTS:
|
||||||
|
|
||||||
|
- fix [TypeError](https://github.com/cmur2/dyndnsd/issues/205) when user has no hosts configured
|
||||||
|
|
||||||
|
## 3.7.0 (September 16th, 2022)
|
||||||
|
|
||||||
|
IMPROVEMENTS:
|
||||||
|
|
||||||
|
- Update to Rack 3
|
||||||
|
|
||||||
|
## 3.6.2 (August 11th, 2022)
|
||||||
|
|
||||||
|
OTHER:
|
||||||
|
|
||||||
|
- update base of Docker image to Alpine 3.16.2 (from 3.16.1 before)
|
||||||
|
|
||||||
|
## 3.6.1 (July 21st, 2022)
|
||||||
|
|
||||||
|
OTHER:
|
||||||
|
|
||||||
|
- update base of Docker image to Alpine 3.16.1 (from 3.16.0 before)
|
||||||
|
|
||||||
|
## 3.6.0 (June 2nd, 2022)
|
||||||
|
|
||||||
|
IMPROVEMENTS:
|
||||||
|
|
||||||
|
- Drop EOL Ruby 2.6 and lower support, now minimum version supported is Ruby 2.7
|
||||||
|
|
||||||
|
OTHER:
|
||||||
|
|
||||||
|
- update base of Docker image to Alpine 3.16 (from 3.15.7 before)
|
||||||
|
|
||||||
|
## 3.5.3 (May 5th, 2022)
|
||||||
|
|
||||||
|
OTHER:
|
||||||
|
|
||||||
|
- re-release 3.5.2 to rebuild Docker image with security vulnerabilities fixes
|
||||||
|
|
||||||
|
## 3.5.2 (April 7th, 2022)
|
||||||
|
|
||||||
|
OTHER:
|
||||||
|
|
||||||
|
- re-release 3.5.1 to rebuild Docker image with security vulnerabilities fixes
|
||||||
|
|
||||||
|
## 3.5.1 (February 17th, 2022)
|
||||||
|
|
||||||
|
OTHER:
|
||||||
|
|
||||||
|
- re-release 3.5.0 to rebuild Docker image with security vulnerabilities fixes
|
||||||
|
|
||||||
|
## 3.5.0 (January 8th, 2022)
|
||||||
|
|
||||||
|
IMPROVEMENTS:
|
||||||
|
|
||||||
|
- add Ruby 3.1 support
|
||||||
|
|
||||||
|
OTHER:
|
||||||
|
|
||||||
|
- update base of Docker image to Alpine 3.15 (from 3.13.7 before, **Note:** please be aware of the quirks around [Alpine 3.14](https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.14.0#faccessat2))
|
||||||
|
|
||||||
## 3.4.8 (December 11th, 2021)
|
## 3.4.8 (December 11th, 2021)
|
||||||
|
|
||||||
OTHER:
|
OTHER:
|
||||||
|
41
Rakefile
41
Rakefile
@@ -14,20 +14,15 @@ task :solargraph do
|
|||||||
sh 'solargraph typecheck'
|
sh 'solargraph typecheck'
|
||||||
end
|
end
|
||||||
|
|
||||||
namespace :solargraph do
|
|
||||||
desc 'Should be run by developer once to prepare initial solargraph usage (fill caches etc.)'
|
|
||||||
task :init do
|
|
||||||
sh 'solargraph download-core'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# renovate: datasource=github-tags depName=hadolint/hadolint
|
# renovate: datasource=github-tags depName=hadolint/hadolint
|
||||||
hadolint_version = 'v2.8.0'
|
hadolint_version = 'v2.12.0'
|
||||||
|
|
||||||
# renovate: datasource=github-tags depName=aquasecurity/trivy
|
# renovate: datasource=github-tags depName=aquasecurity/trivy
|
||||||
trivy_version = 'v0.21.2'
|
trivy_version = 'v0.50.4'
|
||||||
|
|
||||||
namespace :docker do
|
namespace :docker do
|
||||||
|
ci_image = 'cmur2/dyndnsd:ci'
|
||||||
|
|
||||||
desc 'Lint Dockerfile'
|
desc 'Lint Dockerfile'
|
||||||
task :lint do
|
task :lint do
|
||||||
sh "if [ ! -e ./hadolint ]; then wget -q -O ./hadolint https://github.com/hadolint/hadolint/releases/download/#{hadolint_version}/hadolint-Linux-x86_64; fi"
|
sh "if [ ! -e ./hadolint ]; then wget -q -O ./hadolint https://github.com/hadolint/hadolint/releases/download/#{hadolint_version}/hadolint-Linux-x86_64; fi"
|
||||||
@@ -45,11 +40,35 @@ namespace :docker do
|
|||||||
task :scan do
|
task :scan do
|
||||||
ver = trivy_version.gsub('v', '')
|
ver = trivy_version.gsub('v', '')
|
||||||
sh "if [ ! -e ./trivy ]; then wget -q -O - https://github.com/aquasecurity/trivy/releases/download/v#{ver}/trivy_#{ver}_Linux-64bit.tar.gz | tar -xzf - trivy; fi"
|
sh "if [ ! -e ./trivy ]; then wget -q -O - https://github.com/aquasecurity/trivy/releases/download/v#{ver}/trivy_#{ver}_Linux-64bit.tar.gz | tar -xzf - trivy; fi"
|
||||||
sh './trivy cmur2/dyndnsd:ci'
|
sh "./trivy image #{ci_image}"
|
||||||
|
end
|
||||||
|
|
||||||
|
desc 'End-to-end test the CI Docker image'
|
||||||
|
task :e2e do
|
||||||
|
sh <<~SCRIPT
|
||||||
|
echo -n '{}' > e2e/db.json
|
||||||
|
chmod a+w e2e/db.json
|
||||||
|
SCRIPT
|
||||||
|
sh "docker run -d --name=dyndnsd-ci -v $(pwd)/e2e:/etc/dyndnsd -p 8080:8080 -p 5353:5353 #{ci_image}"
|
||||||
|
sh 'sleep 1'
|
||||||
|
puts '----------------------------------------'
|
||||||
|
# `dig` needs `sudo apt-get install -y -q dnsutils`
|
||||||
|
sh <<~SCRIPT
|
||||||
|
curl -s -o /dev/null -w '%{http_code}' 'http://localhost:8080/' | grep -q '401'
|
||||||
|
curl -s 'http://foo:secret@localhost:8080/nic/update?hostname=foo.dyn.example.org&myip=1.2.3.4' | grep -q 'good'
|
||||||
|
curl -s 'http://foo:secret@localhost:8080/nic/update?hostname=foo.dyn.example.org&myip=1.2.3.4' | grep -q 'nochg'
|
||||||
|
dig +short AXFR 'dyn.example.org' @127.0.0.1 -p 5353 | grep -q '1.2.3.4'
|
||||||
|
SCRIPT
|
||||||
|
puts '----------------------------------------'
|
||||||
|
sh <<~SCRIPT
|
||||||
|
docker logs dyndnsd-ci
|
||||||
|
docker container rm -f -v dyndnsd-ci
|
||||||
|
rm e2e/db.json
|
||||||
|
SCRIPT
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
task default: [:rubocop, :spec, 'bundle:audit', :solargraph]
|
task default: [:rubocop, :spec, 'bundle:audit', :solargraph]
|
||||||
|
|
||||||
desc 'Run all tasks desired for CI'
|
desc 'Run all tasks desired for CI'
|
||||||
task ci: ['solargraph:init', :default, 'docker:lint', :build, 'docker:build']
|
task ci: [:default, 'docker:lint', :build, 'docker:build', 'docker:e2e']
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
FROM alpine:3.13.7
|
FROM alpine:3.19.1
|
||||||
|
|
||||||
EXPOSE 5353 8080
|
EXPOSE 5353 8080
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
FROM alpine:3.13.7
|
FROM alpine:3.19.1
|
||||||
|
|
||||||
EXPOSE 5353 8080
|
EXPOSE 5353 8080
|
||||||
|
|
||||||
|
@@ -25,14 +25,16 @@ Gem::Specification.new do |s|
|
|||||||
s.executables = ['dyndnsd']
|
s.executables = ['dyndnsd']
|
||||||
s.extra_rdoc_files = Dir['README.md', 'CHANGELOG.md', 'LICENSE']
|
s.extra_rdoc_files = Dir['README.md', 'CHANGELOG.md', 'LICENSE']
|
||||||
|
|
||||||
s.required_ruby_version = '>= 2.5'
|
s.required_ruby_version = '>= 3.0'
|
||||||
|
|
||||||
|
s.add_runtime_dependency 'async', '~> 1.31.0'
|
||||||
s.add_runtime_dependency 'async-dns', '~> 1.3.0'
|
s.add_runtime_dependency 'async-dns', '~> 1.3.0'
|
||||||
s.add_runtime_dependency 'metriks'
|
s.add_runtime_dependency 'metriks'
|
||||||
s.add_runtime_dependency 'opentelemetry-exporter-jaeger', '~> 0.20.0'
|
s.add_runtime_dependency 'opentelemetry-exporter-jaeger', '>= 0.22', '< 0.24'
|
||||||
s.add_runtime_dependency 'opentelemetry-instrumentation-rack', '~> 0.20.0'
|
s.add_runtime_dependency 'opentelemetry-instrumentation-rack', '~> 0.22.0'
|
||||||
s.add_runtime_dependency 'opentelemetry-sdk', '~> 1.0.0.rc2'
|
s.add_runtime_dependency 'opentelemetry-sdk', '~> 1.2.0'
|
||||||
s.add_runtime_dependency 'rack', '~> 2.0'
|
s.add_runtime_dependency 'rack', '~> 3.0'
|
||||||
|
s.add_runtime_dependency 'rackup', '~> 2'
|
||||||
s.add_runtime_dependency 'webrick', '>= 1.6.1'
|
s.add_runtime_dependency 'webrick', '>= 1.6.1'
|
||||||
|
|
||||||
s.add_development_dependency 'bundler'
|
s.add_development_dependency 'bundler'
|
||||||
@@ -40,8 +42,8 @@ Gem::Specification.new do |s|
|
|||||||
s.add_development_dependency 'rack-test'
|
s.add_development_dependency 'rack-test'
|
||||||
s.add_development_dependency 'rake'
|
s.add_development_dependency 'rake'
|
||||||
s.add_development_dependency 'rspec'
|
s.add_development_dependency 'rspec'
|
||||||
s.add_development_dependency 'rubocop', '~> 1.23.0'
|
s.add_development_dependency 'rubocop', '~> 1.61.0'
|
||||||
s.add_development_dependency 'rubocop-rake', '~> 0.6.0'
|
s.add_development_dependency 'rubocop-rake', '~> 0.6.0'
|
||||||
s.add_development_dependency 'rubocop-rspec', '~> 2.6.0'
|
s.add_development_dependency 'rubocop-rspec', '~> 2.26.1'
|
||||||
s.add_development_dependency 'solargraph', '~> 0.44.0'
|
s.add_development_dependency 'solargraph', '~> 0.50.0'
|
||||||
end
|
end
|
||||||
|
31
e2e/config.yml
Normal file
31
e2e/config.yml
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
---
|
||||||
|
host: "0.0.0.0"
|
||||||
|
port: 8080
|
||||||
|
|
||||||
|
db: /etc/dyndnsd/db.json
|
||||||
|
debug: false
|
||||||
|
domain: dyn.example.org
|
||||||
|
#responder: RestStyle
|
||||||
|
|
||||||
|
updater:
|
||||||
|
name: zone_transfer_server
|
||||||
|
params:
|
||||||
|
server_listens:
|
||||||
|
- 0.0.0.0@5353
|
||||||
|
#send_notifies:
|
||||||
|
#- 10.0.2.15@53
|
||||||
|
zone_ttl: 300 # 5m
|
||||||
|
zone_nameservers:
|
||||||
|
- dns1.example.org.
|
||||||
|
- dns2.example.org.
|
||||||
|
zone_email_address: admin.example.org.
|
||||||
|
zone_additional_ips:
|
||||||
|
- "127.0.0.1"
|
||||||
|
- "::1"
|
||||||
|
|
||||||
|
users:
|
||||||
|
foo:
|
||||||
|
password: "secret"
|
||||||
|
hosts:
|
||||||
|
- foo.dyn.example.org
|
||||||
|
- bar.dyn.example.org
|
@@ -7,6 +7,7 @@ require 'ipaddr'
|
|||||||
require 'json'
|
require 'json'
|
||||||
require 'yaml'
|
require 'yaml'
|
||||||
require 'rack'
|
require 'rack'
|
||||||
|
require 'rackup'
|
||||||
require 'metriks'
|
require 'metriks'
|
||||||
require 'opentelemetry/instrumentation/rack'
|
require 'opentelemetry/instrumentation/rack'
|
||||||
require 'opentelemetry/sdk'
|
require 'opentelemetry/sdk'
|
||||||
@@ -106,7 +107,7 @@ module Dyndnsd
|
|||||||
puts "DynDNSd version #{Dyndnsd::VERSION}"
|
puts "DynDNSd version #{Dyndnsd::VERSION}"
|
||||||
puts "Using config file #{config_file}"
|
puts "Using config file #{config_file}"
|
||||||
|
|
||||||
config = YAML.safe_load(File.open(config_file, 'r', &:read))
|
config = YAML.safe_load_file(config_file)
|
||||||
|
|
||||||
setup_logger(config)
|
setup_logger(config)
|
||||||
|
|
||||||
@@ -214,10 +215,11 @@ module Dyndnsd
|
|||||||
invalid_hostnames = hostnames.select { |h| !Helper.fqdn_valid?(h, @domain) }
|
invalid_hostnames = hostnames.select { |h| !Helper.fqdn_valid?(h, @domain) }
|
||||||
return [422, {'X-DynDNS-Response' => 'hostname_malformed'}, []] if invalid_hostnames.any?
|
return [422, {'X-DynDNS-Response' => 'hostname_malformed'}, []] if invalid_hostnames.any?
|
||||||
|
|
||||||
|
# we can trust this information since user was authorized by middleware
|
||||||
user = env['REMOTE_USER']
|
user = env['REMOTE_USER']
|
||||||
|
|
||||||
# check for hostnames that the user does not own
|
# check for hostnames that the user does not own
|
||||||
forbidden_hostnames = hostnames - @users[user]['hosts']
|
forbidden_hostnames = hostnames - @users[user].fetch('hosts', [])
|
||||||
return [422, {'X-DynDNS-Response' => 'host_forbidden'}, []] if forbidden_hostnames.any?
|
return [422, {'X-DynDNS-Response' => 'host_forbidden'}, []] if forbidden_hostnames.any?
|
||||||
|
|
||||||
if params['offline'] == 'YES'
|
if params['offline'] == 'YES'
|
||||||
@@ -259,10 +261,10 @@ module Dyndnsd
|
|||||||
# @return [void]
|
# @return [void]
|
||||||
private_class_method def self.setup_traps
|
private_class_method def self.setup_traps
|
||||||
Signal.trap('INT') do
|
Signal.trap('INT') do
|
||||||
Rack::Handler::WEBrick.shutdown
|
Rackup::Handler::WEBrick.shutdown
|
||||||
end
|
end
|
||||||
Signal.trap('TERM') do
|
Signal.trap('TERM') do
|
||||||
Rack::Handler::WEBrick.shutdown
|
Rackup::Handler::WEBrick.shutdown
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -350,7 +352,7 @@ module Dyndnsd
|
|||||||
|
|
||||||
app = OpenTelemetry::Instrumentation::Rack::Middlewares::TracerMiddleware.new(app)
|
app = OpenTelemetry::Instrumentation::Rack::Middlewares::TracerMiddleware.new(app)
|
||||||
|
|
||||||
Rack::Handler::WEBrick.run app, Host: config['host'], Port: config['port']
|
Rackup::Handler::WEBrick.run app, Host: config['host'], Port: config['port']
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@@ -21,7 +21,7 @@ module Dyndnsd
|
|||||||
span.set_attribute('dyndnsd.updater.name', self.class.name&.split('::')&.last || 'None')
|
span.set_attribute('dyndnsd.updater.name', self.class.name&.split('::')&.last || 'None')
|
||||||
|
|
||||||
# write zone file in bind syntax
|
# write zone file in bind syntax
|
||||||
File.open(@zone_file, 'w') { |f| f.write(@generator.generate(db)) }
|
File.write(@zone_file, @generator.generate(db))
|
||||||
# call user-defined command
|
# call user-defined command
|
||||||
pid = fork do
|
pid = fork do
|
||||||
exec @command
|
exec @command
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Dyndnsd
|
module Dyndnsd
|
||||||
VERSION = '3.4.8'
|
VERSION = '3.9.2'
|
||||||
end
|
end
|
||||||
|
@@ -15,6 +15,9 @@ describe Dyndnsd::Daemon do
|
|||||||
'test' => {
|
'test' => {
|
||||||
'password' => 'secret',
|
'password' => 'secret',
|
||||||
'hosts' => ['foo.example.org', 'bar.example.org']
|
'hosts' => ['foo.example.org', 'bar.example.org']
|
||||||
|
},
|
||||||
|
'test2' => {
|
||||||
|
'password' => 'ihavenohosts'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -99,6 +102,14 @@ describe Dyndnsd::Daemon do
|
|||||||
expect(last_response.body).to eq('notfqdn')
|
expect(last_response.body).to eq('notfqdn')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'rejects request if user does not own any hostnames' do
|
||||||
|
authorize 'test2', 'ihavenohosts'
|
||||||
|
|
||||||
|
get '/nic/update?hostname=doesnotexisthost.example.org'
|
||||||
|
expect(last_response).to be_ok
|
||||||
|
expect(last_response.body).to eq('nohost')
|
||||||
|
end
|
||||||
|
|
||||||
it 'rejects request if user does not own one hostname' do
|
it 'rejects request if user does not own one hostname' do
|
||||||
authorize 'test', 'secret'
|
authorize 'test', 'secret'
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user