diff --git a/assets/image-1.png b/assets/image-1.png deleted file mode 100644 index c22e584..0000000 Binary files a/assets/image-1.png and /dev/null differ diff --git a/assets/image-2.png b/assets/image-2.png deleted file mode 100644 index daf2d34..0000000 Binary files a/assets/image-2.png and /dev/null differ diff --git a/assets/image-3.png b/assets/image-3.png deleted file mode 100644 index 809eaba..0000000 Binary files a/assets/image-3.png and /dev/null differ diff --git a/assets/image.png b/assets/image.png deleted file mode 100644 index deefbb8..0000000 Binary files a/assets/image.png and /dev/null differ diff --git a/en/guide/network/configurations.md b/en/guide/network/configurations.md index 3dc80c8..438216f 100644 --- a/en/guide/network/configurations.md +++ b/en/guide/network/configurations.md @@ -1,3 +1,58 @@ # Configurations -You can use ``easytier-core --help`` to view all configuration items \ No newline at end of file +You can use ``easytier-core --help`` to view all configuration items + + +```` sh +Options: + --network-name + network name to identify this vpn network + [default: default] + --network-secret + network secret to verify this node belongs to the vpn network + [default: ] + -i, --ipv4 + ipv4 address of this vpn node + -p, --peers + peers to connect initially + -e, --external-node + use a public shared node to discover peers + -n, --proxy-networks + export local networks to other peers in the vpn + -r, --rpc-portal + rpc portal address to listen for management + [default: 127.0.0.1:15888] + -l, --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 + specify the linux network namespace, default is the root namespace + --console-log-level + console log level + [possible values: trace, debug, info, warn, error, off] + --file-log-level + file log level + [possible values: trace, debug, info, warn, error, off] + --file-log-dir + directory to store log files + -m, --instance-name + instance name to identify this vpn node in same machine + [default: default] + -d, --instance-id + instance uuid to identify this vpn node in whole vpn network example: 123e4567-e89b-12d3-a456-426614174000 + --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 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 +```` \ No newline at end of file diff --git a/en/guide/network/multi-node-networking.md b/en/guide/network/multi-node-networking.md index bf281d3..096918f 100644 --- a/en/guide/network/multi-node-networking.md +++ b/en/guide/network/multi-node-networking.md @@ -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 ``` diff --git a/en/guide/network/point-to-networking.md b/en/guide/network/point-to-networking.md index 2837230..bd01c75 100644 --- a/en/guide/network/point-to-networking.md +++ b/en/guide/network/point-to-networking.md @@ -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 diff --git a/en/guide/network/two-node-networking.md b/en/guide/network/two-node-networking.md index a8ea337..31f20b0 100644 --- a/en/guide/network/two-node-networking.md +++ b/en/guide/network/two-node-networking.md @@ -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 | --- \ No newline at end of file diff --git a/en/guide/network/use-easytier-with-wirefuard-client.md b/en/guide/network/use-easytier-with-wirefuard-client.md index d779b73..8139873 100644 --- a/en/guide/network/use-easytier-with-wirefuard-client.md +++ b/en/guide/network/use-easytier-with-wirefuard-client.md @@ -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 diff --git a/guide/network/multi-node-networking.md b/guide/network/multi-node-networking.md index 61f29c3..3a0997a 100644 --- a/guide/network/multi-node-networking.md +++ b/guide/network/multi-node-networking.md @@ -2,7 +2,7 @@ 基于刚才的双节点组网例子,如果有更多的节点需要加入虚拟网络,可以使用如下命令。 -``` +```sh sudo easytier-core --ipv4 10.144.144.2 --peers udp://22.1.1.1:11010 ``` diff --git a/guide/network/point-to-networking.md b/guide/network/point-to-networking.md index 017b96a..c955754 100644 --- a/guide/network/point-to-networking.md +++ b/guide/network/point-to-networking.md @@ -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 是否可访问被代理子网下的节点 diff --git a/guide/network/two-node-networking.md b/guide/network/two-node-networking.md index d223256..468363e 100644 --- a/guide/network/two-node-networking.md +++ b/guide/network/two-node-networking.md @@ -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 | --- \ No newline at end of file diff --git a/guide/network/use-easytier-with-wirefuard-client.md b/guide/network/use-easytier-with-wirefuard-client.md index 66ff5ed..b27d13f 100644 --- a/guide/network/use-easytier-with-wirefuard-client.md +++ b/guide/network/use-easytier-with-wirefuard-client.md @@ -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 diff --git a/guide/networking.md b/guide/networking.md index fe5e855..7a791ba 100644 --- a/guide/networking.md +++ b/guide/networking.md @@ -1,5 +1,5 @@ # 组网 -::: tip 注意 +::: warning 注意 下文仅描述命令行工具的使用,图形界面程序可参考下述概念自行配置。 :::