Fix entrypoint error
This commit is contained in:
parent
9577d9c925
commit
4d2e8b96c9
45
.github/workflows/tests.yml
vendored
45
.github/workflows/tests.yml
vendored
@ -22,31 +22,64 @@ jobs: # Docs: <https://git.io/JvxXE>
|
||||
run: docker build -f ./Dockerfile --tag image:local .
|
||||
|
||||
- name: Run docker image with default settings
|
||||
run: docker run --rm -d -p "3128:3128/tcp" -p "1080:1080/tcp" image:local
|
||||
run: |
|
||||
docker run --rm -d \
|
||||
-p "3128:3128/tcp" \
|
||||
-p "1080:1080/tcp" \
|
||||
image:local
|
||||
|
||||
- name: Pause
|
||||
run: sleep 2
|
||||
|
||||
- name: Try to use HTTP proxy
|
||||
run: curl -v --fail --proxy http://127.0.0.1:3128 --connect-timeout 3 --max-time 3 https://github.com/robots.txt
|
||||
run: |
|
||||
curl -v --fail \
|
||||
--proxy http://127.0.0.1:3128 \
|
||||
--connect-timeout 3 \
|
||||
--max-time 3 \
|
||||
https://github.com/robots.txt
|
||||
|
||||
- name: Try to use SOCKS proxy
|
||||
run: curl -v --fail --proxy socks5://127.0.0.1:1080 --connect-timeout 3 --max-time 3 https://github.com/robots.txt
|
||||
run: |
|
||||
curl -v --fail \
|
||||
--proxy socks5://127.0.0.1:1080 \
|
||||
--connect-timeout 3 \
|
||||
--max-time 3 \
|
||||
https://github.com/robots.txt
|
||||
|
||||
- name: Stop container
|
||||
run: docker stop $(docker ps -a --filter ancestor=image:local -q)
|
||||
|
||||
- name: Run docker image with auth settings
|
||||
run: 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
|
||||
run: |
|
||||
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
|
||||
|
||||
- name: Pause
|
||||
run: sleep 2
|
||||
|
||||
- name: Try to use HTTP proxy
|
||||
run: curl -v --fail --proxy http://127.0.0.1:3128 --proxy-user evil:live --connect-timeout 3 --max-time 3 https://github.com/robots.txt
|
||||
run: |
|
||||
curl -v --fail \
|
||||
--proxy http://127.0.0.1:3128 \
|
||||
--proxy-user evil:live \
|
||||
--connect-timeout 3 \
|
||||
--max-time 3 \
|
||||
https://github.com/robots.txt
|
||||
|
||||
- name: Try to use SOCKS proxy
|
||||
run: curl -v --fail --proxy socks5://127.0.0.1:1080 --proxy-user evil:live --connect-timeout 3 --max-time 3 https://github.com/robots.txt
|
||||
run: |
|
||||
curl -v --fail \
|
||||
--proxy socks5://127.0.0.1:1080 \
|
||||
--proxy-user evil:live \
|
||||
--connect-timeout 3 \
|
||||
--max-time 3 \
|
||||
https://github.com/robots.txt
|
||||
|
||||
- name: Stop container
|
||||
run: docker stop $(docker ps -a --filter ancestor=image:local -q)
|
||||
|
@ -38,9 +38,6 @@ nscache 65536
|
||||
# Here we can change timeout values
|
||||
timeouts 1 5 30 60 180 1800 15 60
|
||||
|
||||
# Include passwd file. For included files <CR> and <LF> are treated as field separators
|
||||
users $/etc/3proxy/passwd
|
||||
|
||||
log /dev/stdout
|
||||
logformat "- +_L%t.%. %N.%p %E %U %C:%c %R:%r %O %I %h %T"
|
||||
|
||||
@ -57,7 +54,7 @@ EOF
|
||||
if [ "$AUTH_REQUIRED" = "true" ]; then
|
||||
echo "$0: setup auth settings in configuration file";
|
||||
|
||||
sed -i "s~#AUTH_SETTINGS~auth strong\nallow ${PROXY_LOGIN}~" /etc/3proxy/3proxy.cfg
|
||||
sed -i "s~#AUTH_SETTINGS~users \$/etc/3proxy/passwd\nauth strong\nallow ${PROXY_LOGIN}~" /etc/3proxy/3proxy.cfg
|
||||
fi;
|
||||
|
||||
exec "$@"
|
||||
|
Loading…
x
Reference in New Issue
Block a user