🎉 init: init

This commit is contained in:
m1m1sha
2024-05-07 13:53:05 +08:00
commit 77e19000b5
44 changed files with 10195 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
// ../../Users/35154/AppData/Local/pnpm/global/5/.pnpm/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@types+node@18.16.3/node_modules/vitepress/dist/client/theme-default/index.js
import "C:/Users/35154/AppData/Local/pnpm/global/5/.pnpm/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@types+node@18.16.3/node_modules/vitepress/dist/client/theme-default/styles/fonts.css";
// ../../Users/35154/AppData/Local/pnpm/global/5/.pnpm/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@types+node@18.16.3/node_modules/vitepress/dist/client/theme-default/without-fonts.js
import "C:/Users/35154/AppData/Local/pnpm/global/5/.pnpm/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@types+node@18.16.3/node_modules/vitepress/dist/client/theme-default/styles/vars.css";
import "C:/Users/35154/AppData/Local/pnpm/global/5/.pnpm/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@types+node@18.16.3/node_modules/vitepress/dist/client/theme-default/styles/base.css";
import "C:/Users/35154/AppData/Local/pnpm/global/5/.pnpm/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@types+node@18.16.3/node_modules/vitepress/dist/client/theme-default/styles/utils.css";
import "C:/Users/35154/AppData/Local/pnpm/global/5/.pnpm/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@types+node@18.16.3/node_modules/vitepress/dist/client/theme-default/styles/components/custom-block.css";
import "C:/Users/35154/AppData/Local/pnpm/global/5/.pnpm/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@types+node@18.16.3/node_modules/vitepress/dist/client/theme-default/styles/components/vp-code.css";
import "C:/Users/35154/AppData/Local/pnpm/global/5/.pnpm/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@types+node@18.16.3/node_modules/vitepress/dist/client/theme-default/styles/components/vp-code-group.css";
import "C:/Users/35154/AppData/Local/pnpm/global/5/.pnpm/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@types+node@18.16.3/node_modules/vitepress/dist/client/theme-default/styles/components/vp-doc.css";
import "C:/Users/35154/AppData/Local/pnpm/global/5/.pnpm/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@types+node@18.16.3/node_modules/vitepress/dist/client/theme-default/styles/components/vp-sponsor.css";
import VPBadge from "C:/Users/35154/AppData/Local/pnpm/global/5/.pnpm/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@types+node@18.16.3/node_modules/vitepress/dist/client/theme-default/components/VPBadge.vue";
import Layout from "C:/Users/35154/AppData/Local/pnpm/global/5/.pnpm/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@types+node@18.16.3/node_modules/vitepress/dist/client/theme-default/Layout.vue";
import { default as default2 } from "C:/Users/35154/AppData/Local/pnpm/global/5/.pnpm/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@types+node@18.16.3/node_modules/vitepress/dist/client/theme-default/components/VPHomeHero.vue";
import { default as default3 } from "C:/Users/35154/AppData/Local/pnpm/global/5/.pnpm/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@types+node@18.16.3/node_modules/vitepress/dist/client/theme-default/components/VPHomeFeatures.vue";
import { default as default4 } from "C:/Users/35154/AppData/Local/pnpm/global/5/.pnpm/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@types+node@18.16.3/node_modules/vitepress/dist/client/theme-default/components/VPHomeSponsors.vue";
import { default as default5 } from "C:/Users/35154/AppData/Local/pnpm/global/5/.pnpm/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@types+node@18.16.3/node_modules/vitepress/dist/client/theme-default/components/VPDocAsideSponsors.vue";
import { default as default6 } from "C:/Users/35154/AppData/Local/pnpm/global/5/.pnpm/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@types+node@18.16.3/node_modules/vitepress/dist/client/theme-default/components/VPTeamPage.vue";
import { default as default7 } from "C:/Users/35154/AppData/Local/pnpm/global/5/.pnpm/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@types+node@18.16.3/node_modules/vitepress/dist/client/theme-default/components/VPTeamPageTitle.vue";
import { default as default8 } from "C:/Users/35154/AppData/Local/pnpm/global/5/.pnpm/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@types+node@18.16.3/node_modules/vitepress/dist/client/theme-default/components/VPTeamPageSection.vue";
import { default as default9 } from "C:/Users/35154/AppData/Local/pnpm/global/5/.pnpm/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@types+node@18.16.3/node_modules/vitepress/dist/client/theme-default/components/VPTeamMembers.vue";
var theme = {
Layout,
enhanceApp: ({ app }) => {
app.component("Badge", VPBadge);
}
};
var without_fonts_default = theme;
export {
default5 as VPDocAsideSponsors,
default3 as VPHomeFeatures,
default2 as VPHomeHero,
default4 as VPHomeSponsors,
default9 as VPTeamMembers,
default6 as VPTeamPage,
default8 as VPTeamPageSection,
default7 as VPTeamPageTitle,
without_fonts_default as default
};
//# sourceMappingURL=@theme_index.js.map
+7
View File
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../../../../../Users/35154/AppData/Local/pnpm/global/5/.pnpm/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@types+node@18.16.3/node_modules/vitepress/dist/client/theme-default/index.js", "../../../../../Users/35154/AppData/Local/pnpm/global/5/.pnpm/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@types+node@18.16.3/node_modules/vitepress/dist/client/theme-default/without-fonts.js"],
"sourcesContent": ["import './styles/fonts.css';\nexport * from './without-fonts';\nexport { default as default } from './without-fonts';\n", "import './styles/vars.css';\nimport './styles/base.css';\nimport './styles/utils.css';\nimport './styles/components/custom-block.css';\nimport './styles/components/vp-code.css';\nimport './styles/components/vp-code-group.css';\nimport './styles/components/vp-doc.css';\nimport './styles/components/vp-sponsor.css';\nimport VPBadge from './components/VPBadge.vue';\nimport Layout from './Layout.vue';\n// Note: if we add more optional components here, i.e. components that are not\n// used in the theme by default unless the user imports them, make sure to update\n// the `lazyDefaultThemeComponentsRE` regex in src/node/build/bundle.ts.\nexport { default as VPHomeHero } from './components/VPHomeHero.vue';\nexport { default as VPHomeFeatures } from './components/VPHomeFeatures.vue';\nexport { default as VPHomeSponsors } from './components/VPHomeSponsors.vue';\nexport { default as VPDocAsideSponsors } from './components/VPDocAsideSponsors.vue';\nexport { default as VPTeamPage } from './components/VPTeamPage.vue';\nexport { default as VPTeamPageTitle } from './components/VPTeamPageTitle.vue';\nexport { default as VPTeamPageSection } from './components/VPTeamPageSection.vue';\nexport { default as VPTeamMembers } from './components/VPTeamMembers.vue';\nconst theme = {\n Layout,\n enhanceApp: ({ app }) => {\n app.component('Badge', VPBadge);\n }\n};\nexport default theme;\n"],
"mappings": ";AAAA,OAAO;;;ACAP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO,aAAa;AACpB,OAAO,YAAY;AAInB,SAAoB,WAAXA,gBAA6B;AACtC,SAAoB,WAAXA,gBAAiC;AAC1C,SAAoB,WAAXA,gBAAiC;AAC1C,SAAoB,WAAXA,gBAAqC;AAC9C,SAAoB,WAAXA,gBAA6B;AACtC,SAAoB,WAAXA,gBAAkC;AAC3C,SAAoB,WAAXA,gBAAoC;AAC7C,SAAoB,WAAXA,gBAAgC;AACzC,IAAM,QAAQ;AAAA,EACV;AAAA,EACA,YAAY,CAAC,EAAE,IAAI,MAAM;AACrB,QAAI,UAAU,SAAS,OAAO;AAAA,EAClC;AACJ;AACA,IAAO,wBAAQ;",
"names": ["default"]
}
+19
View File
@@ -0,0 +1,19 @@
{
"hash": "7958035b",
"browserHash": "24330d08",
"optimized": {
"vue": {
"src": "../../../../../Users/35154/AppData/Local/pnpm/global/5/.pnpm/vue@3.2.47/node_modules/vue/dist/vue.runtime.esm-bundler.js",
"file": "vue.js",
"fileHash": "0201f78f",
"needsInterop": false
},
"@theme/index": {
"src": "../../../../../Users/35154/AppData/Local/pnpm/global/5/.pnpm/vitepress@1.0.0-alpha.75_@algolia+client-search@4.17.0_@types+node@18.16.3/node_modules/vitepress/dist/client/theme-default/index.js",
"file": "@theme_index.js",
"fileHash": "925c57a5",
"needsInterop": false
}
},
"chunks": {}
}
+3
View File
@@ -0,0 +1,3 @@
{
"type": "module"
}
+9516
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
+52
View File
@@ -0,0 +1,52 @@
import { defineConfig } from 'vitepress'
// https://vitepress.dev/reference/site-config
export default defineConfig({
title: 'Easytier',
description: '一个简单、安全、去中心化的内网穿透 VPN 组网方案,使用 Rust 语言和 Tokio 框架实现',
locales: {
root: {
label: '简体中文',
lang: 'zh-CN',
title: 'Easytier',
description: '一个简单、安全、去中心化的内网穿透 VPN 组网方案,使用 Rust 语言和 Tokio 框架实现'
},
en: {
label: 'English',
lang: 'en',
title: 'Easytier',
description: 'A simple, secure, decentralized VPN mesh network solution, implemented using Rust language and Tokio framework.'
}
},
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
sidebar: [
{ text: '简介', link: '/guide/introduction' },
{ text: '安装', link: '/guide/installation' },
{
text: '组网',
link: '/guide/networking',
items: [
{ text: '双节点', link: '/guide/network/two-node' },
{ text: '多节点', link: '/guide/network/multi-node' },
{ text: '子网代理(点对网)', link: '/guide/network/point-to' },
{ text: '无公网IP', link: '/guide/network/without-public-ip' },
{ text: '使用 WireGuard 客户端接入', link: '/guide/network/use-wireguard-client' }
]
},
{
items: [
{ text: '路线图', link: '/guide/roadmap' },
{ text: '社区和贡献', link: '/guide/community-and-contribution' },
{ text: '许可证', link: '/guide/license' },
{ text: '联系方式', link: '/guide/contact' },
]
}
],
socialLinks: [
{ icon: 'github', link: 'https://github.com/KKRainbow/EasyTier' }
]
}
})
Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

+3
View File
@@ -0,0 +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).
+6
View File
@@ -0,0 +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
+19
View File
@@ -0,0 +1,19 @@
# Installation {#installation}
1. **Download the precompiled binary file**
Visit the [GitHub Release page](https://github.com/KKRainbow/EasyTier/releases) to download the binary file suitable for your operating system. Release includes both command-line programs and GUI programs in the compressed package.
2. **Install via crates.io**
::: code-group
```sh [cargo]
cargo install easytier
```
:::
3. **Install from source code**
::: code-group
```sh [cargo]
cargo install --git https://github.com/KKRainbow/EasyTier.git
```
:::
+20
View File
@@ -0,0 +1,20 @@
# Introduction
EasyTier is a simple, safe and decentralized VPN networking solution implemented with the Rust language and Tokio framework.
![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.
- **Cross-platform**: Supports MacOS/Linux/Windows, will support IOS and Android in the future. The executable file is statically linked, making deployment simple.
- **Networking without public IP**: Supports networking using shared public nodes, refer to [Configuration Guide](/guide/network/without-public-ip.md)
- **NAT traversal**: Supports UDP-based NAT traversal, able to establish stable connections even in complex network environments.
- **Subnet Proxy (Point-to-Network)**: Nodes can expose accessible network segments as proxies to the VPN subnet, allowing other nodes to access these subnets through the node.
- **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.
+3
View File
@@ -0,0 +1,3 @@
# License
EasyTier is released under the [Apache License 2.0](https://github.com/KKRainbow/EasyTier/blob/main/LICENSE).
+11
View File
@@ -0,0 +1,11 @@
# Multi-node Networking
Based on the two-node networking example just now, if more nodes need to join the virtual network, you can use the following command.
```
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.
---
+3
View File
@@ -0,0 +1,3 @@
# 其他
可使用 ``easytier-core --help`` 查看全部配置项
+43
View File
@@ -0,0 +1,43 @@
# Subnet Proxy (Point-to-Network)
Assuming the network topology is as follows, Node B wants to share its accessible subnet 10.1.1.0/24 with other nodes.
```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
id1[[10.1.1.0/24]]
nodea <--> nodeb <-.-> id1
```
Then the startup parameters for Node B's easytier are (new -n parameter)
```sh
sudo easytier-core --ipv4 10.144.144.2 -n 10.1.1.0/24
```
Subnet proxy information will automatically sync to each node in the virtual network, and each node will automatically configure the corresponding route. Node A can check whether the subnet proxy is effective through the following command.
1. Check whether the routing information has beensynchronized, the proxy_cidrs column shows the proxied subnets.
```sh
easytier-cli route
```
![alt text](/assets/image-3.png)
2. Test whether Node A can access nodes under the proxied subnet
```sh
ping 10.1.1.2
```
---
+50
View File
@@ -0,0 +1,50 @@
# 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.
![alt text](/assets/image-2.png)
2. Execute on Node B
```sh
sudo easytier-core --ipv4 10.144.144.2 --peers udp://22.1.1.1:11010
```
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
```
![alt text](/assets/image.png)
```sh
easytier-cli route
```
![alt text](/assets/image-1.png)
---
+55
View File
@@ -0,0 +1,55 @@
# Use EasyTier with WireGuard Client
EasyTier can be used as a WireGuard server to allow any device with WireGuard client installed to access the EasyTier network. For platforms currently unsupported by EasyTier (such as iOS, Android, etc.), this method can be used to connect to the EasyTier network.
Assuming the network topology is as follows:
```mermaid
flowchart LR
ios[[iPhone \n WireGuard Installed]]
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
id1[[10.1.1.0/24]]
ios <-.-> nodea <--> nodeb <-.-> id1
```
To enable an iPhone to access the EasyTier network through Node A, the following configuration can be applied:
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.
```
# 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.
```
$> easytier-cli vpn-portal
portal_name: wireguard
client_config:
[Interface]
PrivateKey = 9VDvlaIC9XHUvRuE06hD2CEDrtGF+0lDthgr9SZfIho=
Address = 10.14.14.0/24 # should assign an ip from this cidr manually
[Peer]
PublicKey = zhrZQg4QdPZs8CajT3r4fmzcNsWpBL9ImQCUsnlXyGM=
AllowedIPs = 192.168.80.0/20,10.147.223.0/24,10.144.144.0/24
Endpoint = 0.0.0.0:11013 # should be the public ip of the vpn server
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.
+21
View File
@@ -0,0 +1,21 @@
# Networking without Public IP
EasyTier supports networking using shared public nodes. The currently deployed shared public node is
``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.
Taking two nodes as an example, Node A executes:
```sh
sudo easytier-core -i 10.144.144.1 --network-name abc --network-secret abc -e tcp://easytier.public.kkrainbow.top:11010
```
Node B executes
```sh
sudo easytier-core --ipv4 10.144.144.2 --network-name abc --network-secret abc -e tcp://easytier.public.kkrainbow.top:11010
```
After the command is successfully executed, Node A can access Node B through the virtual IP 10.144.144.2.
+6
View File
@@ -0,0 +1,6 @@
# Networking
::: tip 注意
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](/guide/installation), and both easytier-core and easytier-cli commands are available.
+6
View File
@@ -0,0 +1,6 @@
# Roadmap
- [ ] 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.
+5
View File
@@ -0,0 +1,5 @@
# 社区和贡献
我们欢迎并鼓励社区贡献!如果你想参与进来,请提交 [GitHub PR](https://github.com/KKRainbow/EasyTier/pulls)。
详细的贡献指南可以在 [Contributing](https://github.com/KKRainbow/EasyTier/blob/main/CONTRIBUTING.md) 中找到。
+6
View File
@@ -0,0 +1,6 @@
# 联系方式
- 提问或报告问题:[GitHub Issues](https://github.com/KKRainbow/EasyTier/issues)
- 讨论和交流:[GitHub Discussions](https://github.com/KKRainbow/EasyTier/discussions)
- QQ 群: [949700262](https://qm.qq.com/q/LDxBN5L3kA)
- Telegramhttps://t.me/easytier
+19
View File
@@ -0,0 +1,19 @@
# 安装 {#installation}
1. **下载预编译的二进制文件**
访问 [GitHub Release 页面](https://github.com/KKRainbow/EasyTier/releases) 下载适用于您操作系统的二进制文件。Release 压缩包中同时包含命令行程序和图形界面程序。
2. **通过 crates.io 安装**
::: code-group
```sh [cargo]
cargo install easytier
```
:::
3. **通过源码安装**
::: code-group
```sh [cargo]
cargo install --git https://github.com/KKRainbow/EasyTier.git
```
:::
+20
View File
@@ -0,0 +1,20 @@
# 简介
一个简单、安全、去中心化的内网穿透 VPN 组网方案,使用 Rust 语言和 Tokio 框架实现。
![alt text](/assets/image-6.png)
![alt text](/assets/image-7.png)
## 特点
- **去中心化**:无需依赖中心化服务,节点平等且独立。
- **安全**:支持利用 WireGuard 加密通信,也支持 AES-GCM 加密保护中转流量。
- **高性能**:全链路零拷贝,性能与主流组网软件相当。
- **跨平台**:支持 MacOS/Linux/Windows,未来将支持 IOS 和 Android。可执行文件静态链接,部署简单。
- **无公网 IP 组网**:支持利用共享的公网节点组网,可参考 [配置指南](/guide/network/without-public-ip)
- **NAT 穿透**:支持基于 UDP 的 NAT 穿透,即使在复杂的网络环境下也能建立稳定的连接。
- **子网代理(点对网)**:节点可以将可访问的网段作为代理暴露给 VPN 子网,允许其他节点通过该节点访问这些子网。
- **智能路由**:根据流量智能选择链路,减少延迟,提高吞吐量。
- **TCP 支持**:在 UDP 受限的情况下,通过并发 TCP 链接提供可靠的数据传输,优化性能。
- **高可用性**:支持多路径和在检测到高丢包率或网络错误时切换到健康路径。
- **IPV6 支持**:支持利用 IPV6 组网。
+3
View File
@@ -0,0 +1,3 @@
# 许可证
EasyTier 根据 [Apache License 2.0](https://github.com/KKRainbow/EasyTier/blob/main/LICENSE) 许可证发布。
+11
View File
@@ -0,0 +1,11 @@
# 多节点组网
基于刚才的双节点组网例子,如果有更多的节点需要加入虚拟网络,可以使用如下命令。
```
sudo easytier-core --ipv4 10.144.144.2 --peers udp://22.1.1.1:11010
```
其中 `--peers ` 参数可以填写任意一个已经在虚拟网络中的节点的监听地址。
---
+3
View File
@@ -0,0 +1,3 @@
# 其他
可使用 ``easytier-core --help`` 查看全部配置项
+43
View File
@@ -0,0 +1,43 @@
# 子网代理(点对网)
假设网络拓扑如下,节点 B 想将其可访问的子网 10.1.1.0/24 共享给其他节点。
```mermaid
flowchart LR
subgraph 节点 A IP 22.1.1.1
nodea[EasyTier\n10.144.144.1]
end
subgraph 节点 B
nodeb[EasyTier\n10.144.144.2]
end
id1[[10.1.1.0/24]]
nodea <--> nodeb <-.-> id1
```
则节点 B 的 easytier 启动参数为(新增 -n 参数)
```sh
sudo easytier-core --ipv4 10.144.144.2 -n 10.1.1.0/24
```
子网代理信息会自动同步到虚拟网络的每个节点,各个节点会自动配置相应的路由,节点 A 可以通过如下命令检查子网代理是否生效。
1. 检查路由信息是否已经同步,proxy_cidrs 列展示了被代理的子网。
```sh
easytier-cli route
```
![alt text](/assets/image-3.png)
2. 测试节点 A 是否可访问被代理子网下的节点
```sh
ping 10.1.1.2
```
---
+50
View File
@@ -0,0 +1,50 @@
# 双节点组网
假设双节点的网络拓扑如下
```mermaid
flowchart LR
subgraph 节点 A IP 22.1.1.1
nodea[EasyTier\n10.144.144.1]
end
subgraph 节点 B
nodeb[EasyTier\n10.144.144.2]
end
nodea <-----> nodeb
```
1. 在节点 A 上执行:
```sh
sudo easytier-core --ipv4 10.144.144.1
```
命令执行成功会有如下打印。
![alt text](/assets/image-2.png)
2. 在节点 B 执行
```sh
sudo easytier-core --ipv4 10.144.144.2 --peers udp://22.1.1.1:11010
```
3. 测试联通性
两个节点应成功连接并能够在虚拟子网内通信
```sh
ping 10.144.144.2
```
使用 easytier-cli 查看子网中的节点信息
```sh
easytier-cli peer
```
![alt text](/assets/image.png)
```sh
easytier-cli route
```
![alt text](/assets/image-1.png)
---
+57
View File
@@ -0,0 +1,57 @@
# 使用 WireGuard 客户端接入
EasyTier 可以用作 WireGuard 服务端,让任意安装了 WireGuard 客户端的设备访问 EasyTier 网络。对于目前 EasyTier 不支持的平台 (如 iOS、Android 等),可以使用这种方式接入 EasyTier 网络。
假设网络拓扑如下:
```mermaid
flowchart LR
ios[[iPhone \n 安装 WireGuard]]
subgraph 节点 A IP 22.1.1.1
nodea[EasyTier\n10.144.144.1]
end
subgraph 节点 B
nodeb[EasyTier\n10.144.144.2]
end
id1[[10.1.1.0/24]]
ios <-.-> nodea <--> nodeb <-.-> id1
```
我们需要 iPhone 通过节点 A 访问 EasyTier 网络,则可进行如下配置:
在节点 A 的 easytier-core 命令中,加入 --vpn-portal 参数,指定 WireGuard 服务监听的端口,以及 WireGuard 网络使用的网段。
```
# 以下参数的含义为: 监听 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 的配置。
```
$> easytier-cli vpn-portal
portal_name: wireguard
client_config:
[Interface]
PrivateKey = 9VDvlaIC9XHUvRuE06hD2CEDrtGF+0lDthgr9SZfIho=
Address = 10.14.14.0/24 # should assign an ip from this cidr manually
[Peer]
PublicKey = zhrZQg4QdPZs8CajT3r4fmzcNsWpBL9ImQCUsnlXyGM=
AllowedIPs = 192.168.80.0/20,10.147.223.0/24,10.144.144.0/24
Endpoint = 0.0.0.0:11013 # should be the public ip of the vpn server
connected_clients:
[]
```
使用 Client Config 前,需要将 Interface Address 和 Peer Endpoint 分别修改为客户端的 IP 和 EasyTier 节点的 IP。将配置文件导入 WireGuard 客户端,即可访问 EasyTier 网络。
---
+23
View File
@@ -0,0 +1,23 @@
# 无公网IP组网
EasyTier 支持共享公网节点进行组网。目前已部署共享的公网节点
``tcp://easytier.public.kkrainbow.top:11010``
使用共享节点时,需要每个入网节点提供相同的 ``--network-name`` 和 ``--network-secret`` 参数,作为网络的唯一标识。
以双节点为例,节点 A 执行:
```sh
sudo easytier-core -i 10.144.144.1 --network-name abc --network-secret abc -e tcp://easytier.public.kkrainbow.top:11010
```
节点 B 执行
```sh
sudo easytier-core --ipv4 10.144.144.2 --network-name abc --network-secret abc -e tcp://easytier.public.kkrainbow.top:11010
```
命令执行成功后,节点 A 即可通过虚拟 IP 10.144.144.2 访问节点 B。
---
+6
View File
@@ -0,0 +1,6 @@
# 组网
::: tip 注意
下文仅描述命令行工具的使用,图形界面程序可参考下述概念自行配置。
:::
确保已按照 [安装指南](/guide/installation) 安装 EasyTier,并且 easytier-core 和 easytier-cli 两个命令都已经可用。
+6
View File
@@ -0,0 +1,6 @@
# 路线图
- [ ] 完善文档和用户指南。
- [ ] 支持 TCP 打洞等特性。
- [ ] 支持 Android、IOS 等移动平台。
- [ ] 支持 Web 配置管理。
+35
View File
@@ -0,0 +1,35 @@
---
# https://vitepress.dev/reference/default-theme-home-page
layout: home
hero:
name: Easytier
text: 由 Rust 和 Tokio 驱动
tagline: 一个简单、安全、去中心化的内网穿透 VPN 组网方案
actions:
- theme: brand
text: 快速开始
link: /guide/installation
- theme: alt
text: 在 Github 上查看
link: https://github.com/KKRainbow/EasyTier
features:
- title: 去中心化
details: 无需依赖中心化服务,节点平等且独立。
- title: 安全
details: 支持利用 WireGuard 加密通信,也支持 AES-GCM 加密保护中转流量。
- title: 高性能
details: 全链路零拷贝,性能与主流组网软件相当。
- title: 跨平台
details: 支持 MacOS/Linux/Windows,未来将支持 IOS 和 Android。可执行文件静态链接,部署简单。
- title: 无公网 IP 组网
details: 支持利用共享的公网节点组网,可参考配置指南
- title: NAT 穿透
details: 支持基于 UDP 的 NAT 穿透,即使在复杂的网络环境下也能建立稳定的连接。
- title: 子网代理(点对网)
details: 节点可以将可访问的网段作为代理暴露给 VPN 子网,允许其他节点通过该节点访问这些子网。
- title: 智能路由
details: 根据流量智能选择链路,减少延迟,提高吞吐量。
---
+12
View File
@@ -0,0 +1,12 @@
{
"name": "easytier-doc",
"version": "0.0.0",
"description": "",
"scripts": {
"docs:dev": "vitepress dev",
"docs:build": "vitepress build",
"docs:preview": "vitepress preview"
},
"keywords": [],
"author": ""
}
+5
View File
@@ -0,0 +1,5 @@
lockfileVersion: '6.0'
settings:
autoInstallPeers: true
excludeLinksFromLockfile: false