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

dnsproxy: Add DNS proxying functionality. #40

Closed
wants to merge 1 commit into from
Closed
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
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ FROM balena/open-balena-base:v8.0.3 as base
RUN apt-get update && \
apt-get install -yq --no-install-recommends \
libdbus-glib-1-dev \
dnsmasq \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

WORKDIR /usr/src/app
Expand All @@ -15,6 +16,7 @@ RUN JOBS=MAX npm ci --unsafe-perm --production && npm cache clean --force && rm

# Copy and enable the service
COPY config/services /etc/systemd/system
RUN systemctl disable dnsmasq.service
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we never want dnsmasq running here, it might be slightly safer to mask the unit (preventing anything else from pulling in dnsmasq as a dep)

RUN systemctl enable balena-mdns-publisher.service

# Build service
Expand All @@ -33,4 +35,3 @@ FROM base
COPY --from=build /usr/src/app/build /usr/src/app/build
COPY --from=build /usr/src/app/bin /usr/src/app/bin
COPY --from=build /usr/src/app/config /usr/src/app/config
COPY --from=base /usr/src/app/node_modules /usr/src/app/node_modules
3 changes: 2 additions & 1 deletion config/confd_env_backend/conf.d/env.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ keys = [
"DBUS_SESSION_BUS_ADDRESS",
"BALENA_SUPERVISOR_ADDRESS",
"BALENA_SUPERVISOR_API_KEY",
"MDNS_API_TOKEN"
"MDNS_API_TOKEN",
"PROXY_DNS",
]
1 change: 1 addition & 0 deletions config/confd_env_backend/templates/env.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ DBUS_SESSION_BUS_ADDRESS={{getenv "DBUS_SESSION_BUS_ADDRESS"}}
BALENA_SUPERVISOR_ADDRESS={{getenv "BALENA_SUPERVISOR_ADDRESS"}}
BALENA_SUPERVISOR_API_KEY={{getenv "BALENA_SUPERVISOR_API_KEY"}}
MDNS_API_TOKEN={{getenv "MDNS_API_TOKEN"}}
PROXY_DNS={{getenv "PROXY_DNS"}}
NODE_EXTRA_CA_CERTS={{if getenv "BALENA_ROOT_CA"}}/etc/ssl/certs/balenaRootCA.pem{{end}}
43 changes: 41 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@
"bluebird": "^3.5.1",
"dbus-native": "^0.4.0",
"lodash": "^4.17.15",
"mz": "^2.7.0",
"request": "^2.88.0",
"request-promise": "^4.2.4"
},
"devDependencies": {
"@types/lodash": "^4.14.134",
"@types/mz": "0.0.32",
"@types/node": "^10.14.4",
"@types/request-promise": "^4.1.42",
"husky": "^1.3.1",
Expand Down
Loading