From 67c809b48608092f744e6d1dbb9728c2fbed928f Mon Sep 17 00:00:00 2001 From: "rui.zheng" Date: Sat, 5 Aug 2017 23:53:04 +0800 Subject: [PATCH] update README --- README.md | 9 ++++++++- README_en.md | 7 +++++-- snapcraft.yaml | 21 +++++++++++++++++++++ 3 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 snapcraft.yaml diff --git a/README.md b/README.md index 56dfc5d..c08b71f 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ protocol: 代理协议类型(http, socks4(a), socks5, ss), transport: 数据传 > quic - QUIC通道: quic://:6121 -> kcp - KCP通道: kcp://:8388或kcp://aes:123456@:8388 +> kcp - KCP通道: kcp://:8388 > redirect - 透明代理: redirect://:12345 @@ -156,11 +156,13 @@ gost -L=http2://:443 -L=socks5://:1080 -L=ss://aes-128-cfb:123456@:8338 #### 设置转发代理 + ```bash gost -L=:8080 -F=192.168.1.1:8081 ``` * 转发代理认证 + ```bash gost -L=:8080 -F=http://admin:123456@192.168.1.1:8081 ``` @@ -168,9 +170,11 @@ gost -L=:8080 -F=http://admin:123456@192.168.1.1:8081 #### 设置多级转发代理(代理链) + ```bash gost -L=:8080 -F=quic://192.168.1.1:6121 -F=socks5+wss://192.168.1.2:1080 -F=http2://192.168.1.3:443 ... -F=a.b.c.d:NNNN ``` + gost按照-F设置的顺序通过代理链将请求最终转发给a.b.c.d:NNNN处理,每一个转发代理可以是任意HTTP/HTTPS/HTTP2/SOCKS4/SOCKS5/Shadowsocks类型代理。 #### 本地端口转发(TCP) @@ -178,6 +182,7 @@ gost按照-F设置的顺序通过代理链将请求最终转发给a.b.c.d:NNNN ```bash gost -L=tcp://:2222/192.168.1.1:22 [-F=...] ``` + 将本地TCP端口2222上的数据(通过代理链)转发到192.168.1.1:22上。当代理链末端(最后一个-F参数)为SSH转发通道类型时,gost会直接使用SSH的本地端口转发功能: ```bash @@ -189,6 +194,7 @@ gost -L=tcp://:2222/192.168.1.1:22 -F forward+ssh://:2222 ```bash gost -L=udp://:5353/192.168.1.1:53?ttl=60 [-F=...] ``` + 将本地UDP端口5353上的数据(通过代理链)转发到192.168.1.1:53上。 每条转发通道都有超时时间,当超过此时间,且在此时间段内无任何数据交互,则此通道将关闭。可以通过`ttl`参数来设置超时时间,默认值为60秒。 @@ -211,6 +217,7 @@ gost -L=rtcp://:2222/192.168.1.1:22 -F forward+ssh://:2222 gost -L=rudp://:5353/192.168.1.1:53 [-F=...] ``` 将172.24.10.1:5353上的数据(通过代理链)转发到192.168.1.1:53上。 +每条转发通道都有超时时间,当超过此时间,且在此时间段内无任何数据交互,则此通道将关闭。可以通过`ttl`参数来设置超时时间,默认值为60秒。 **注:** 转发UDP数据时,如果有代理链,则代理链的末端(最后一个-F参数)必须是gost SOCKS5类型代理,gost会使用UDP over TCP方式进行转发。 diff --git a/README_en.md b/README_en.md index 1f0e9a9..00263e4 100644 --- a/README_en.md +++ b/README_en.md @@ -75,7 +75,7 @@ transport: data transmission mode (ws, wss, tls, quic, kcp, ssh, h2, h2c, obfs4) > quic - QUIC tunnel: quic://:6121 -> kcp - KCP tunnel: kcp://:8388 or kcp://aes:123456@:8388 +> kcp - KCP tunnel: kcp://:8388 > redirect - transparent proxy: redirect://:12345 @@ -155,6 +155,7 @@ gost -L=http2://:443 -L=socks5://:1080 -L=ss://aes-128-cfb:123456@:8338 #### Forward proxy + ```bash gost -L=:8080 -F=192.168.1.1:8081 ``` @@ -167,6 +168,7 @@ gost -L=:8080 -F=http://admin:123456@192.168.1.1:8081 #### Multi-level forward proxy + ```bash gost -L=:8080 -F=quic://192.168.1.1:6121 -F=socks5+wss://192.168.1.2:1080 -F=http2://192.168.1.3:443 ... -F=a.b.c.d:NNNN ``` @@ -208,9 +210,10 @@ gost -L=rtcp://:2222/192.168.1.1:22 -F forward+ssh://:2222 #### Remote UDP port forwarding ```bash -gost -L=rudp://:5353/192.168.1.1:53 [-F=...] +gost -L=rudp://:5353/192.168.1.1:53?ttl=60 [-F=...] ``` The data on 172.24.10.1:5353 is forwarded to 192.168.1.1:53 (through the proxy chain). +Each forwarding channel has a timeout period. When this time is exceeded and there is no data interaction during this time period, the channel will be closed. The timeout value can be set by the `ttl` parameter. The default value is 60 seconds. **NOTE:** When forwarding UDP data, if there is a proxy chain, the end of the chain (the last -F parameter) must be gost SOCKS5 proxy, gost will use UDP-over-TCP to forward data. diff --git a/snapcraft.yaml b/snapcraft.yaml new file mode 100644 index 0000000..028e114 --- /dev/null +++ b/snapcraft.yaml @@ -0,0 +1,21 @@ +name: gost # you probably want to 'snapcraft register ' +version: '2.4' # just for humans, typically '1.2+git' or '1.3.2' +summary: GO Simple Tunnel +description: | + A simple tunnel written in golang + +grade: stable +confinement: strict # use 'strict' once you have the right plugs and slots + +apps: + gost: + command: bin/gost + plugs: [network, network-bind, home] + +parts: + gost: + source: . + # See 'snapcraft plugins' + plugin: go + go-packages: [github.com/ginuerzh/gost/cmd/gost] + go-importpath: github.com/ginuerzh/gost