From 2c12e774bd46ae7e1054c99688c1178ff95cafec Mon Sep 17 00:00:00 2001 From: Paramtamtam Date: Mon, 13 Jul 2020 10:44:03 +0500 Subject: [PATCH] v1.1.0 --- .github/workflows/tests.yml | 1 - CHANGELOG.md | 10 ++++++++++ Dockerfile | 5 +++++ README.md | 4 +--- docker-entrypoint.sh | 11 +---------- 5 files changed, 17 insertions(+), 14 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bfd59a4..a54abeb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -55,7 +55,6 @@ jobs: # Docs: docker run --rm -d \ -p "3128:3128/tcp" \ -p "1080:1080/tcp" \ - -e "AUTH_REQUIRED=true" \ -e "PROXY_LOGIN=evil" \ -e "PROXY_PASSWORD=live" \ image:local diff --git a/CHANGELOG.md b/CHANGELOG.md index f2ae027..4a38b0c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,16 @@ 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]. +## v1.1.0 + +### Removed + +- Environment variable `AUTH_REQUIRED` support + +### Changed + +- Proxy error pages a little bit styled + ## v1.0.0 ### Fixed diff --git a/Dockerfile b/Dockerfile index 0348ff7..5a3c3e1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,6 +12,11 @@ RUN set -x \ && git clone --branch ${VERSION} https://github.com/z3APA3A/3proxy.git /tmp/3proxy \ && cd /tmp/3proxy \ && echo '#define ANONYMOUS 1' >> /tmp/3proxy/src/3proxy.h \ + && sed -i 's~\(<\/head>\)~\1~' /tmp/3proxy/src/proxy.c \ + && cat ./src/proxy.c | grep '' \ && make -f Makefile.Linux FROM alpine:latest diff --git a/README.md b/README.md index 86b4cb0..3edf126 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ ## 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. By default, it uses anonymous (hide information about client) proxy settings. +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 (information about client hiding) proxy settings. > Page on `hub.docker.com` can be [found here][link_docker_hub]. @@ -33,7 +33,6 @@ All supported image tags [can be found here][link_docker_tags]. Variable name | Description | Example ---------------- | ----------------------------------------- | --------------- -`AUTH_REQUIRED` | Require authorization? (default: `false`) | `true`, `false` `PROXY_LOGIN` | Authorization login | `username` `PROXY_PASSWORD` | Authorization password | `password` @@ -54,7 +53,6 @@ Or with auth settings: $ docker run --rm -d \ -p "3128:3128/tcp" \ -p "1080:1080/tcp" \ - -e "AUTH_REQUIRED=true" \ -e "PROXY_LOGIN=evil" \ -e "PROXY_PASSWORD=live" \ tarampampam/3proxy:latest diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 05da869..af6378e 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -1,19 +1,10 @@ #!/usr/bin/env sh set -e -AUTH_REQUIRED=${AUTH_REQUIRED:-false} # true|false PROXY_LOGIN=${PROXY_LOGIN:-} # string PROXY_PASSWORD=${PROXY_PASSWORD:-} # string -if [ "$AUTH_REQUIRED" = "true" ]; then - if [ -z "$PROXY_LOGIN" ]; then - (>&2 echo "$0: environment variable 'PROXY_LOGIN' is not specified!"); exit 1; - fi; - - if [ -z "$PROXY_PASSWORD" ]; then - (>&2 echo "$0: environment variable 'PROXY_PASSWORD' is not specified!"); exit 1; - fi; - +if [ -n "$PROXY_LOGIN" ] && [ -n "$PROXY_PASSWORD" ]; then echo "$0: setup '${PROXY_LOGIN}:${PROXY_PASSWORD}' as proxy user"; sed -i "s~#AUTH_SETTINGS~users ${PROXY_LOGIN}:CL:${PROXY_PASSWORD}\nauth strong\nallow ${PROXY_LOGIN}~" /etc/3proxy/3proxy.cfg fi;