forked from haixinsong/shadowsocks-libev-privoxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (27 loc) · 1.15 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
FROM nediiii/alpine as builder
RUN apk add --no-cache py-pip && \
pip install gfwlist2privoxy && \
gfwlist2privoxy -i https://raw.githubusercontent.com/gfwlist/gfwlist/master/gfwlist.txt -t socks5 -p 127.0.0.1:1080 -f /root/gfwlist.action && \
chmod 660 /root/gfwlist.action
# ---------------------------------------------------------------------------------------------------------------------
FROM nediiii/shadowsocks-libev
LABEL maintainer="nediiii <[email protected]>"
RUN apk add --no-cache privoxy && \
echo "actionsfile gfwlist.action" >> /etc/privoxy/config && \
sed -i 's/enable-edit-actions 0/enable-edit-actions 1/g' /etc/privoxy/config && \
sed -i 's/listen-address 127.0.0.1:8118/listen-address 0.0.0.0:8118/g' /etc/privoxy/config
COPY --from=builder --chown=privoxy:privoxy /root/gfwlist.action /etc/privoxy/gfwlist.action
EXPOSE 1080 8118
CMD /usr/sbin/privoxy /etc/privoxy/config \
&& \
ss-local \
-s $SERVER_ADDR \
-p $SERVER_PORT \
-k $PASSWORD \
-m $METHOD \
-b 0.0.0.0 \
-l 1080 \
-t $TIMEOUT \
--fast-open \
-u
# docker build . --no-cache -t nediiii/shadowsocks-libev-privoxy