@@ -1,5 +1,3 @@
|
||||
#!/bin/sh
|
||||
cat > /tmp/3proxy.cfg << EOF
|
||||
daemon
|
||||
log /dev/stdout
|
||||
auth strong
|
||||
@@ -7,5 +5,3 @@ users ${PROXY_USER}:CL:${PROXY_PASS}
|
||||
allow ${PROXY_USER}
|
||||
parent 1000 socks5 127.0.0.1 7890
|
||||
socks -p1080
|
||||
EOF
|
||||
exec 3proxy /tmp/3proxy.cfg
|
||||
@@ -6,18 +6,10 @@ services:
|
||||
- ./squid.conf:/etc/squid/squid.conf:ro
|
||||
- ./passwd:/etc/squid/passwd:ro
|
||||
restart: unless-stopped
|
||||
|
||||
3proxy:
|
||||
image: alpine:latest
|
||||
image: 3proxy/3proxy
|
||||
network_mode: host
|
||||
environment:
|
||||
- PROXY_USER=${PROXY_USER}
|
||||
- PROXY_PASS=${PROXY_PASS}
|
||||
command: >
|
||||
sh -c "
|
||||
apk add --no-cache 3proxy &&
|
||||
printf 'users %s:CL:%s\nproxy -a -p3128\nlog /dev/stdout\n' \"\${PROXY_USER}\" \"\${PROXY_PASS}\" > /tmp/3proxy.cfg &&
|
||||
cat /tmp/3proxy.cfg &&
|
||||
3proxy /tmp/3proxy.cfg
|
||||
"
|
||||
volumes:
|
||||
- ./3proxy.cfg:/config/3proxy.cfg:ro
|
||||
command: /config/3proxy.cfg
|
||||
restart: unless-stopped
|
||||
|
||||
Reference in New Issue
Block a user