mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-12-23 01:39:27 +02:00
add hans
This commit is contained in:
parent
7ef0ee4e0f
commit
e81047a200
@ -161,6 +161,7 @@ A collection of delicious docker recipes.
|
||||
- [x] delegated
|
||||
- [x] fteproxy :+1:
|
||||
- [x] fteproxy-arm :+1:
|
||||
- [x] hans
|
||||
- [x] haproxy-arm
|
||||
- [x] kcptun :cn:
|
||||
- [x] mysql-proxy
|
||||
|
22
hans/Dockerfile
Normal file
22
hans/Dockerfile
Normal file
@ -0,0 +1,22 @@
|
||||
#
|
||||
# Dockerfile for hans
|
||||
#
|
||||
|
||||
FROM alpine
|
||||
MAINTAINER kev <noreply@easypi.info>
|
||||
|
||||
RUN set -xe \
|
||||
&& apk add --no-cache build-base curl libstdc++ linux-headers tar \
|
||||
&& mkdir hans \
|
||||
&& cd hans \
|
||||
&& curl -sSL https://github.com/friedrich/hans/archive/v0.4.4.tar.gz | tar xz --strip 1 \
|
||||
&& make \
|
||||
&& mv hans /usr/bin/hans \
|
||||
&& cd .. \
|
||||
&& rm -rf hans \
|
||||
&& apk del build-base curl linux-headers tar
|
||||
|
||||
ENV NETWORK 10.1.2.0
|
||||
ENV PASSWORD password
|
||||
|
||||
CMD hans -f -s $NETWORK -p $PASSWORD
|
43
hans/README.md
Normal file
43
hans/README.md
Normal file
@ -0,0 +1,43 @@
|
||||
hans
|
||||
====
|
||||
|
||||
[Hans][1] makes it possible to tunnel IPv4 through ICMP echo packets, so you
|
||||
could call it a ping tunnel.
|
||||
|
||||
## docker-compose.yml
|
||||
|
||||
```yaml
|
||||
hans:
|
||||
image: vimagick/hans
|
||||
environment:
|
||||
- NETWORK=10.1.2.0
|
||||
- PASSWORD=password
|
||||
net: host
|
||||
privileged: yes
|
||||
restart: always
|
||||
```
|
||||
|
||||
## Server Setup
|
||||
|
||||
```bash
|
||||
$ docker-compose up -d
|
||||
```
|
||||
|
||||
## Client Setup
|
||||
|
||||
```bash
|
||||
# Run Client Program
|
||||
$ hans -f -c 1.2.3.4 -p password
|
||||
|
||||
# Access Server Directly
|
||||
$ ip route add 1.2.3.4 via 192.168.1.1
|
||||
|
||||
# Change Default Route (Method A)
|
||||
$ ip route change default via 10.1.2.1
|
||||
|
||||
# Change Default Route (Method B)
|
||||
$ ip route add 0.0.0.0/1 dev tun0
|
||||
$ ip route add 128.0.0.0/1 dev tun0
|
||||
```
|
||||
|
||||
[1]: http://code.gerade.org/hans/
|
8
hans/docker-compose.yml
Normal file
8
hans/docker-compose.yml
Normal file
@ -0,0 +1,8 @@
|
||||
hans:
|
||||
image: vimagick/hans
|
||||
environment:
|
||||
- NETWORK=10.1.2.0
|
||||
- PASSWORD=password
|
||||
net: host
|
||||
privileged: yes
|
||||
restart: always
|
Loading…
Reference in New Issue
Block a user