v1.0.0
This commit is contained in:
parent
6d94db1ba6
commit
04fb12076c
7
.github/workflows/release.yml
vendored
7
.github/workflows/release.yml
vendored
@ -19,7 +19,12 @@ jobs:
|
|||||||
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_LOGIN }}" --password-stdin &> /dev/null
|
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_LOGIN }}" --password-stdin &> /dev/null
|
||||||
|
|
||||||
- name: Build image
|
- name: Build image
|
||||||
run: docker build --tag "tarampampam/3proxy:${IMAGE_TAG}" --tag "tarampampam/3proxy:latest" -f ./Dockerfile .
|
run: |
|
||||||
|
docker build \
|
||||||
|
--build-arg "BUILD_DATE=`date -u +'%Y-%m-%dT%H:%M:%SZ'`" \
|
||||||
|
--tag "tarampampam/3proxy:${IMAGE_TAG}" \
|
||||||
|
--tag "tarampampam/3proxy:latest" \
|
||||||
|
-f ./Dockerfile .
|
||||||
|
|
||||||
- name: Push version image
|
- name: Push version image
|
||||||
run: docker push "tarampampam/3proxy:${IMAGE_TAG}"
|
run: docker push "tarampampam/3proxy:${IMAGE_TAG}"
|
||||||
|
29
3proxy.cfg
Normal file
29
3proxy.cfg
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#!/usr/bin/3proxy
|
||||||
|
config /etc/3proxy/3proxy.cfg
|
||||||
|
|
||||||
|
# you may use system to execute some external command if proxy starts
|
||||||
|
system "echo `which 3proxy`': Starting 3proxy'"
|
||||||
|
|
||||||
|
# We can configure nservers to avoid unsafe gethostbyname() usage
|
||||||
|
nserver 1.0.0.1
|
||||||
|
nserver 1.1.1.1
|
||||||
|
nserver 8.8.4.4
|
||||||
|
nserver 8.8.8.8
|
||||||
|
|
||||||
|
# nscache is good to save speed, traffic and bandwidth
|
||||||
|
nscache 65536
|
||||||
|
|
||||||
|
# Here we can change timeout values
|
||||||
|
timeouts 1 5 30 60 180 1800 15 60
|
||||||
|
|
||||||
|
log /dev/stdout
|
||||||
|
logformat "- +_L%t.%. %N.%p %E %U %C:%c %R:%r %O %I %h %T"
|
||||||
|
|
||||||
|
maxconn 1024
|
||||||
|
|
||||||
|
#AUTH_SETTINGS
|
||||||
|
|
||||||
|
proxy -a -p3128
|
||||||
|
socks -a -p1080
|
||||||
|
|
||||||
|
flush
|
@ -4,6 +4,12 @@ All notable changes to this package will be documented in this file.
|
|||||||
|
|
||||||
The format is based on [Keep a Changelog][keepachangelog] and this project adheres to [Semantic Versioning][semver].
|
The format is based on [Keep a Changelog][keepachangelog] and this project adheres to [Semantic Versioning][semver].
|
||||||
|
|
||||||
|
## v1.0.0
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Dockerfile and docker entry-point script cleanup
|
||||||
|
|
||||||
## v0.1.1
|
## v0.1.1
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
10
Dockerfile
10
Dockerfile
@ -6,11 +6,9 @@ ARG VERSION="0.8.13"
|
|||||||
|
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
&& apk add --no-cache \
|
&& apk add --no-cache \
|
||||||
ca-certificates \
|
|
||||||
linux-headers \
|
linux-headers \
|
||||||
build-base \
|
build-base \
|
||||||
git \
|
git \
|
||||||
&& update-ca-certificates \
|
|
||||||
&& git clone --branch ${VERSION} https://github.com/z3APA3A/3proxy.git /tmp/3proxy \
|
&& git clone --branch ${VERSION} https://github.com/z3APA3A/3proxy.git /tmp/3proxy \
|
||||||
&& cd /tmp/3proxy \
|
&& cd /tmp/3proxy \
|
||||||
&& echo '#define ANONYMOUS 1' >> /tmp/3proxy/src/3proxy.h \
|
&& echo '#define ANONYMOUS 1' >> /tmp/3proxy/src/3proxy.h \
|
||||||
@ -18,6 +16,9 @@ RUN set -x \
|
|||||||
|
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
|
|
||||||
|
# e.g.: `docker build --build-arg "BUILD_DATE=`date -u +'%Y-%m-%dT%H:%M:%SZ'`" .`
|
||||||
|
ARG BUILD_DATE
|
||||||
|
|
||||||
LABEL \
|
LABEL \
|
||||||
org.label-schema.name="3proxy" \
|
org.label-schema.name="3proxy" \
|
||||||
org.label-schema.description="Tiny free proxy server" \
|
org.label-schema.description="Tiny free proxy server" \
|
||||||
@ -25,13 +26,13 @@ LABEL \
|
|||||||
org.label-schema.vcs-url="https://github.com/tarampampam/3proxy-docker" \
|
org.label-schema.vcs-url="https://github.com/tarampampam/3proxy-docker" \
|
||||||
org.label-schema.docker.cmd="docker run --rm -d -p \"3128:3128/tcp\" -p \"1080:1080/tcp\" this_image" \
|
org.label-schema.docker.cmd="docker run --rm -d -p \"3128:3128/tcp\" -p \"1080:1080/tcp\" this_image" \
|
||||||
org.label-schema.vendor="tarampampam" \
|
org.label-schema.vendor="tarampampam" \
|
||||||
|
org.label-schema.build-date="$BUILD_DATE" \
|
||||||
org.label-schema.license="WTFPL" \
|
org.label-schema.license="WTFPL" \
|
||||||
org.label-schema.schema-version="1.0"
|
org.label-schema.schema-version="1.0"
|
||||||
|
|
||||||
|
COPY 3proxy.cfg /etc/3proxy/3proxy.cfg
|
||||||
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
||||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
|
||||||
COPY --from=builder /tmp/3proxy/src/3proxy /usr/bin/3proxy
|
COPY --from=builder /tmp/3proxy/src/3proxy /usr/bin/3proxy
|
||||||
COPY --from=builder /tmp/3proxy/cfg/3proxy.cfg.sample /etc/3proxy/3proxy.cfg
|
|
||||||
|
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
# Unprivileged user creation <https://stackoverflow.com/a/55757473/12429735RUN>
|
# Unprivileged user creation <https://stackoverflow.com/a/55757473/12429735RUN>
|
||||||
@ -43,7 +44,6 @@ RUN set -x \
|
|||||||
--no-create-home \
|
--no-create-home \
|
||||||
--uid 10001 \
|
--uid 10001 \
|
||||||
3proxy \
|
3proxy \
|
||||||
&& touch /etc/3proxy/passwd \
|
|
||||||
&& chown 3proxy:3proxy -R /etc/3proxy
|
&& chown 3proxy:3proxy -R /etc/3proxy
|
||||||
|
|
||||||
# Use an unprivileged user
|
# Use an unprivileged user
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
## Why this image created?
|
## Why this image created?
|
||||||
|
|
||||||
3proxy is awesome and lightweight proxy-server. This image contains stable version with it and can be configured using environment variables.
|
3proxy is awesome and lightweight proxy-server. This image contains stable version with it and can be configured using environment variables. By default, it uses anonymous (hide information about client) proxy settings.
|
||||||
|
|
||||||
> Page on `hub.docker.com` can be [found here][link_docker_hub].
|
> Page on `hub.docker.com` can be [found here][link_docker_hub].
|
||||||
|
|
||||||
@ -79,7 +79,7 @@ If you will find any package errors, please, [make an issue][link_create_issue]
|
|||||||
WTFPL. Use anywhere for your pleasure.
|
WTFPL. Use anywhere for your pleasure.
|
||||||
|
|
||||||
[badge_build_status]:https://img.shields.io/github/workflow/status/tarampampam/3proxy-docker/tests/master?logo=github&label=build
|
[badge_build_status]:https://img.shields.io/github/workflow/status/tarampampam/3proxy-docker/tests/master?logo=github&label=build
|
||||||
[badge_release_status]:https://img.shields.io/github/workflow/status/tarampampam/3proxy-docker/release/master?logo=github&label=release
|
[badge_release_status]:https://img.shields.io/github/workflow/status/tarampampam/3proxy-docker/release?logo=github&label=release
|
||||||
[badge_release_date]:https://img.shields.io/github/release-date/tarampampam/3proxy-docker.svg?style=flat-square&maxAge=180
|
[badge_release_date]:https://img.shields.io/github/release-date/tarampampam/3proxy-docker.svg?style=flat-square&maxAge=180
|
||||||
[badge_commits_since_release]:https://img.shields.io/github/commits-since/tarampampam/3proxy-docker/latest.svg?style=flat-square&maxAge=180
|
[badge_commits_since_release]:https://img.shields.io/github/commits-since/tarampampam/3proxy-docker/latest.svg?style=flat-square&maxAge=180
|
||||||
[badge_issues]:https://img.shields.io/github/issues/tarampampam/3proxy-docker.svg?style=flat-square&maxAge=180
|
[badge_issues]:https://img.shields.io/github/issues/tarampampam/3proxy-docker.svg?style=flat-square&maxAge=180
|
||||||
|
@ -15,46 +15,7 @@ if [ "$AUTH_REQUIRED" = "true" ]; then
|
|||||||
fi;
|
fi;
|
||||||
|
|
||||||
echo "$0: setup '${PROXY_LOGIN}:${PROXY_PASSWORD}' as proxy user";
|
echo "$0: setup '${PROXY_LOGIN}:${PROXY_PASSWORD}' as proxy user";
|
||||||
echo "${PROXY_LOGIN}:CL:${PROXY_PASSWORD}" > /etc/3proxy/passwd
|
sed -i "s~#AUTH_SETTINGS~users ${PROXY_LOGIN}:CL:${PROXY_PASSWORD}\nauth strong\nallow ${PROXY_LOGIN}~" /etc/3proxy/3proxy.cfg
|
||||||
fi;
|
|
||||||
|
|
||||||
echo "$0: rewrite configuration file";
|
|
||||||
cat << \EOF > /etc/3proxy/3proxy.cfg
|
|
||||||
#!/usr/bin/3proxy
|
|
||||||
config /etc/3proxy/3proxy.cfg
|
|
||||||
|
|
||||||
# you may use system to execute some external command if proxy starts
|
|
||||||
system "echo `which 3proxy`': Starting 3proxy'"
|
|
||||||
|
|
||||||
# We can configure nservers to avoid unsafe gethostbyname() usage
|
|
||||||
nserver 1.0.0.1
|
|
||||||
nserver 1.1.1.1
|
|
||||||
nserver 8.8.4.4
|
|
||||||
nserver 8.8.8.8
|
|
||||||
|
|
||||||
# nscache is good to save speed, traffic and bandwidth
|
|
||||||
nscache 65536
|
|
||||||
|
|
||||||
# Here we can change timeout values
|
|
||||||
timeouts 1 5 30 60 180 1800 15 60
|
|
||||||
|
|
||||||
log /dev/stdout
|
|
||||||
logformat "- +_L%t.%. %N.%p %E %U %C:%c %R:%r %O %I %h %T"
|
|
||||||
|
|
||||||
maxconn 1024
|
|
||||||
|
|
||||||
#AUTH_SETTINGS
|
|
||||||
|
|
||||||
proxy -a -p3128
|
|
||||||
socks -a -p1080
|
|
||||||
|
|
||||||
flush
|
|
||||||
EOF
|
|
||||||
|
|
||||||
if [ "$AUTH_REQUIRED" = "true" ]; then
|
|
||||||
echo "$0: setup auth settings in configuration file";
|
|
||||||
|
|
||||||
sed -i "s~#AUTH_SETTINGS~users \$/etc/3proxy/passwd\nauth strong\nallow ${PROXY_LOGIN}~" /etc/3proxy/3proxy.cfg
|
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user