Compare commits

...

10 Commits

Author SHA1 Message Date
e5ab621beb better vulnscan message
All checks were successful
Container Publish / on-success-skip (push) Has been skipped
Container Publish / build-image (amd64) (push) Successful in 1m8s
Container Publish / build-image (arm64) (push) Successful in 56s
Container Publish / update docker manifest (push) Successful in 10s
Vulnerability Scan / Daily Vulnerability Scan (amd64) (push) Successful in 33s
Vulnerability Scan / Daily Vulnerability Scan (arm64) (push) Successful in 6s
2025-10-08 17:26:39 +02:00
f180bca6da removed docker cache when building 2025-10-08 17:26:25 +02:00
53d4dea401 removed drone traces
All checks were successful
Container Publish / on-success-skip (push) Has been skipped
Container Publish / build-image (amd64) (push) Successful in 13s
Container Publish / build-image (arm64) (push) Successful in 14s
Container Publish / update docker manifest (push) Successful in 9s
2025-10-08 17:25:37 +02:00
5189c998f7 build without tag
Some checks failed
Container Publish / on-success-skip (push) Has been skipped
Container Publish / build-image (amd64) (push) Successful in 26s
Container Publish / build-image (arm64) (push) Successful in 11s
Container Publish / update docker manifest (push) Successful in 10s
Vulnerability Scan / Daily Vulnerability Scan (amd64) (push) Failing after 9s
Vulnerability Scan / Daily Vulnerability Scan (arm64) (push) Successful in 6s
2025-09-29 20:15:51 +02:00
19efc7c213 go upgrade
All checks were successful
Container Publish / on-success-skip (push) Has been skipped
Container Publish / build-image (arm64) (push) Successful in 1m7s
Container Publish / build-image (amd64) (push) Successful in 1m22s
Container Publish / update docker manifest (push) Successful in 10s
2025-09-29 20:14:01 +02:00
a55dd0d78e fixed vulns 2025-09-29 20:12:17 +02:00
aabd941e35 no apk cache 2025-09-29 19:59:55 +02:00
8fe8acd0bd build on wednesday
All checks were successful
Container Publish / on-success-skip (push) Has been skipped
Container Publish / build-image (arm64) (push) Successful in 11s
Container Publish / build-image (amd64) (push) Successful in 12s
Container Publish / update docker manifest (push) Successful in 8s
2025-09-29 19:52:51 +02:00
bf572b8fa4 fix custom port
Some checks failed
Container Publish / on-success-skip (push) Has been skipped
Container Publish / build-image (arm64) (push) Successful in 12s
Container Publish / build-image (amd64) (push) Successful in 11s
Container Publish / update docker manifest (push) Successful in 9s
Vulnerability Scan / Daily Vulnerability Scan (amd64) (push) Failing after 12s
Vulnerability Scan / Daily Vulnerability Scan (arm64) (push) Failing after 6s
2025-07-29 10:10:14 +02:00
edd3ee52bd fix healthcheck 2025-07-29 10:09:50 +02:00
11 changed files with 25 additions and 35 deletions

View File

@@ -1,5 +1,3 @@
LICENSE LICENSE
README.md README.md
manifest.tmpl
.gitea/ .gitea/
.drone*

View File

@@ -8,10 +8,8 @@ env:
on: on:
push: push:
tags:
- '*'
schedule: schedule:
- cron: "0 12 3 * *" - cron: "0 12 * * 3"
workflow_dispatch: workflow_dispatch:
workflow_call: workflow_call:
workflow_run: workflow_run:
@@ -50,7 +48,7 @@ jobs:
docker build \ docker build \
--tag ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:latest-${{ matrix.arch }} \ --tag ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:latest-${{ matrix.arch }} \
--build-arg "ALPINE_VERSION=${{ env.ALPINE_VERSION }}" \ --build-arg "ALPINE_VERSION=${{ env.ALPINE_VERSION }}" \
--platform linux/${{ matrix.arch }} -f Dockerfile . --platform linux/${{ matrix.arch }} --no-cache -f Dockerfile .
docker push ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:latest-${{ matrix.arch }} docker push ${{ env.REGISTRY }}/${{ env.REPOSITORY }}:latest-${{ matrix.arch }}
manifest: manifest:

View File

@@ -61,4 +61,4 @@ jobs:
token: ${{ secrets.TELEGRAM_TOKEN }} token: ${{ secrets.TELEGRAM_TOKEN }}
format: markdown format: markdown
message: | message: |
Found **${{ steps.vulncount.outputs.VULNCOUNT }}** vulnerabilities in `${{ github.repository }}` Found **${{ steps.vulncount.outputs.VULNCOUNT }}** vulnerabilities in `${{ env.REGISTRY }}/${{ env.REPOSITORY }}:latest`

View File

@@ -1,4 +1,4 @@
FROM golang:1.22.1-alpine AS build FROM golang:1.25.1-alpine AS build
WORKDIR /src WORKDIR /src
COPY src /src COPY src /src
@@ -10,14 +10,14 @@ RUN \
FROM alpine:latest FROM alpine:latest
RUN \ RUN \
apk --update upgrade && \ apk --no-cache upgrade && \
apk add unbound bind-tools tini && \ apk --no-cache add unbound bind-tools tini && \
wget -O /etc/unbound/named.cache ftp://ftp.internic.net//domain/named.cache wget -O /etc/unbound/named.cache ftp://ftp.internic.net//domain/named.cache
COPY rootfs / COPY rootfs /
COPY --from=build /dnsproxy /app/ COPY --from=build /dnsproxy /app/
HEALTHCHECK --interval=30s --start-period=5s --timeout=10s \ HEALTHCHECK --interval=30s --start-period=5s --timeout=10s \
CMD /usr/bin/host -T -p 1053 asperti.com 127.0.0.1 CMD /usr/bin/host -T -p ${PORT} asperti.com 127.0.0.1
ENTRYPOINT ["/sbin/tini", "--", "/bin/sh", "/app/entrypoint.sh"] ENTRYPOINT ["/sbin/tini", "--", "/bin/sh", "/app/entrypoint.sh"]

View File

@@ -1,7 +1,5 @@
# Dockerized Unbound for caching purposes # Dockerized Unbound for caching purposes
[![Build Status](https://drone.asperti.com/api/badges/paspo/docker-dnscache/status.svg)](https://drone.asperti.com/paspo/docker-dnscache)
## Usage with docker compose ## Usage with docker compose
```yaml ```yaml
@@ -33,9 +31,3 @@ docker run --rm --name zabbix-dns \
-p "1053:1053" -p "1053:1053/udp" \ -p "1053:1053" -p "1053:1053/udp" \
-ti docker.asperti.com/paspo/dnscache:latest -ti docker.asperti.com/paspo/dnscache:latest
``` ```
## test drone config
```sh
drone starlark --format --stdout
```

View File

@@ -32,9 +32,9 @@ EOF
fi fi
# set port # set port
cat >> /etc/unbound/unbound.conf.d/port.conf << EOF cat > /etc/unbound/unbound.conf.d/port.conf << EOF
server: server:
interface: 0.0.0.0:${PORT} port: ${PORT}
EOF EOF
if [ "${DNSPROXY}" = true ] ; then if [ "${DNSPROXY}" = true ] ; then

View File

@@ -1,6 +1,5 @@
server: server:
interface: 0.0.0.0 interface: 0.0.0.0
port: 53
do-ip4: yes do-ip4: yes
do-ip6: no do-ip6: no
do-udp: yes do-udp: yes

View File

@@ -0,0 +1,2 @@
server:
port: 1053

1
src/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
vendor/

View File

@@ -1,6 +1,6 @@
module asperti.com/dnsproxy module asperti.com/dnsproxy
go 1.22.1 go 1.25.1
require github.com/gin-gonic/gin v1.10.0 require github.com/gin-gonic/gin v1.10.0
@@ -25,10 +25,10 @@ require (
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
github.com/ugorji/go/codec v1.2.12 // indirect github.com/ugorji/go/codec v1.2.12 // indirect
golang.org/x/arch v0.8.0 // indirect golang.org/x/arch v0.8.0 // indirect
golang.org/x/crypto v0.23.0 // indirect golang.org/x/crypto v0.42.0 // indirect
golang.org/x/net v0.25.0 // indirect golang.org/x/net v0.43.0 // indirect
golang.org/x/sys v0.20.0 // indirect golang.org/x/sys v0.36.0 // indirect
golang.org/x/text v0.15.0 // indirect golang.org/x/text v0.29.0 // indirect
google.golang.org/protobuf v1.34.1 // indirect google.golang.org/protobuf v1.34.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect
) )

View File

@@ -66,16 +66,16 @@ github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZ
golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8= golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
golang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc= golang.org/x/arch v0.8.0 h1:3wRIsP3pM4yUptoR96otTUOXI367OS0+c9eeRi9doIc=
golang.org/x/arch v0.8.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys= golang.org/x/arch v0.8.0/go.mod h1:FEVrYAQjsQXMVJ1nsMoVVXPZg6p2JE2mx8psSWTDQys=
golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= golang.org/x/crypto v0.42.0 h1:chiH31gIWm57EkTXpwnqf8qeuMUi0yekh6mT2AvFlqI=
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/crypto v0.42.0/go.mod h1:4+rDnOTJhQCx2q7/j6rAN5XDw8kPjeaXEUR2eL94ix8=
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= golang.org/x/net v0.43.0 h1:lat02VYK2j4aLzMzecihNvTlJNQUq316m2Mr9rnM6YE=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/net v0.43.0/go.mod h1:vhO1fvI4dGsIjh73sWfUVjj3N7CA9WkKJNQm2svM6Jg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= golang.org/x/sys v0.36.0 h1:KVRy2GtZBrk1cBYA7MKu5bEZFxQk4NIDV6RLVcC8o0k=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.36.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= golang.org/x/text v0.29.0 h1:1neNs90w9YzJ9BocxfsQNHKuAT4pkghyXc4nhZ6sJvk=
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.29.0/go.mod h1:7MhJOA9CD2qZyOKYazxdYMF85OwPdEr9jTtBpO7ydH4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg=