mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-12-23 01:39:27 +02:00
update fteproxy
This commit is contained in:
parent
261c004177
commit
685657d311
@ -2,8 +2,8 @@
|
||||
# Dockerfile for fteproxy
|
||||
#
|
||||
|
||||
FROM alpine
|
||||
MAINTAINER kev <norelpy@easypi.pro>
|
||||
FROM alpine:3
|
||||
MAINTAINER EasyPi Software Foundation
|
||||
|
||||
RUN set -xe \
|
||||
&& apk add -U build-base \
|
||||
@ -19,17 +19,17 @@ RUN set -xe \
|
||||
python-dev \
|
||||
&& rm -rf /root/.cache /var/cache/apk/*
|
||||
|
||||
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
|
||||
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 --mode $MODE \
|
||||
--upstream-format $UPSTREAM_FORMAT \
|
||||
|
@ -3,14 +3,14 @@
|
||||
#
|
||||
|
||||
FROM debian:jessie
|
||||
MAINTAINER kev<noreply@easypi.pro>
|
||||
MAINTAINER EasyPi Software Foundation
|
||||
|
||||
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
|
||||
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 \
|
||||
@ -20,17 +20,17 @@ RUN apt-get update \
|
||||
&& 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
|
||||
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 \
|
||||
|
@ -25,33 +25,44 @@ In the following example, I will setup a server/client pair to connect www.googl
|
||||
## Create a docker-compose.yml
|
||||
|
||||
```yaml
|
||||
server:
|
||||
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
|
||||
version: "3.8"
|
||||
|
||||
client:
|
||||
image: vimagick/fteproxy
|
||||
ports:
|
||||
- "9009:80"
|
||||
links:
|
||||
- server
|
||||
environment:
|
||||
- MODE=client
|
||||
- SERVER_IP=server
|
||||
- SERVER_PORT=80
|
||||
- CLIENT_IP=0.0.0.0
|
||||
- CLIENT_PORT=80
|
||||
- KEY=CB2FBA2BC70490526E749E01BB050F6B555964290DFF58CF24785B4A093F7B18
|
||||
services:
|
||||
|
||||
server:
|
||||
image: vimagick/fteproxy
|
||||
ports:
|
||||
- "4911:4911"
|
||||
environment:
|
||||
- MODE=server
|
||||
- SERVER_IP=0.0.0.0
|
||||
- SERVER_PORT=4911
|
||||
- PROXY_IP=openvpn
|
||||
- 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
|
||||
```
|
||||
|
||||
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:
|
||||
> `xxd -u -p -c32 /dev/urandom | head -n1`
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Dockerfile for fteproxy-arm
|
||||
#
|
||||
|
||||
FROM easypi/alpine-arm
|
||||
FROM alpine:3
|
||||
MAINTAINER EasyPi Software Foundation
|
||||
|
||||
RUN set -xe \
|
||||
@ -19,17 +19,17 @@ RUN set -xe \
|
||||
python-dev \
|
||||
&& rm -rf /root/.cache /var/cache/apk/*
|
||||
|
||||
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
|
||||
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 --mode $MODE \
|
||||
--upstream-format $UPSTREAM_FORMAT \
|
||||
|
@ -1,12 +1,14 @@
|
||||
fteproxy:
|
||||
image: easypi/fteproxy-arm
|
||||
ports:
|
||||
- "1194:1194"
|
||||
environment:
|
||||
- MODE=client
|
||||
- SERVER_IP=vpn.easypi.info
|
||||
- SERVER_PORT=4911
|
||||
- CLIENT_IP=0.0.0.0
|
||||
- CLIENT_PORT=1194
|
||||
- KEY=66754b8113ea7a218b7613f73f7e13b1e91790216f659b5f78b903b34c654741
|
||||
restart: always
|
||||
version: "3.8"
|
||||
services:
|
||||
fteproxy:
|
||||
image: easypi/fteproxy-arm
|
||||
ports:
|
||||
- "1194:1194"
|
||||
environment:
|
||||
- MODE=client
|
||||
- SERVER_IP=vpn.easypi.info
|
||||
- SERVER_PORT=4911
|
||||
- CLIENT_IP=0.0.0.0
|
||||
- CLIENT_PORT=1194
|
||||
- KEY=66754b8113ea7a218b7613f73f7e13b1e91790216f659b5f78b903b34c654741
|
||||
restart: unless-stopped
|
||||
|
@ -1,27 +1,31 @@
|
||||
master:
|
||||
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
|
||||
version: "3.8"
|
||||
|
||||
bridge:
|
||||
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: always
|
||||
services:
|
||||
|
||||
server:
|
||||
image: vimagick/fteproxy
|
||||
ports:
|
||||
- "4911:4911"
|
||||
environment:
|
||||
- MODE=server
|
||||
- SERVER_IP=0.0.0.0
|
||||
- SERVER_PORT=4911
|
||||
- PROXY_IP=openvpn
|
||||
- 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…
Reference in New Issue
Block a user