forked from pymumu/smartdns
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
150 changed files
with
18,087 additions
and
3,704 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Publish Docker Image | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'new image tag(e.g. v1.1.0)' | ||
required: true | ||
default: 'latest' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v3 | ||
with: | ||
platforms: linux/amd64,linux/arm64 | ||
push: true | ||
tags: ${{vars.DOCKERHUB_REPO}}:${{ github.event.inputs.version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ LABEL maintainer="Martincz Gao <[email protected]>" | |
ENV TZ=Asia/Shanghai | ||
|
||
# prepare builder | ||
ARG OPENSSL_VER=1.1.1f | ||
ARG OPENSSL_VER=3.0.10 | ||
RUN apt update && \ | ||
apt install -y perl curl make musl-tools musl-dev && \ | ||
ln -s /usr/include/linux /usr/include/$(uname -m)-linux-musl && \ | ||
|
@@ -31,7 +31,7 @@ COPY . /build/smartdns/ | |
RUN cd /build/smartdns && \ | ||
export CC=musl-gcc && \ | ||
export CFLAGS="-I /opt/build/include" && \ | ||
export LDFLAGS="-L /opt/build/lib" && \ | ||
export LDFLAGS="-L /opt/build/lib -L /opt/build/lib64" && \ | ||
sh ./package/build-pkg.sh --platform linux --arch `dpkg --print-architecture` --static && \ | ||
\ | ||
( cd package && tar -xvf *.tar.gz && chmod a+x smartdns/etc/init.d/smartdns ) && \ | ||
|
@@ -43,10 +43,10 @@ RUN cd /build/smartdns && \ | |
cp package/smartdns/etc/smartdns /release/opt/ -a && \ | ||
cd / && rm -rf /build | ||
|
||
FROM busybox:latest | ||
FROM busybox:stable-musl | ||
COPY --from=smartdns-builder /release/ / | ||
EXPOSE 53/tcp | ||
EXPOSE 53/udp | ||
VOLUME "/etc/smartdns/" | ||
VOLUME ["/etc/smartdns/"] | ||
|
||
CMD ["/usr/sbin/smartdns", "-f", "-x"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Copyright (C) 2018-2023 Ruilin Peng (Nick) <[email protected]>. | ||
# Copyright (C) 2018-2024 Ruilin Peng (Nick) <[email protected]>. | ||
# | ||
# smartdns is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/bin/sh | ||
# | ||
# Copyright (C) 2018-2023 Ruilin Peng (Nick) <[email protected]>. | ||
# Copyright (C) 2018-2024 Ruilin Peng (Nick) <[email protected]>. | ||
# | ||
# smartdns is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
|
@@ -37,7 +37,7 @@ test -x $SMARTDNS || exit 5 | |
|
||
case $1 in | ||
start) | ||
$SMARTDNS "$SMART_DNS_OPTS" | ||
$SMARTDNS "$SMART_DNS_OPTS" -R | ||
while true; do | ||
if [ -e "$PIDFILE" ]; then | ||
break; | ||
|
Oops, something went wrong.