Skip to content

Commit b8a84bc

Browse files
author
GNBDEV
committed
ver1.3.0.c
1 parent db2715b commit b8a84bc

File tree

3 files changed

+403
-389
lines changed

3 files changed

+403
-389
lines changed

README.md

Lines changed: 80 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,28 @@
11
# OpenGNB
22

3-
version 1.3.0.0 protocol version 1.2.0
3+
[English](/README.md) [Chinese](/README_CN.md)
44

5-
[Chinese](/README.md) [English](/README_EN.md)
5+
*Note: Most of the content of this article is translated by Google translate from the Chinese version of the "OpenGNB User Manual", the content of this article is subject to the Chinese version.*
66

7-
[OpenGNB](https://github.com/gnbdev/opengnb "OpenGNB") 是一个开源的 P2P 去中心化的具有极致的内网穿透能力的软件自定义虚拟网络(Software Defined Virtual Network),可以让你把公司-家庭网络组成直接访问的局域网。
7+
[OpenGNB](https://github.com/gnbdev/opengnb "OpenGNB") is an open source P2P decentralized Software Defined Virtual Network with extreme intranet penetration capability,Allows you to combine your company-home network into a direct-access LAN.
88

9-
## GNB 特点
9+
All code related to the GNB project is released as open source, and the currently released source code supports the following platforms: FreeBSD Linux OpenWRT Raspberrypi OpenBSD macOS
1010

11-
1. 极致的链路能力
12-
- 内网穿透,无需公网IP,无限速影响,***upnp******multi index******port detect***,***multi socket*** 等策略实现内网穿透
13-
- Discover in lan 自动发现局域网内其他节点建立 P2P 通信
14-
- Unified Forwarding 自动通过已经建立 P2P 通信的节点转发 IP 分组,多节点重传 IP 分组
15-
- Relay Forwarding 高度自定义中继路由,IP 分组发往下一个中继点前都会作加密处理
16-
- Standard Forwarding 用尽一切办法无法建立起 P2P 通信的节点可以通过位于公网 forward 节点中继 IP 分组
1711

18-
2. 数据安全
19-
- 基于椭圆曲线数字签名实现可靠的身份验证
20-
- 根据时间同步变更通信密钥
21-
- 默认选项下对日志中的敏感信息进行隐藏
12+
## GNB Features
2213

23-
3. 多平台支持
24-
- GNB 用 C 语言开发,项目相关代码以开源方式发布, 编译时不需要引用第三方库文件,可以方便移植到当前流行的操作系统上,目前支持的操作系统及平台有 Linux_x86_64,Windows10_x86_64, macOS,FreeBSD_AMD64,OpenBSD_AMD64,树莓派,OpenWRT;大至服务器环境,桌面系统,小至仅有 32M 内存的OpenWRT路由器都能很好的运行 GNB 网络。
14+
1. Intranet penetration P2P VPN
15+
- No public IP required
16+
2. Extreme link capability
17+
- Unlimited speed effects
18+
3. Data Security
19+
- Reliable authentication between GNB nodes based on elliptic curve digital signature
20+
4. Multi-platform support
21+
- GNB is developed in C language. It does not need to refer to third-party library files when compiling. It can be easily ported to the current popular operating systems. Currently supported operating systems and platforms include Linux_x86_64, Windows10_x86_64, macOS, FreeBSD_AMD64, OpenBSD_AMD64, Raspberry Pi, OpenWRT; as big as server environment, desktop system, as small as OpenWRT router with only 32M memory can run GNB network very well.
2522

2623

2724
### Standard VPN payload forwarding
25+
2826
```mermaid
2927
flowchart LR
3028
@@ -46,6 +44,7 @@ nodea <-- payload ---> nodef <-- payload ---> nodeb
4644

4745

4846
### GNB payload standard forwarding
47+
4948
NAT Traversal point to point
5049

5150
```mermaid
@@ -69,6 +68,7 @@ nodeA <-- payload --> nodeB
6968
```
7069

7170
### GNB payload relay forwarding
71+
7272
```mermaid
7373
flowchart LR
7474
@@ -120,7 +120,7 @@ nodeD[gnb nodeD]
120120
end
121121
122122
subgraph LAN E
123-
nodeE[gnb nodeE]
123+
nodeE[gnb nodee]
124124
end
125125
126126
@@ -154,37 +154,40 @@ nodeA --UDP payload--- upd_over_tcp_A --TCP payload--- upd_over_tcp_B --UDP payl
154154
```
155155

156156

157-
## GNB 快速上手
158157

159-
* Linux 平台
158+
## GNB Quick Start
160159

161-
### 步骤1: 下载编译 GNB 源码工程
160+
* Linux platform
161+
162+
### Step 1: Download and compile the GNB source code project
162163

163164
```
164165
git clone https://github.com/gnbdev/opengnb.git
165166
cd opengnb
166167
make -f Makefile.linux install
167168
```
168-
编译完毕后在 `opengnb/bin/` 目录下可以得到 `gnb` `gnb_crypto` `gnb_ctl` `gnb_es` 这几个文件。
169+
After compiling, you can get `gnb` `gnb_crypto` `gnb_ctl` `gnb_es` files in the `opengnb/bin/` directory.
170+
171+
### Step 2: Quickly deploy GNB nodes
169172

170-
### 步骤2: 快捷部署 GNB 节点
171-
`gnb` `gnb_crypto` `gnb_ctl` `gnb_es` 分别拷贝到主机 A 和主机 B 上。
173+
Copy `gnb` `gnb_crypto` `gnb_ctl` `gnb_es` to host A and host B respectively.
172174

173-
假设主机 A 和主机 B 分别在两个不同的局域网里需要临时穿透内网互联,最快捷的途径通过 lite 模式运行 gnb,在 lite 模式下没有启用非对称加密,仅通过 **passcode** 和节点 id 生成加密密钥,因此安全性会比使用非对称加密的工作模块式低很多。
175+
Assuming that host A and host B need to temporarily penetrate the intranet interconnection in two different LANs, the fastest way is to run gnb through lite mode. In lite mode, asymmetric encryption is not enabled, and only through **passcode** and The node id generates the encryption key, so the security will be much less modular than working with asymmetric encryption.
174176

175-
**passcode** 是一个长度为8个字符的32bit的16进制字符串,可以表示为 **0xFFFFFFFF** **FFFFFFFF**, 在一个 public index **passcode** 相同的 GNB 节点被认为是同一个虚拟网络上的节点,请尽可能选择一个不会跟其他用户相同的 **passcode**,这里为了方便演示选定 **passcode** `12345678`, 参数 **-p** 用于指定启动节点的 **passcode**。在实际使用过程中请勿使用这样简单 **passcode**,这可能会与其他同样使用`12345678`作为的 **passcode** 的用户冲突导致通信失败。
177+
**passcode** is a 32-bit hexadecimal string with a length of 8 characters, which can be represented as **0xFFFFFFFF** or **FFFFFFFF**, under a public index **passcode** is the same GNB node It is considered to be a node on the same virtual network. Please choose a **passcode** that will not be the same as other users as much as possible. Here, for the convenience of demonstration, the **passcode** is selected as `12345678`, and the parameter **-p ** Used to specify the **passcode** to start the node. Do not use such a simple **passcode** in actual use, it may conflict with other users who also use `12345678` as **passcode** and cause communication failure.
176178

177-
### 步骤3: 启动第一个节点
178-
主机 A 上用 **root** 执行
179+
### Step 3: Start the first node
180+
181+
Execute with **root** on host A
179182

180183
```
181184
gnb -n 1001 -I "120.76.206.113/9001" --multi-socket=on -p 12345678
182185
```
183186

184-
启动成功后,主机 A 上执行 ip addr 可见 GNB 节点 IP
187+
After the startup is successful, execute ip addr on host A to see the GNB node IP
185188

186189
```
187-
3: gnb_tun: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1280 qdisc fq_codel state UNKNOWN group default qlen 500
190+
3: gnb_do:mtu 1280 qdisc fq_codel state UNKNOWN group default qlen 500
188191
link/none
189192
inet 10.1.0.1/16 scope global gnb_tun
190193
valid_lft forever preferred_lft forever
@@ -194,16 +197,17 @@ gnb -n 1001 -I "120.76.206.113/9001" --multi-socket=on -p 12345678
194197
valid_lft forever preferred_lft forever
195198
```
196199

197-
### 步骤4: 启动第二个节点
198-
主机 B 上用 **root** 执行
200+
### Step 4: Start the second node
201+
202+
Execute with **root** on host B
199203

200204
```
201205
gnb -n 1002 -I "120.76.206.113/9001" --multi-socket=on -p 12345678
202206
```
203-
启动成功后,主机 B 上执行 ip addr 可见 GNB 节点 IP
207+
After the startup is successful, execute ip addr on host B to see the GNB node IP
204208

205209
```
206-
3: gnb_tun: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1280 qdisc fq_codel state UNKNOWN group default qlen 500
210+
3: gnb_do:mtu 1280 qdisc fq_codel state UNKNOWN group default qlen 500
207211
link/none
208212
inet 10.1.0.2/16 scope global gnb_tun
209213
valid_lft forever preferred_lft forever
@@ -213,13 +217,14 @@ gnb -n 1002 -I "120.76.206.113/9001" --multi-socket=on -p 12345678
213217
valid_lft forever preferred_lft forever
214218
```
215219

216-
### 步骤5:测试 GNB 节点互通
217-
此时,如果主机 A 和主机 B nat 穿透成功并确保主机上没有防火墙的干预的情况下,可以互相 ping 到对方的虚拟 ip。
220+
### Step 5: Test GNB Node Interoperability
218221

219-
主机 A 上执行
222+
At this point, if host A and host B nat penetrate successfully and ensure that there is no firewall intervention on the host, they can ping each other's virtual ip.
223+
224+
Execute on host A
220225

221226
```
222-
root@hostA:~# ping 10.1.0.2
227+
root @ hostA: ~ # ping 10.1.0.2
223228
PING 10.1.0.2 (10.1.0.2) 56(84) bytes of data.
224229
64 bytes from 10.1.0.2: icmp_seq=1 ttl=64 time=2.13 ms
225230
64 bytes from 10.1.0.2: icmp_seq=2 ttl=64 time=2.18 ms
@@ -228,10 +233,10 @@ PING 10.1.0.2 (10.1.0.2) 56(84) bytes of data.
228233
64 bytes from 10.1.0.2: icmp_seq=5 ttl=64 time=2.33 ms
229234
```
230235

231-
主机 B 上执行
236+
Execute on host B
232237

233238
```
234-
root@hostA:~# ping 10.1.0.1
239+
root @ hostA: ~ # ping 10.1.0.1
235240
PING 10.1.0.1 (10.1.0.1) 56(84) bytes of data.
236241
64 bytes from 10.1.0.1: icmp_seq=1 ttl=64 time=2.34 ms
237242
64 bytes from 10.1.0.1: icmp_seq=2 ttl=64 time=1.88 ms
@@ -240,77 +245,82 @@ PING 10.1.0.1 (10.1.0.1) 56(84) bytes of data.
240245
64 bytes from 10.1.0.1: icmp_seq=5 ttl=64 time=2.39 ms
241246
```
242247

243-
以上是 GNB lite 模式的最简使用过程,GNB lite 模式内置5个节点,如果需要更多主机参与组网和使用更安全的非对称加密方式保护 GNB 的数据通信,请仔细阅读下面的文档。
248+
The simplest use process of the above GNB lite mode, GNB lite mode has 5 built-in nodes, if you need more hosts to participate in the networking and use a more secure asymmetric encryption method to protect the data communication of GNB, please read the following documents carefully.
244249

245250

246-
## 深入理解 GNB 指引
247251

252+
## Deep understanding of GNB guidelines
248253

249-
GNB 的 index 节点的角色类似于 BT 协议中的 Tracker,由一部分 GNB 网络志愿者提供。在绝大多数情况下`index`节点仅为 GNB 网内主机提供地址索引,不会为 GNB 节点中转数据。
250254

251-
GNB 主机之间的非对称数据加密使得 **forward** 节点无法窥探中转的数据。
255+
The role of the index node of GNB is similar to the Tracker in the BT protocol, which is provided by some GNB network volunteers. In most cases, the `index` node only provides the address index for the hosts in the GNB network, and will not transfer data for the GNB node.
252256

253-
在无法建立点对点通信的极端情况下,是否通过公网 **forward** 节点中转数据和使用哪个可信任的 **forward** 节点中转数据,完全取决在主机的拥有者对 GNB 节点的设置。事实上,即便处于极其复杂的网络环境,GNB 优越链路能力也可以随时随地建立虚拟数据链路,GNB 甚至会为网络中的节点创建多个虚拟链路,择速度最优路径发送数据分组。
257+
The `forward` node of GNB provided by some volunteers can perform data transfer for hosts that are temporarily unable to perform point-to-point communication in extreme cases, and the asymmetric data encryption between GNB hosts makes it impossible for the `forward` node to spy on the transferred data.
254258

259+
In extreme cases where peer-to-peer communication cannot be established, whether to transfer data through the public network `forward` node and which trusted forward node to use to transfer data depends entirely on the host owner's settings on the GNB node. In fact, even in an extremely complex network environment, GNB's superior link capability can establish virtual data links anytime, anywhere. GNB will even create multiple virtual links for hosts in the network, and choose the optimal speed path to send data packets.
255260

256-
这是由志愿者提供的可用`index`节点
261+
Here are the available `index` nodes provided by volunteers
257262

258263
```
259264
i|0|110.238.106.225|9001
265+
i|0|120.76.206.113|9001
260266
i|0|101.32.178.3|9001
261267
i|0|47.93.29.76|9001
262268
```
263269

264270

265-
## GNB 的限制
266271

267-
1. GNB 不支持 *无类别域间路由(Classless Inter-Domain Routing、CIDR)*, 仅支持 A,B,C 类网络;
268-
2. GNB 不转发默认路由(Default route)的 IP 帧,在`host to net``net to net` 模式下 GNB 可以为特定的子网的数据做转发,但不支持全流量转发;
269-
3. 在 Windows 平台下 GNB 的 IPV6 目前无法正常工作;
270-
4. GNB 的使用虚拟网卡的工作在 TUN 模式下实现三层交换,不支持 TAP 模式即不支持二层交换;
272+
## Limitations of GNB
273+
274+
1. GNB does not support *Classless Inter-Domain Routing (CIDR)*, only supports Class A, B, C networks;
275+
2. GNB does not forward IP frames of Default route. In `host to net` and `net to net` modes, GNB can forward data for specific subnets, but does not support full traffic forwarding;
276+
3. The IPV6 of GNB cannot work normally under Windows platform;
277+
4. The work of GNB using virtual network card realizes Layer 3 switching in TUN mode, and does not support Layer 2 switching if it does not support TAP mode;
271278

272279

273-
### GNB 相关文档
274280

275-
* [GNB 用户手册](docs/gnb_user_manual_cn.md)
276-
* [GNB 的调试诊断](docs/gnb_diagnose_cn.md)
281+
### GNB related documentation
277282

283+
* [GNB User Manual](docs/gnb_user_manual_en.md)
284+
* [Debug diagnostics for GNB](docs/gnb_diagnose_cn.md)
278285

279-
## GNB在OpenWRT上
280286

281-
GNB 支持 OpenWRT 平台,需要用户自行编译。
282287

288+
## GNB on OpenWRT
283289

284-
## GNB 在 Linux 发行版上
290+
GNB supports the OpenWRT platform and needs to be compiled by the user.
285291

286-
[金步国](https://github.com/jinbuguo) 为 GNB 项目制作了 systemd 的脚本
287292

288-
[铜豌豆 Linux](https://www.atzlinux.com)项目为 GNB 项目制做了 Linux 下的 deb 格式软件包,将其贡献成为 Debian 官方软件包.
293+
## GNB on Linux distributions
289294

290-
可以在 Debian 12 (bookworm) 下直接安装:
295+
The systemd script was made by [Jin Buguo](https://github.com/jinbuguo) for the GNB project
296+
297+
The [atzlinux](https://www.atzlinux.com) project has made a deb format software package under Linux for the GNB project, and contributed it to become the official Debian software package.
298+
299+
You may install opengnb on Debian 12 (bookworm) :
291300

292301
```bash
293302
apt install opengnb
294303
```
295304

296-
- Arch Linux
297305

298-
[taotieren](https://github.com/taotieren) 为 GNB 项目制作了 Arch Linux 的 AUR 包
306+
- Arch Linux
299307

300-
详情请访问 [https://aur.archlinux.org/packages/opengnb/](https://aur.archlinux.org/packages/opengnb/)
308+
The AUR package of Arch Linux was made by [taotieren](https://github.com/taotieren) for the GNB project. The installation method is as follows
309+
```bash
310+
# install distribution
311+
yay -Sy opengnb
312+
# Install the development version
313+
yay -Sy opengnb-git
314+
```
315+
For details, please visit [https://aur.archlinux.org/packages/opengnb/](https://aur.archlinux.org/packages/opengnb/)
301316

302317
[https://aur.archlinux.org/packages/opengnb-git/](https://aur.archlinux.org/packages/opengnb-git/)
303318

319+
[Download the compiled and released version of gnb on each platform](https://github.com/gnbdev/gnb_build "gnb_build")
304320

305-
### 相关链接
306-
307-
[wuqiong](https://www.github.com/wuqiong) 为 GNB 在Windows平台上开发了 wintun 虚拟网卡的接口模块
308-
309-
310-
[gnb 在各平台的编译发行版下载](https://github.com/gnbdev/gnb_build "gnb_build")
311321

312322

313-
[gnb_udp_over_tcp](https://github.com/gnbdev/gnb_udp_over_tcp "gnb_udp_over_tcp") 是一个为 GNB 开发的通过 tcp 链路中转 UDP 分组转发的服务,也可以为其他基于 UDP 协议的服务中转数据。
323+
[gnb_udp_over_tcp](https://github.com/gnbdev/gnb_udp_over_tcp "gnb_udp_over_tcp") is a service developed for GNB that forwards UDP packets through tcp link, and can also forward data for other services based on UDP protocol.
314324

315325
---
316-
[免责声明](docs/disclaimer_cn.md)
326+
[Disclaimer](docs/disclaimer_cn.md)

0 commit comments

Comments
 (0)