From e1a0a8138e15fa3cf2694520c53041f311983d58 Mon Sep 17 00:00:00 2001 From: m1m1sha <18262227804@163.com> Date: Tue, 7 May 2024 21:58:38 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=88=20style:=20lint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/deploy.yml | 4 +- .vitepress/config/cn.ts | 10 ++--- .vitepress/config/en.ts | 12 +++--- .vitepress/config/index.ts | 3 +- README.md | 2 +- en/guide/community-and-contribution.md | 4 +- en/guide/contact.md | 4 +- en/guide/installation.md | 4 +- en/guide/introduction.md | 4 +- en/guide/license.md | 4 +- en/guide/network/configurations.md | 27 ++++++------ en/guide/network/multi-node-networking.md | 2 +- .../network/networking-without-public-ip.md | 6 +-- en/guide/network/point-to-networking.md | 4 +- en/guide/network/two-node-networking.md | 31 ++++++++------ .../use-easytier-with-wirefuard-client.md | 2 +- en/guide/networking.md | 3 +- en/guide/roadmap.md | 2 +- en/index.md | 1 - guide/community-and-contribution.md | 2 +- guide/contact.md | 2 +- guide/installation.md | 6 ++- guide/introduction.md | 2 +- guide/license.md | 2 +- guide/network/configurations.md | 24 +++++------ guide/network/multi-node-networking.md | 2 +- guide/network/networking-without-public-ip.md | 8 ++-- guide/network/point-to-networking.md | 4 +- guide/network/two-node-networking.md | 41 +++++++++++-------- .../use-easytier-with-wirefuard-client.md | 2 +- guide/networking.md | 3 +- guide/roadmap.md | 2 +- index.md | 1 - tsconfig.json | 18 ++++---- 34 files changed, 133 insertions(+), 115 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f26e836..df68c14 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -33,7 +33,7 @@ jobs: with: fetch-depth: 0 # 如果未启用 lastUpdated,则不需要 - uses: pnpm/action-setup@v3 # 如果使用 pnpm,请取消注释 - with: + with: version: 9 run_install: false # - uses: oven-sh/setup-bun@v1 # 如果使用 Bun,请取消注释 @@ -64,4 +64,4 @@ jobs: steps: - name: Deploy to GitHub Pages id: deployment - uses: actions/deploy-pages@v4 \ No newline at end of file + uses: actions/deploy-pages@v4 diff --git a/.vitepress/config/cn.ts b/.vitepress/config/cn.ts index 82c59f9..bb9b9b6 100644 --- a/.vitepress/config/cn.ts +++ b/.vitepress/config/cn.ts @@ -12,7 +12,7 @@ export const cn = defineConfig({ items: [ { text: '简介', link: '/guide/introduction' }, { text: '安装', link: '/guide/installation' }, - ] + ], }, { text: '组网', @@ -24,7 +24,7 @@ export const cn = defineConfig({ { text: '无公网IP', link: '/guide/network/networking-without-public-ip' }, { text: '使用 WireGuard 客户端接入', link: '/guide/network/use-easytier-with-wirefuard-client' }, { text: '其他配置', link: '/guide/network/configurations' }, - ] + ], }, { items: [ @@ -32,8 +32,8 @@ export const cn = defineConfig({ { text: '社区和贡献', link: '/guide/community-and-contribution' }, { text: '许可证', link: '/guide/license' }, { text: '联系方式', link: '/guide/contact' }, - ] + ], }, - ] - } + ], + }, }) diff --git a/.vitepress/config/en.ts b/.vitepress/config/en.ts index c65a9d8..de581d2 100644 --- a/.vitepress/config/en.ts +++ b/.vitepress/config/en.ts @@ -11,7 +11,7 @@ export const en = defineConfig({ items: [ { text: 'Introduction', link: '/en/guide/introduction' }, { text: 'installation', link: '/en/guide/installation' }, - ] + ], }, { text: 'networking', @@ -23,7 +23,7 @@ export const en = defineConfig({ { text: 'Without Public IP', link: '/en//guide/network/networking-without-public-ip' }, { text: 'Use WireGuard Client', link: '/en//guide/network/use-easytier-with-wirefuard-client' }, { text: 'Other Configurations', link: '/en//guide/network/configurations' }, - ] + ], }, { items: [ @@ -31,8 +31,8 @@ export const en = defineConfig({ { text: 'Community and Contribution', link: '/en/guide/community-and-contribution' }, { text: 'License', link: '/en/guide/license' }, { text: 'Contact', link: '/en/guide/contact' }, - ] - } - ] - } + ], + }, + ], + }, }) diff --git a/.vitepress/config/index.ts b/.vitepress/config/index.ts index 405082c..da3ffa4 100644 --- a/.vitepress/config/index.ts +++ b/.vitepress/config/index.ts @@ -1,4 +1,5 @@ import { defineConfig } from 'vitepress' + import { en } from './en' import { cn } from './cn' @@ -9,4 +10,4 @@ export default defineConfig({ root: { label: '简体中文', ...cn }, en: { label: 'English', ...en }, }, -}) \ No newline at end of file +}) diff --git a/README.md b/README.md index 1a9f013..f8565d6 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -[简体中文](https://github.com/KKRainbow/EasyTier/README_CN.md) | [English](https://github.com/KKRainbow/EasyTier/README.md) \ No newline at end of file +[简体中文](https://github.com/KKRainbow/EasyTier/README_CN.md) | [English](https://github.com/KKRainbow/EasyTier/README.md) diff --git a/en/guide/community-and-contribution.md b/en/guide/community-and-contribution.md index 2d3514e..8745fcc 100644 --- a/en/guide/community-and-contribution.md +++ b/en/guide/community-and-contribution.md @@ -1,3 +1,3 @@ # Community and Contribution - -We welcome and encourage community contributions! If you want to get involved, please submit a [GitHub PR](https://github.com/KKRainbow/EasyTier/pulls). Detailed contribution guidelines can be found in [CONTRIBUTING.md](https://github.com/KKRainbow/EasyTier/blob/main/CONTRIBUTING.md). \ No newline at end of file + +We welcome and encourage community contributions! If you want to get involved, please submit a [GitHub PR](https://github.com/KKRainbow/EasyTier/pulls). Detailed contribution guidelines can be found in [CONTRIBUTING.md](https://github.com/KKRainbow/EasyTier/blob/main/CONTRIBUTING.md). diff --git a/en/guide/contact.md b/en/guide/contact.md index 232c6e7..b54fa3b 100644 --- a/en/guide/contact.md +++ b/en/guide/contact.md @@ -1,6 +1,6 @@ # Contact - + - Ask questions or report problems: [GitHub Issues](https://github.com/KKRainbow/EasyTier/issues) - Discussion and exchange: [GitHub Discussions](https://github.com/KKRainbow/EasyTier/discussions) - QQ Group: [949700262](https://qm.qq.com/q/LDxBN5L3kA) -- Telegram: https://t.me/easytier \ No newline at end of file +- Telegram: https://t.me/easytier diff --git a/en/guide/installation.md b/en/guide/installation.md index f5052d2..a94b431 100644 --- a/en/guide/installation.md +++ b/en/guide/installation.md @@ -6,9 +6,11 @@ 2. **Install via crates.io** ::: code-group + ```sh [cargo] cargo install easytier ``` + ::: 3. **Install from source code** @@ -16,4 +18,4 @@ ```sh [cargo] cargo install --git https://github.com/KKRainbow/EasyTier.git ``` - ::: \ No newline at end of file + ::: diff --git a/en/guide/introduction.md b/en/guide/introduction.md index f96afda..589ab83 100644 --- a/en/guide/introduction.md +++ b/en/guide/introduction.md @@ -5,7 +5,7 @@ EasyTier is a simple, safe and decentralized VPN networking solution implemented ![alt text](/assets/image-5.png)![alt text](/assets/image-4.png) ## Features - + - **Decentralized**: No need to rely on centralized services, nodes are equal and independent. - **Safe**: Use WireGuard protocol to encrypt data. - **High Performance**: Full-link zero-copy, with performance comparable to mainstream networking software. @@ -16,4 +16,4 @@ EasyTier is a simple, safe and decentralized VPN networking solution implemented - **Smart Routing**: Selects links based on traffic to reduce latency and increase throughput. - **TCP Support**: Provides reliable data transmission through concurrent TCP links when UDP is limited, optimizing performance. - **High Availability**: Supports multi-path and switches to healthy paths when high packet loss or network errors are detected. -- **IPv6 Support**: Supports networking using IPv6. \ No newline at end of file +- **IPv6 Support**: Supports networking using IPv6. diff --git a/en/guide/license.md b/en/guide/license.md index 4b4d29e..0467f51 100644 --- a/en/guide/license.md +++ b/en/guide/license.md @@ -1,3 +1,3 @@ # License - -EasyTier is released under the [Apache License 2.0](https://github.com/KKRainbow/EasyTier/blob/main/LICENSE). \ No newline at end of file + +EasyTier is released under the [Apache License 2.0](https://github.com/KKRainbow/EasyTier/blob/main/LICENSE). diff --git a/en/guide/network/configurations.md b/en/guide/network/configurations.md index 438216f..4bc87dd 100644 --- a/en/guide/network/configurations.md +++ b/en/guide/network/configurations.md @@ -1,15 +1,14 @@ # Configurations -You can use ``easytier-core --help`` to view all configuration items +You can use `easytier-core --help` to view all configuration items - -```` sh +```sh Options: --network-name - network name to identify this vpn network + network name to identify this vpn network [default: default] --network-secret - network secret to verify this node belongs to the vpn network + network secret to verify this node belongs to the vpn network [default: ] -i, --ipv4 ipv4 address of this vpn node @@ -20,39 +19,39 @@ Options: -n, --proxy-networks export local networks to other peers in the vpn -r, --rpc-portal - rpc portal address to listen for management + rpc portal address to listen for management [default: 127.0.0.1:15888] -l, --listeners - listeners to accept connections, pass '' to avoid listening. + 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 + 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 directory to store log files -m, --instance-name - instance name to identify this vpn node in same machine + 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 + 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 + 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 + 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 096918f..6363c39 100644 --- a/en/guide/network/multi-node-networking.md +++ b/en/guide/network/multi-node-networking.md @@ -8,4 +8,4 @@ sudo easytier-core --ipv4 10.144.144.2 --peers udp://22.1.1.1:11010 The `--peers` parameter can fill in the listening address of any node already in the virtual network. ---- \ No newline at end of file +--- diff --git a/en/guide/network/networking-without-public-ip.md b/en/guide/network/networking-without-public-ip.md index c332e1f..5c154c1 100644 --- a/en/guide/network/networking-without-public-ip.md +++ b/en/guide/network/networking-without-public-ip.md @@ -1,10 +1,10 @@ # Networking without Public IP -EasyTier supports networking using shared public nodes. The currently deployed shared public node is +EasyTier supports networking using shared public nodes. The currently deployed shared public node is -``tcp://easytier.public.kkrainbow.top:11010`` +`tcp://easytier.public.kkrainbow.top:11010` -When using shared nodes, each node entering the network needs to provide the same ``--network-name`` and ``--network-secret`` parameters as the unique identifier of the network. +When using shared nodes, each node entering the network needs to provide the same `--network-name` and `--network-secret` parameters as the unique identifier of the network. Taking two nodes as an example, Node A executes: diff --git a/en/guide/network/point-to-networking.md b/en/guide/network/point-to-networking.md index bd01c75..84ca4b2 100644 --- a/en/guide/network/point-to-networking.md +++ b/en/guide/network/point-to-networking.md @@ -32,15 +32,15 @@ Subnet proxy information will automatically sync to each node in the virtual net ```sh easytier-cli route ``` + | 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 ```sh ping 10.1.1.2 ``` ---- \ No newline at end of file +--- diff --git a/en/guide/network/two-node-networking.md b/en/guide/network/two-node-networking.md index 31f20b0..486b8c5 100644 --- a/en/guide/network/two-node-networking.md +++ b/en/guide/network/two-node-networking.md @@ -1,26 +1,28 @@ # Two-node Networking - + Assuming the network topology of the two nodes is as follows - + ```mermaid flowchart LR - + subgraph Node A IP 22.1.1.1 nodea[EasyTier\n10.144.144.1] end - + subgraph Node B nodeb[EasyTier\n10.144.144.2] end - + nodea <-----> nodeb - + ``` 1. Execute on Node A: + ```sh sudo easytier-core --ipv4 10.144.144.1 ``` + Successful execution of the command will print the following. ```sh @@ -52,9 +54,10 @@ nodea <-----> nodeb 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 sudo easytier-core --ipv4 10.144.144.2 --peers udp://22.1.1.1:11010 ``` @@ -62,23 +65,27 @@ nodea <-----> nodeb 3. Test Connectivity The two nodes should connect successfully and be able to communicate within the virtual subnet + ```sh ping 10.144.144.2 ``` Use easytier-cli to view node information in the subnet + ```sh easytier-cli peer ``` - | 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 | - + + | 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 ``` + | 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 8139873..8cc15dd 100644 --- a/en/guide/network/use-easytier-with-wirefuard-client.md +++ b/en/guide/network/use-easytier-with-wirefuard-client.md @@ -52,4 +52,4 @@ connected_clients: ``` -Before using the Client Config, you need to modify the Interface Address and Peer Endpoint to the client's IP and the IP of the EasyTier node, respectively. Import the configuration file into the WireGuard client to access the EasyTier network. \ No newline at end of file +Before using the Client Config, you need to modify the Interface Address and Peer Endpoint to the client's IP and the IP of the EasyTier node, respectively. Import the configuration file into the WireGuard client to access the EasyTier network. diff --git a/en/guide/networking.md b/en/guide/networking.md index 941c231..24428f9 100644 --- a/en/guide/networking.md +++ b/en/guide/networking.md @@ -1,6 +1,7 @@ # Networking + ::: tip tips The following text only describes the use of the command-line tool; the GUI program can be configured by referring to the following concepts. ::: -Make sure EasyTier is installed according to the [Installation Guide](/en/guide/installation), and both easytier-core and easytier-cli commands are available. \ No newline at end of file +Make sure EasyTier is installed according to the [Installation Guide](/en/guide/installation), and both easytier-core and easytier-cli commands are available. diff --git a/en/guide/roadmap.md b/en/guide/roadmap.md index 5f50504..e905c44 100644 --- a/en/guide/roadmap.md +++ b/en/guide/roadmap.md @@ -3,4 +3,4 @@ - [ ] Improve documentation and user guides. - [ ] Support features such as encryption, TCP hole punching,etc. - [ ] Support Android, IOS and other mobile platforms. -- [ ] Support Web configuration management. \ No newline at end of file +- [ ] Support Web configuration management. diff --git a/en/index.md b/en/index.md index a318e1d..009448c 100644 --- a/en/index.md +++ b/en/index.md @@ -32,4 +32,3 @@ features: - title: Smart Routing details: Selects links based on traffic to reduce latency and increase throughput. --- - diff --git a/guide/community-and-contribution.md b/guide/community-and-contribution.md index 30014de..a4df1ad 100644 --- a/guide/community-and-contribution.md +++ b/guide/community-and-contribution.md @@ -2,4 +2,4 @@ 我们欢迎并鼓励社区贡献!如果你想参与进来,请提交 [GitHub PR](https://github.com/KKRainbow/EasyTier/pulls)。 -详细的贡献指南可以在 [Contributing](https://github.com/KKRainbow/EasyTier/blob/main/CONTRIBUTING.md) 中找到。 \ No newline at end of file +详细的贡献指南可以在 [Contributing](https://github.com/KKRainbow/EasyTier/blob/main/CONTRIBUTING.md) 中找到。 diff --git a/guide/contact.md b/guide/contact.md index b52cdde..1398f8a 100644 --- a/guide/contact.md +++ b/guide/contact.md @@ -3,4 +3,4 @@ - 提问或报告问题:[GitHub Issues](https://github.com/KKRainbow/EasyTier/issues) - 讨论和交流:[GitHub Discussions](https://github.com/KKRainbow/EasyTier/discussions) - QQ 群: [949700262](https://qm.qq.com/q/LDxBN5L3kA) -- Telegram:https://t.me/easytier \ No newline at end of file +- Telegram:https://t.me/easytier diff --git a/guide/installation.md b/guide/installation.md index 19df950..535566b 100644 --- a/guide/installation.md +++ b/guide/installation.md @@ -1,14 +1,16 @@ # 安装 {#installation} 1. **下载预编译的二进制文件** - 访问 [GitHub Release 页面](https://github.com/KKRainbow/EasyTier/releases) 下载适用于您操作系统的二进制文件。Release 压缩包中同时包含命令行程序和图形界面程序。 + 访问 [GitHub Release 页面](https://github.com/KKRainbow/EasyTier/releases) 下载适用于您操作系统的二进制文件。Release 压缩包中同时包含命令行程序和图形界面程序。 2. **通过 crates.io 安装** ::: code-group + ```sh [cargo] cargo install easytier ``` + ::: 3. **通过源码安装** @@ -16,4 +18,4 @@ ```sh [cargo] cargo install --git https://github.com/KKRainbow/EasyTier.git ``` - ::: \ No newline at end of file + ::: diff --git a/guide/introduction.md b/guide/introduction.md index d8a25da..b306144 100644 --- a/guide/introduction.md +++ b/guide/introduction.md @@ -16,4 +16,4 @@ - **智能路由**:根据流量智能选择链路,减少延迟,提高吞吐量。 - **TCP 支持**:在 UDP 受限的情况下,通过并发 TCP 链接提供可靠的数据传输,优化性能。 - **高可用性**:支持多路径和在检测到高丢包率或网络错误时切换到健康路径。 -- **IPV6 支持**:支持利用 IPV6 组网。 \ No newline at end of file +- **IPV6 支持**:支持利用 IPV6 组网。 diff --git a/guide/license.md b/guide/license.md index e312763..be092e6 100644 --- a/guide/license.md +++ b/guide/license.md @@ -1,3 +1,3 @@ # 许可证 -EasyTier 根据 [Apache License 2.0](https://github.com/KKRainbow/EasyTier/blob/main/LICENSE) 许可证发布。 \ No newline at end of file +EasyTier 根据 [Apache License 2.0](https://github.com/KKRainbow/EasyTier/blob/main/LICENSE) 许可证发布。 diff --git a/guide/network/configurations.md b/guide/network/configurations.md index 519d988..1d709c8 100644 --- a/guide/network/configurations.md +++ b/guide/network/configurations.md @@ -2,13 +2,13 @@ 可使用 `easytier-core --help` 查看全部配置项 -```` sh +```sh Options: --network-name - network name to identify this vpn network + network name to identify this vpn network [default: default] --network-secret - network secret to verify this node belongs to the vpn network + network secret to verify this node belongs to the vpn network [default: ] -i, --ipv4 ipv4 address of this vpn node @@ -19,39 +19,39 @@ Options: -n, --proxy-networks export local networks to other peers in the vpn -r, --rpc-portal - rpc portal address to listen for management + rpc portal address to listen for management [default: 127.0.0.1:15888] -l, --listeners - listeners to accept connections, pass '' to avoid listening. + 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 + 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 directory to store log files -m, --instance-name - instance name to identify this vpn node in same machine + 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 + 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 + 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 + 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/guide/network/multi-node-networking.md b/guide/network/multi-node-networking.md index 3a0997a..e54746e 100644 --- a/guide/network/multi-node-networking.md +++ b/guide/network/multi-node-networking.md @@ -8,4 +8,4 @@ sudo easytier-core --ipv4 10.144.144.2 --peers udp://22.1.1.1:11010 其中 `--peers ` 参数可以填写任意一个已经在虚拟网络中的节点的监听地址。 ---- \ No newline at end of file +--- diff --git a/guide/network/networking-without-public-ip.md b/guide/network/networking-without-public-ip.md index 09049e1..40b4d5e 100644 --- a/guide/network/networking-without-public-ip.md +++ b/guide/network/networking-without-public-ip.md @@ -1,10 +1,10 @@ # 无公网IP组网 -EasyTier 支持共享公网节点进行组网。目前已部署共享的公网节点 +EasyTier 支持共享公网节点进行组网。目前已部署共享的公网节点 -``tcp://easytier.public.kkrainbow.top:11010`` +`tcp://easytier.public.kkrainbow.top:11010` -使用共享节点时,需要每个入网节点提供相同的 ``--network-name`` 和 ``--network-secret`` 参数,作为网络的唯一标识。 +使用共享节点时,需要每个入网节点提供相同的 `--network-name` 和 `--network-secret` 参数,作为网络的唯一标识。 以双节点为例,节点 A 执行: @@ -20,4 +20,4 @@ sudo easytier-core --ipv4 10.144.144.2 --network-name abc --network-secret abc - 命令执行成功后,节点 A 即可通过虚拟 IP 10.144.144.2 访问节点 B。 ---- \ No newline at end of file +--- diff --git a/guide/network/point-to-networking.md b/guide/network/point-to-networking.md index c955754..03a6f8a 100644 --- a/guide/network/point-to-networking.md +++ b/guide/network/point-to-networking.md @@ -32,15 +32,15 @@ sudo easytier-core --ipv4 10.144.144.2 -n 10.1.1.0/24 ```sh easytier-cli route ``` + | 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 是否可访问被代理子网下的节点 ```sh ping 10.1.1.2 ``` ---- \ No newline at end of file +--- diff --git a/guide/network/two-node-networking.md b/guide/network/two-node-networking.md index 468363e..ad76141 100644 --- a/guide/network/two-node-networking.md +++ b/guide/network/two-node-networking.md @@ -1,26 +1,28 @@ - # 双节点组网 假设双节点的网络拓扑如下 - ```mermaid - flowchart LR - subgraph 节点 A IP 22.1.1.1 - nodeA[EasyTier\n10.144.144.1] - end +```mermaid +flowchart LR - subgraph 节点 B - nodeB[EasyTier\n10.144.144.2] - end +subgraph 节点 A IP 22.1.1.1 +nodeA[EasyTier\n10.144.144.1] +end - nodeA <-----> nodeB +subgraph 节点 B +nodeB[EasyTier\n10.144.144.2] +end - ``` +nodeA <-----> nodeB + +``` 1. 在节点 A 上执行: + ```sh sudo easytier-core --ipv4 10.144.144.1 ``` + 命令执行成功会有如下打印。 ```sh @@ -52,9 +54,10 @@ 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 sudo easytier-core --ipv4 10.144.144.2 --peers udp://22.1.1.1:11010 ``` @@ -62,23 +65,27 @@ 3. 测试联通性 两个节点应成功连接并能够在虚拟子网内通信 + ```sh ping 10.144.144.2 ``` 使用 easytier-cli 查看子网中的节点信息 + ```sh easytier-cli peer ``` - | 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 | - + + | 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 ``` + | 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 b27d13f..8573d59 100644 --- a/guide/network/use-easytier-with-wirefuard-client.md +++ b/guide/network/use-easytier-with-wirefuard-client.md @@ -54,4 +54,4 @@ connected_clients: 使用 Client Config 前,需要将 Interface Address 和 Peer Endpoint 分别修改为客户端的 IP 和 EasyTier 节点的 IP。将配置文件导入 WireGuard 客户端,即可访问 EasyTier 网络。 ---- \ No newline at end of file +--- diff --git a/guide/networking.md b/guide/networking.md index 7a791ba..fc747a1 100644 --- a/guide/networking.md +++ b/guide/networking.md @@ -1,6 +1,7 @@ # 组网 + ::: warning 注意 下文仅描述命令行工具的使用,图形界面程序可参考下述概念自行配置。 ::: -确保已按照 [安装指南](/guide/installation) 安装 EasyTier,并且 easytier-core 和 easytier-cli 两个命令都已经可用。 \ No newline at end of file +确保已按照 [安装指南](/guide/installation) 安装 EasyTier,并且 easytier-core 和 easytier-cli 两个命令都已经可用。 diff --git a/guide/roadmap.md b/guide/roadmap.md index 0bed98d..b3be90a 100644 --- a/guide/roadmap.md +++ b/guide/roadmap.md @@ -3,4 +3,4 @@ - [ ] 完善文档和用户指南。 - [ ] 支持 TCP 打洞等特性。 - [ ] 支持 Android、IOS 等移动平台。 -- [ ] 支持 Web 配置管理。 \ No newline at end of file +- [ ] 支持 Web 配置管理。 diff --git a/index.md b/index.md index 0719f15..1526b99 100644 --- a/index.md +++ b/index.md @@ -32,4 +32,3 @@ features: - title: 智能路由 details: 根据流量智能选择链路,减少延迟,提高吞吐量。 --- - diff --git a/tsconfig.json b/tsconfig.json index d28e05d..52c38c6 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,24 +1,24 @@ { "compilerOptions": { - "outDir": "dist", "target": "esnext", - "module": "esnext", - "moduleResolution": "node", - "esModuleInterop": true, - "resolveJsonModule": true, - "allowJs": true, - "strict": true, "jsx": "preserve", "baseUrl": ".", + "module": "esnext", + "moduleResolution": "node", "paths": { "@theme/*": [ ".vitepress/theme/*" ] - } + }, + "resolveJsonModule": true, + "allowJs": true, + "strict": true, + "outDir": "dist", + "esModuleInterop": true }, "include": [ "env.d.ts", "src/**/*", ".vitepress/**/*" ] -} \ No newline at end of file +}