📃 docs: 优化显示

This commit is contained in:
m1m1sha
2024-05-07 20:27:31 +08:00
parent 56a3bad8c5
commit c2085e883b
14 changed files with 145 additions and 16 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

+56 -1
View File
@@ -1,3 +1,58 @@
# Configurations
You can use ``easytier-core --help`` to view all configuration items
You can use ``easytier-core --help`` to view all configuration items
```` sh
Options:
--network-name <NETWORK_NAME>
network name to identify this vpn network
[default: default]
--network-secret <NETWORK_SECRET>
network secret to verify this node belongs to the vpn network
[default: ]
-i, --ipv4 <IPV4>
ipv4 address of this vpn node
-p, --peers <PEERS>
peers to connect initially
-e, --external-node <EXTERNAL_NODE>
use a public shared node to discover peers
-n, --proxy-networks <PROXY_NETWORKS>
export local networks to other peers in the vpn
-r, --rpc-portal <RPC_PORTAL>
rpc portal address to listen for management
[default: 127.0.0.1:15888]
-l, --listeners <LISTENERS>
listeners to accept connections, pass '' to avoid listening.
[default: tcp://0.0.0.0:11010 udp://0.0.0.0:11010 wg://0.0.0.0:11011]
--net-ns <NET_NS>
specify the linux network namespace, default is the root namespace
--console-log-level <CONSOLE_LOG_LEVEL>
console log level
[possible values: trace, debug, info, warn, error, off]
--file-log-level <FILE_LOG_LEVEL>
file log level
[possible values: trace, debug, info, warn, error, off]
--file-log-dir <FILE_LOG_DIR>
directory to store log files
-m, --instance-name <INSTANCE_NAME>
instance name to identify this vpn node in same machine
[default: default]
-d, --instance-id <INSTANCE_ID>
instance uuid to identify this vpn node in whole vpn network example: 123e4567-e89b-12d3-a456-426614174000
--vpn-portal <VPN_PORTAL>
url that defines the vpn portal, allow other vpn clients to connect.
example: wg://0.0.0.0:11010/10.14.14.0/24, means the vpn portal is a wireguard server listening on vpn.example.com:11010, and the vpn client is in network of 10.14.14.0/24
--default-protocol <DEFAULT_PROTOCOL>
default protocol to use when connecting to peers
-u, --disable-encryption
disable encryption for peers communication, default is false, must be same with peers
--multi-thread
use multi-thread runtime, default is single-thread
--disable-ipv6
do not use ipv6
-h, --help
Print help
-V, --version
Print version
````
+1 -1
View File
@@ -2,7 +2,7 @@
Based on the two-node networking example just now, if more nodes need to join the virtual network, you can use the following command.
```
```sh
sudo easytier-core --ipv4 10.144.144.2 --peers udp://22.1.1.1:11010
```
+4 -1
View File
@@ -32,7 +32,10 @@ Subnet proxy information will automatically sync to each node in the virtual net
```sh
easytier-cli route
```
![alt text](/assets/image-3.png)
| ipv4 | hostname | proxy_cidrs | next_hop_ipv4 | next_hop_hostname | next_hop_lat | cost |
| :----------- | :------- | :---------- | :------------ | :---------------- | :----------- | :--- |
| 10.144.144.1 | abc-dec | 10.1.1.0/24 | DIRECT | | 3.25 | 1 |
2. Test whether Node A can access nodes under the proxied subnet
+37 -3
View File
@@ -23,7 +23,36 @@ nodea <-----> nodeb
```
Successful execution of the command will print the following.
![alt text](/assets/image-2.png)
```sh
$ easytier-core --ipv4 10.144.144.1
Starting easytier with config:
############### TOML ##############
instance_name = "default"
instance_id = "7294d13c-d119-49ae-a5f7-8c3a912538d7"
ipv4 = "10.144.144.1"
listeners = [
"tcp://0.0.0.0:11010",
"udp://0.0.0.0:11010",
"wg://0.0.0.0:11011",
]
peer = []
rpc_portal = "127.0.0.1:15888"
[network_identity]
network_name = "default"
network_secret = ""
[flags]
default_protocol = "tcp"
enable_encryption = true
enable_ipv6 = true
-----------------------------------
xxxx-xx-xx xx:xx:xx: tun device ready. dev: tun0
xxxx-xx-xx xx:xx:xx: new listener added. listener: tcp://0.0.0.0:11010
xxxx-xx-xx xx:xx:xx: new listener added. listener: udp://0.0.0.0:11010
````
2. Execute on Node B
```sh
@@ -41,10 +70,15 @@ nodea <-----> nodeb
```sh
easytier-cli peer
```
![alt text](/assets/image.png)
| ipv4 | hostname | cost | lat_ms | loss_rate | rx_bytes | tx_bytes | tunnel_proto | nat_type | id |
| :------------ | :------- | :--- | :----- | :-------- | :------- | :------- | :----------- | :------- | :-------- |
| 10.144.144.1 | abc-dec | 1 | 3.452 | 0 | 17.33kB | 20.42kB | udp | FullCone | 390879727 |
```sh
easytier-cli route
```
![alt text](/assets/image-1.png)
| ipv4 | hostname | proxy_cidrs | next_hop_ipv4 | next_hop_hostname | next_hop_lat | cost |
| :----------- | :------- | :---------- | :------------ | :---------------- | :----------- | :--- |
| 10.144.144.1 | abc-dec | | DIRECT | | 3.646 | 1 |
---
@@ -26,14 +26,14 @@ To enable an iPhone to access the EasyTier network through Node A, the following
Include the --vpn-portal parameter in the easytier-core command on Node A to specify the port that the WireGuard service listens on and the subnet used by the WireGuard network.
```
```sh
# The following parameters mean: listen on port 0.0.0.0:11013, and use the 10.14.14.0/24 subnet for WireGuard
sudo easytier-core --ipv4 10.144.144.1 --vpn-portal wg://0.0.0.0:11013/10.14.14.0/24
```
After successfully starting easytier-core, use easytier-cli to obtain the WireGuard client configuration.
```
```sh
$> easytier-cli vpn-portal
portal_name: wireguard
+1 -1
View File
@@ -2,7 +2,7 @@
基于刚才的双节点组网例子,如果有更多的节点需要加入虚拟网络,可以使用如下命令。
```
```sh
sudo easytier-core --ipv4 10.144.144.2 --peers udp://22.1.1.1:11010
```
+4 -1
View File
@@ -32,7 +32,10 @@ sudo easytier-core --ipv4 10.144.144.2 -n 10.1.1.0/24
```sh
easytier-cli route
```
![alt text](/assets/image-3.png)
| ipv4 | hostname | proxy_cidrs | next_hop_ipv4 | next_hop_hostname | next_hop_lat | cost |
| :----------- | :------- | :---------- | :------------ | :---------------- | :----------- | :--- |
| 10.144.144.1 | abc-dec | 10.1.1.0/24 | DIRECT | | 3.25 | 1 |
2. 测试节点 A 是否可访问被代理子网下的节点
+37 -3
View File
@@ -23,7 +23,36 @@
```
命令执行成功会有如下打印。
![alt text](/assets/image-2.png)
```sh
$ easytier-core --ipv4 10.144.144.1
Starting easytier with config:
############### TOML ##############
instance_name = "default"
instance_id = "7294d13c-d119-49ae-a5f7-8c3a912538d7"
ipv4 = "10.144.144.1"
listeners = [
"tcp://0.0.0.0:11010",
"udp://0.0.0.0:11010",
"wg://0.0.0.0:11011",
]
peer = []
rpc_portal = "127.0.0.1:15888"
[network_identity]
network_name = "default"
network_secret = ""
[flags]
default_protocol = "tcp"
enable_encryption = true
enable_ipv6 = true
-----------------------------------
xxxx-xx-xx xx:xx:xx: tun device ready. dev: tun0
xxxx-xx-xx xx:xx:xx: new listener added. listener: tcp://0.0.0.0:11010
xxxx-xx-xx xx:xx:xx: new listener added. listener: udp://0.0.0.0:11010
````
2. 在节点 B 执行
```sh
@@ -41,10 +70,15 @@
```sh
easytier-cli peer
```
![alt text](/assets/image.png)
| ipv4 | hostname | cost | lat_ms | loss_rate | rx_bytes | tx_bytes | tunnel_proto | nat_type | id |
| :------------ | :------- | :--- | :----- | :-------- | :------- | :------- | :----------- | :------- | :-------- |
| 10.144.144.1 | abc-dec | 1 | 3.452 | 0 | 17.33kB | 20.42kB | udp | FullCone | 390879727 |
```sh
easytier-cli route
```
![alt text](/assets/image-1.png)
| ipv4 | hostname | proxy_cidrs | next_hop_ipv4 | next_hop_hostname | next_hop_lat | cost |
| :----------- | :------- | :---------- | :------------ | :---------------- | :----------- | :--- |
| 10.144.144.1 | abc-dec | | DIRECT | | 3.646 | 1 |
---
@@ -26,14 +26,14 @@ ios <-.-> nodea <--> nodeb <-.-> id1
在节点 A 的 easytier-core 命令中,加入 --vpn-portal 参数,指定 WireGuard 服务监听的端口,以及 WireGuard 网络使用的网段。
```
```sh
# 以下参数的含义为: 监听 0.0.0.0:11013 端口,WireGuard 使用 10.14.14.0/24 网段
sudo easytier-core --ipv4 10.144.144.1 --vpn-portal wg://0.0.0.0:11013/10.14.14.0/24
```
easytier-core 启动成功后,使用 easytier-cli 获取 WireGuard Client 的配置。
```
```sh
$> easytier-cli vpn-portal
portal_name: wireguard
+1 -1
View File
@@ -1,5 +1,5 @@
# 组网
::: tip 注意
::: warning 注意
下文仅描述命令行工具的使用,图形界面程序可参考下述概念自行配置。
:::