Change port forwarder to socat

This commit is contained in:
2018-11-01 03:17:46 +08:00
parent 9c3552d9b9
commit 8a7302ecc2
3 changed files with 7 additions and 6 deletions

View File

@ -6,7 +6,7 @@ WORKDIR /app
RUN apt-get update RUN apt-get update
RUN apt-get install -y gcc automake autoconf libssl-dev pkg-config git make ppp ssh RUN apt-get install -y gcc automake autoconf libssl-dev pkg-config git make ppp socat
RUN git clone https://github.com/adrienverge/openfortivpn RUN git clone https://github.com/adrienverge/openfortivpn
@ -24,4 +24,4 @@ WORKDIR /app
CMD bash docker-entrypoint.sh CMD bash docker-entrypoint.sh
EXPOSE 2200 EXPOSE 22

View File

@ -5,10 +5,11 @@
## Usage ## Usage
```bash ```bash
sudo docker run --device=/dev/ppp \ sudo docker run --cap-add=NET_ADMIN \
--cap-add=NET_ADMIN \ --device=/dev/ppp \
--restart=always \ --restart=always \
-p 65356:2200 \ -d \
-p 65356:22 \
--name gectunnel pinlin/gectunnel --name gectunnel pinlin/gectunnel
``` ```

View File

@ -6,6 +6,6 @@ sleep 3s
while true while true
do do
ssh -o "ExitOnForwardFailure yes" -NL 2200:192.168.80.240:22 localhost socat TCP-LISTEN:22,fork TCP:192.168.80.240:22
sleep 1s sleep 1s
done done