1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-25 02:04:06 +02:00

update fteproxy

This commit is contained in:
kev 2015-09-03 12:05:35 +08:00
parent b0cadefcd1
commit 366a3d10b2
2 changed files with 82 additions and 28 deletions

View File

@ -2,23 +2,32 @@
# Dockerfile for fteproxy
#
FROM debian:jessie
MAINTAINER kev<noreply@datageek.info>
FROM alpine
MAINTAINER kev <norelpy@datageek.info>
ENV FTE_VER 0.2.18
ENV FTE_SYS linux
ENV FTE_ARCH x86_64
ENV FTE_URL https://fteproxy.org/dist/${FTE_VER}/fteproxy-${FTE_VER}-${FTE_SYS}-${FTE_ARCH}.tar.gz
ENV FTE_FILE fteproxy.tar.gz
ENV FTE_MD5 81e1f941df9fa202c08dd73d5def0d33
RUN apt-get update \
&& apt-get install -y curl \
&& curl -sSL ${FTE_URL} -o ${FTE_FILE} \
&& echo "${FTE_MD5} ${FTE_FILE}" | md5sum -c \
&& mkdir -p /fteproxy \
&& tar xzf ${FTE_FILE} --strip 1 -C /fteproxy \
&& rm -rf ${FTE_FILE} /var/lib/apt/lists/*
RUN apk add -U build-base \
curl \
libstdc++ \
m4 \
python \
python-dev \
py-pip \
py-twisted \
tar \
&& mkdir gmp \
&& curl -sSL https://gmplib.org/download/gmp/gmp-6.0.0a.tar.bz2 | tar xj --strip 1 -C gmp \
&& cd gmp \
&& ./configure --prefix=/usr --enable-cxx \
&& make install \
&& cd .. \
&& rm -rf gmp \
&& pip install fteproxy \
&& apk del build-base \
curl \
m4 \
python-dev \
tar \
&& rm -rf /root/.cache /var/cache/apk/*
ENV MODE server
ENV UPSTREAM_FORMAT manual-http-request
@ -32,15 +41,14 @@ ENV PROXY_PORT 8081
ENV RELEASE 20131224
ENV KEY FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000
CMD /fteproxy/fteproxy.bin --mode $MODE \
--upstream-format $UPSTREAM_FORMAT \
--downstream-format $DOWNSTREAM_FORMAT \
--client_ip $CLIENT_IP \
--client_port $CLIENT_PORT \
--server_ip $SERVER_IP \
--server_port $SERVER_PORT \
--proxy_ip $PROXY_IP \
--proxy_port $PROXY_PORT \
--release $RELEASE \
--key $KEY
CMD fteproxy --mode $MODE \
--upstream-format $UPSTREAM_FORMAT \
--downstream-format $DOWNSTREAM_FORMAT \
--client_ip $CLIENT_IP \
--client_port $CLIENT_PORT \
--server_ip $SERVER_IP \
--server_port $SERVER_PORT \
--proxy_ip $PROXY_IP \
--proxy_port $PROXY_PORT \
--release $RELEASE \
--key $KEY

View File

@ -0,0 +1,46 @@
#
# Dockerfile for fteproxy
#
FROM debian:jessie
MAINTAINER kev<noreply@datageek.info>
ENV FTE_VER 0.2.18
ENV FTE_SYS linux
ENV FTE_ARCH x86_64
ENV FTE_URL https://fteproxy.org/dist/${FTE_VER}/fteproxy-${FTE_VER}-${FTE_SYS}-${FTE_ARCH}.tar.gz
ENV FTE_FILE fteproxy.tar.gz
ENV FTE_MD5 81e1f941df9fa202c08dd73d5def0d33
RUN apt-get update \
&& apt-get install -y curl \
&& curl -sSL ${FTE_URL} -o ${FTE_FILE} \
&& echo "${FTE_MD5} ${FTE_FILE}" | md5sum -c \
&& mkdir -p /fteproxy \
&& tar xzf ${FTE_FILE} --strip 1 -C /fteproxy \
&& rm -rf ${FTE_FILE} /var/lib/apt/lists/*
ENV MODE server
ENV UPSTREAM_FORMAT manual-http-request
ENV DOWNSTREAM_FORMAT manual-http-response
ENV CLIENT_IP 127.0.0.1
ENV CLIENT_PORT 8079
ENV SERVER_IP 127.0.0.1
ENV SERVER_PORT 8080
ENV PROXY_IP 127.0.0.1
ENV PROXY_PORT 8081
ENV RELEASE 20131224
ENV KEY FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000
CMD /fteproxy/fteproxy.bin --mode $MODE \
--upstream-format $UPSTREAM_FORMAT \
--downstream-format $DOWNSTREAM_FORMAT \
--client_ip $CLIENT_IP \
--client_port $CLIENT_PORT \
--server_ip $SERVER_IP \
--server_port $SERVER_PORT \
--proxy_ip $PROXY_IP \
--proxy_port $PROXY_PORT \
--release $RELEASE \
--key $KEY