1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-25 16:28:40 +00:00
dockerfiles/fteproxy/README.md

86 lines
2.1 KiB
Markdown
Raw Normal View History

2015-09-03 02:46:51 +00:00
fteproxy
========
[fteproxy][1] provides transport-layer protection to resist keyword filtering,
2015-05-26 23:14:55 +00:00
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.
2015-09-03 02:46:51 +00:00
It works very well with [vimagick/openvpn][2](TCP mode).
2015-05-26 23:14:55 +00:00
In the following example, I will setup a server/client pair to connect www.google.com:80.
2015-09-03 02:46:51 +00:00
## Internet Censorship
### The problem
2015-05-27 11:17:15 +00:00
![before](https://fteproxy.org/images/withoutfte.png)
2015-09-03 02:46:51 +00:00
### The solution
2015-05-27 11:17:15 +00:00
![after](https://fteproxy.org/images/withfte.png)
2015-05-26 23:14:55 +00:00
## Create a docker-compose.yml
2015-05-27 12:02:23 +00:00
```yaml
2015-05-26 23:14:55 +00:00
server:
image: vimagick/fteproxy
ports:
- "80"
environment:
2017-09-02 05:45:27 +00:00
- MODE=server
- SERVER_IP=0.0.0.0
- SERVER_PORT=80
- PROXY_IP=www.google.com
- PROXY_PORT=80
- KEY=CB2FBA2BC70490526E749E01BB050F6B555964290DFF58CF24785B4A093F7B18
2015-05-26 23:14:55 +00:00
client:
image: vimagick/fteproxy
ports:
- "9009:80"
links:
- server
environment:
2017-09-02 05:45:27 +00:00
- MODE=client
- SERVER_IP=server
- SERVER_PORT=80
- CLIENT_IP=0.0.0.0
- CLIENT_PORT=80
- KEY=CB2FBA2BC70490526E749E01BB050F6B555964290DFF58CF24785B4A093F7B18
2015-05-26 23:14:55 +00:00
```
2015-05-27 02:25:59 +00:00
> To generate random key:
> `xxd -u -p -c32 /dev/urandom | head -n1`
2015-05-26 23:14:55 +00:00
## Run fteproxy server/client
2015-05-27 12:02:23 +00:00
```bash
2015-05-26 23:14:55 +00:00
$ 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
2015-05-27 12:02:23 +00:00
```html
2015-05-26 23:14:55 +00:00
$ 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>
```
2015-09-03 02:46:51 +00:00
[1]: https://fteproxy.org/
[2]: https://hub.docker.com/r/vimagick/openvpn/