1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-12-16 11:37:32 +02:00
dockerfiles/fteproxy/README.md
2015-05-27 07:14:55 +08:00

64 lines
1.6 KiB
Markdown

`fteproxy` provides transport-layer protection to resist keyword filtering,
censorship and discriminatory routing policies.
Its job is to relay datastreams, such as web browsing traffic,
by encoding streams as messages that match a user-specified regular expression.
fteproxy is fast, free, open source, and cross platform.
In the following example, I will setup a server/client pair to connect www.google.com:80.
## Create a docker-compose.yml
```
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"
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"
```
## Run fteproxy server/client
```
$ docker-compose up -d
Creating fteproxy_server_1...
Creating fteproxy_client_1...
$ docker-compose ps
Name Command State Ports
----------------------------------------------------------------------------------
fteproxy_client_1 /bin/sh -c /fteproxy/ftepr ... Up 0.0.0.0:9009->80/tcp
fteproxy_server_1 /bin/sh -c /fteproxy/ftepr ... Up 0.0.0.0:32768->80/tcp
```
## Test with curl
```
$ curl http://localhost:9009/
<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<TITLE>302 Moved</TITLE></HEAD><BODY>
<H1>302 Moved</H1>
The document has moved
<A HREF="http://www.google.com/">here</A>.
</BODY></HTML>
```