mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-01-24 05:17:06 +02:00
update fteproxy
This commit is contained in:
parent
261c004177
commit
685657d311
@ -2,8 +2,8 @@
|
|||||||
# Dockerfile for fteproxy
|
# Dockerfile for fteproxy
|
||||||
#
|
#
|
||||||
|
|
||||||
FROM alpine
|
FROM alpine:3
|
||||||
MAINTAINER kev <norelpy@easypi.pro>
|
MAINTAINER EasyPi Software Foundation
|
||||||
|
|
||||||
RUN set -xe \
|
RUN set -xe \
|
||||||
&& apk add -U build-base \
|
&& apk add -U build-base \
|
||||||
@ -19,17 +19,17 @@ RUN set -xe \
|
|||||||
python-dev \
|
python-dev \
|
||||||
&& rm -rf /root/.cache /var/cache/apk/*
|
&& rm -rf /root/.cache /var/cache/apk/*
|
||||||
|
|
||||||
ENV MODE server
|
ENV MODE=server
|
||||||
ENV UPSTREAM_FORMAT manual-http-request
|
ENV UPSTREAM_FORMAT=manual-http-request
|
||||||
ENV DOWNSTREAM_FORMAT manual-http-response
|
ENV DOWNSTREAM_FORMAT=manual-http-response
|
||||||
ENV CLIENT_IP 127.0.0.1
|
ENV CLIENT_IP=127.0.0.1
|
||||||
ENV CLIENT_PORT 8079
|
ENV CLIENT_PORT=8079
|
||||||
ENV SERVER_IP 127.0.0.1
|
ENV SERVER_IP=127.0.0.1
|
||||||
ENV SERVER_PORT 8080
|
ENV SERVER_PORT=8080
|
||||||
ENV PROXY_IP 127.0.0.1
|
ENV PROXY_IP=127.0.0.1
|
||||||
ENV PROXY_PORT 8081
|
ENV PROXY_PORT=8081
|
||||||
ENV RELEASE 20131224
|
ENV RELEASE=20131224
|
||||||
ENV KEY FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000
|
ENV KEY=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000
|
||||||
|
|
||||||
CMD fteproxy --mode $MODE \
|
CMD fteproxy --mode $MODE \
|
||||||
--upstream-format $UPSTREAM_FORMAT \
|
--upstream-format $UPSTREAM_FORMAT \
|
||||||
|
@ -3,14 +3,14 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
FROM debian:jessie
|
FROM debian:jessie
|
||||||
MAINTAINER kev<noreply@easypi.pro>
|
MAINTAINER EasyPi Software Foundation
|
||||||
|
|
||||||
ENV FTE_VER 0.2.18
|
ENV FTE_VER=0.2.18
|
||||||
ENV FTE_SYS linux
|
ENV FTE_SYS=linux
|
||||||
ENV FTE_ARCH x86_64
|
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_URL=https://fteproxy.org/dist/${FTE_VER}/fteproxy-${FTE_VER}-${FTE_SYS}-${FTE_ARCH}.tar.gz
|
||||||
ENV FTE_FILE fteproxy.tar.gz
|
ENV FTE_FILE=fteproxy.tar.gz
|
||||||
ENV FTE_MD5 81e1f941df9fa202c08dd73d5def0d33
|
ENV FTE_MD5=81e1f941df9fa202c08dd73d5def0d33
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y curl \
|
&& apt-get install -y curl \
|
||||||
@ -20,17 +20,17 @@ RUN apt-get update \
|
|||||||
&& tar xzf ${FTE_FILE} --strip 1 -C /fteproxy \
|
&& tar xzf ${FTE_FILE} --strip 1 -C /fteproxy \
|
||||||
&& rm -rf ${FTE_FILE} /var/lib/apt/lists/*
|
&& rm -rf ${FTE_FILE} /var/lib/apt/lists/*
|
||||||
|
|
||||||
ENV MODE server
|
ENV MODE=server
|
||||||
ENV UPSTREAM_FORMAT manual-http-request
|
ENV UPSTREAM_FORMAT=manual-http-request
|
||||||
ENV DOWNSTREAM_FORMAT manual-http-response
|
ENV DOWNSTREAM_FORMAT=manual-http-response
|
||||||
ENV CLIENT_IP 127.0.0.1
|
ENV CLIENT_IP=127.0.0.1
|
||||||
ENV CLIENT_PORT 8079
|
ENV CLIENT_PORT=8079
|
||||||
ENV SERVER_IP 127.0.0.1
|
ENV SERVER_IP=127.0.0.1
|
||||||
ENV SERVER_PORT 8080
|
ENV SERVER_PORT=8080
|
||||||
ENV PROXY_IP 127.0.0.1
|
ENV PROXY_IP=127.0.0.1
|
||||||
ENV PROXY_PORT 8081
|
ENV PROXY_PORT=8081
|
||||||
ENV RELEASE 20131224
|
ENV RELEASE=20131224
|
||||||
ENV KEY FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000
|
ENV KEY=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000
|
||||||
|
|
||||||
CMD /fteproxy/fteproxy.bin --mode $MODE \
|
CMD /fteproxy/fteproxy.bin --mode $MODE \
|
||||||
--upstream-format $UPSTREAM_FORMAT \
|
--upstream-format $UPSTREAM_FORMAT \
|
||||||
|
@ -25,33 +25,44 @@ In the following example, I will setup a server/client pair to connect www.googl
|
|||||||
## Create a docker-compose.yml
|
## Create a docker-compose.yml
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
server:
|
version: "3.8"
|
||||||
image: vimagick/fteproxy
|
|
||||||
ports:
|
|
||||||
- "80"
|
|
||||||
environment:
|
|
||||||
- MODE=server
|
|
||||||
- SERVER_IP=0.0.0.0
|
|
||||||
- SERVER_PORT=80
|
|
||||||
- PROXY_IP=www.google.com
|
|
||||||
- PROXY_PORT=80
|
|
||||||
- KEY=CB2FBA2BC70490526E749E01BB050F6B555964290DFF58CF24785B4A093F7B18
|
|
||||||
|
|
||||||
client:
|
services:
|
||||||
image: vimagick/fteproxy
|
|
||||||
ports:
|
server:
|
||||||
- "9009:80"
|
image: vimagick/fteproxy
|
||||||
links:
|
ports:
|
||||||
- server
|
- "4911:4911"
|
||||||
environment:
|
environment:
|
||||||
- MODE=client
|
- MODE=server
|
||||||
- SERVER_IP=server
|
- SERVER_IP=0.0.0.0
|
||||||
- SERVER_PORT=80
|
- SERVER_PORT=4911
|
||||||
- CLIENT_IP=0.0.0.0
|
- PROXY_IP=openvpn
|
||||||
- CLIENT_PORT=80
|
- PROXY_PORT=1194
|
||||||
- KEY=CB2FBA2BC70490526E749E01BB050F6B555964290DFF58CF24785B4A093F7B18
|
- KEY=66754b8113ea7a218b7613f73f7e13b1e91790216f659b5f78b903b34c654741
|
||||||
|
extra_hosts:
|
||||||
|
- openvpn:1.2.3.4
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
|
client:
|
||||||
|
image: vimagick/fteproxy
|
||||||
|
ports:
|
||||||
|
- "1194:1194"
|
||||||
|
environment:
|
||||||
|
- MODE=client
|
||||||
|
- SERVER_IP=openvpn.easypi.pro
|
||||||
|
- SERVER_PORT=4911
|
||||||
|
- CLIENT_IP=0.0.0.0
|
||||||
|
- CLIENT_PORT=1194
|
||||||
|
- KEY=66754b8113ea7a218b7613f73f7e13b1e91790216f659b5f78b903b34c654741
|
||||||
|
restart: unless-stopped
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You need to split the docker-compose.yml into two parts:
|
||||||
|
|
||||||
|
- server: to mask a tcp service
|
||||||
|
- client: to unmask the service
|
||||||
|
|
||||||
> To generate random key:
|
> To generate random key:
|
||||||
> `xxd -u -p -c32 /dev/urandom | head -n1`
|
> `xxd -u -p -c32 /dev/urandom | head -n1`
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
# Dockerfile for fteproxy-arm
|
# Dockerfile for fteproxy-arm
|
||||||
#
|
#
|
||||||
|
|
||||||
FROM easypi/alpine-arm
|
FROM alpine:3
|
||||||
MAINTAINER EasyPi Software Foundation
|
MAINTAINER EasyPi Software Foundation
|
||||||
|
|
||||||
RUN set -xe \
|
RUN set -xe \
|
||||||
@ -19,17 +19,17 @@ RUN set -xe \
|
|||||||
python-dev \
|
python-dev \
|
||||||
&& rm -rf /root/.cache /var/cache/apk/*
|
&& rm -rf /root/.cache /var/cache/apk/*
|
||||||
|
|
||||||
ENV MODE server
|
ENV MODE=server
|
||||||
ENV UPSTREAM_FORMAT manual-http-request
|
ENV UPSTREAM_FORMAT=manual-http-request
|
||||||
ENV DOWNSTREAM_FORMAT manual-http-response
|
ENV DOWNSTREAM_FORMAT=manual-http-response
|
||||||
ENV CLIENT_IP 127.0.0.1
|
ENV CLIENT_IP=127.0.0.1
|
||||||
ENV CLIENT_PORT 8079
|
ENV CLIENT_PORT=8079
|
||||||
ENV SERVER_IP 127.0.0.1
|
ENV SERVER_IP=127.0.0.1
|
||||||
ENV SERVER_PORT 8080
|
ENV SERVER_PORT=8080
|
||||||
ENV PROXY_IP 127.0.0.1
|
ENV PROXY_IP=127.0.0.1
|
||||||
ENV PROXY_PORT 8081
|
ENV PROXY_PORT=8081
|
||||||
ENV RELEASE 20131224
|
ENV RELEASE=20131224
|
||||||
ENV KEY FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000
|
ENV KEY=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000
|
||||||
|
|
||||||
CMD fteproxy --mode $MODE \
|
CMD fteproxy --mode $MODE \
|
||||||
--upstream-format $UPSTREAM_FORMAT \
|
--upstream-format $UPSTREAM_FORMAT \
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
fteproxy:
|
version: "3.8"
|
||||||
image: easypi/fteproxy-arm
|
services:
|
||||||
ports:
|
fteproxy:
|
||||||
- "1194:1194"
|
image: easypi/fteproxy-arm
|
||||||
environment:
|
ports:
|
||||||
- MODE=client
|
- "1194:1194"
|
||||||
- SERVER_IP=vpn.easypi.info
|
environment:
|
||||||
- SERVER_PORT=4911
|
- MODE=client
|
||||||
- CLIENT_IP=0.0.0.0
|
- SERVER_IP=vpn.easypi.info
|
||||||
- CLIENT_PORT=1194
|
- SERVER_PORT=4911
|
||||||
- KEY=66754b8113ea7a218b7613f73f7e13b1e91790216f659b5f78b903b34c654741
|
- CLIENT_IP=0.0.0.0
|
||||||
restart: always
|
- CLIENT_PORT=1194
|
||||||
|
- KEY=66754b8113ea7a218b7613f73f7e13b1e91790216f659b5f78b903b34c654741
|
||||||
|
restart: unless-stopped
|
||||||
|
@ -1,27 +1,31 @@
|
|||||||
master:
|
version: "3.8"
|
||||||
image: vimagick/fteproxy
|
|
||||||
ports:
|
|
||||||
- "4911:4911"
|
|
||||||
external_links:
|
|
||||||
- openvpn_server_1:openvpn
|
|
||||||
environment:
|
|
||||||
- MODE=server
|
|
||||||
- SERVER_IP=0.0.0.0
|
|
||||||
- SERVER_PORT=4911
|
|
||||||
- PROXY_IP=openvpn
|
|
||||||
- PROXY_PORT=1194
|
|
||||||
- KEY=66754b8113ea7a218b7613f73f7e13b1e91790216f659b5f78b903b34c654741
|
|
||||||
restart: always
|
|
||||||
|
|
||||||
bridge:
|
services:
|
||||||
image: vimagick/fteproxy
|
|
||||||
ports:
|
server:
|
||||||
- "1194:1194"
|
image: vimagick/fteproxy
|
||||||
environment:
|
ports:
|
||||||
- MODE=client
|
- "4911:4911"
|
||||||
- SERVER_IP=openvpn.easypi.pro
|
environment:
|
||||||
- SERVER_PORT=4911
|
- MODE=server
|
||||||
- CLIENT_IP=0.0.0.0
|
- SERVER_IP=0.0.0.0
|
||||||
- CLIENT_PORT=1194
|
- SERVER_PORT=4911
|
||||||
- KEY=66754b8113ea7a218b7613f73f7e13b1e91790216f659b5f78b903b34c654741
|
- PROXY_IP=openvpn
|
||||||
restart: always
|
- PROXY_PORT=1194
|
||||||
|
- KEY=66754b8113ea7a218b7613f73f7e13b1e91790216f659b5f78b903b34c654741
|
||||||
|
extra_hosts:
|
||||||
|
- openvpn:1.2.3.4
|
||||||
|
restart: unless-stopped
|
||||||
|
|
||||||
|
client:
|
||||||
|
image: vimagick/fteproxy
|
||||||
|
ports:
|
||||||
|
- "1194:1194"
|
||||||
|
environment:
|
||||||
|
- MODE=client
|
||||||
|
- SERVER_IP=openvpn.easypi.pro
|
||||||
|
- SERVER_PORT=4911
|
||||||
|
- CLIENT_IP=0.0.0.0
|
||||||
|
- CLIENT_PORT=1194
|
||||||
|
- KEY=66754b8113ea7a218b7613f73f7e13b1e91790216f659b5f78b903b34c654741
|
||||||
|
restart: unless-stopped
|
||||||
|
Loading…
x
Reference in New Issue
Block a user