This commit is contained in:
Sijie.Sun
2025-01-20 14:15:07 +08:00
committed by GitHub
parent 41de88f216
commit 0415c53b40
104 changed files with 12433 additions and 16065 deletions
+3 -1
View File
@@ -4,7 +4,9 @@ import StarHistory from '../../.vitepress/components/starHistory.vue'
# Community and Contribution
We welcome and encourage community contributions! If you want to get involved, please submit a [GitHub PR](https://github.com/EasyTier/EasyTier/pulls). Detailed contribution guidelines can be found in [CONTRIBUTING.md](https://github.com/EasyTier/EasyTier/blob/main/CONTRIBUTING.md).
We welcome and encourage community contributions! If you want to get involved, please submit a [GitHub PR](https://github.com/EasyTier/EasyTier/pulls).
Detailed contribution guidelines can be found in the [Contributing](https://github.com/EasyTier/EasyTier/blob/main/CONTRIBUTING.md) document.
## Star History
+3 -3
View File
@@ -1,6 +1,6 @@
# Contact
# Contact Information
- Ask questions or report problems: [GitHub Issues](https://github.com/EasyTier/EasyTier/issues)
- Discussion and exchange: [GitHub Discussions](https://github.com/EasyTier/EasyTier/discussions)
- Ask questions or report issues: [GitHub Issues](https://github.com/EasyTier/EasyTier/issues)
- Discussion and communication: [GitHub Discussions](https://github.com/EasyTier/EasyTier/discussions)
- QQ Group: [949700262](https://qm.qq.com/q/LDxBN5L3kA)
- Telegram: https://t.me/easytier
+201
View File
@@ -0,0 +1,201 @@
---
home: hello
---
<script setup lang="ts">
import { ref } from 'vue'
import { data } from '../../metadata.data.js'
interface Package {
os: string
arch: string
gui_pkg_tmpl: record<string, string>
cli_pkg_tmpl: record<string, string> // key: format, value: url
comment?: string
}
function gen_pkg_without_gui(os: string, archs: string[]): Package[] {
return archs.map(arch => {
return {
os,
arch,
gui_pkg_tmpl: {},
cli_pkg_tmpl: {
"zip": `https://github.com/EasyTier/EasyTier/releases/download/v{}/easytier-linux-${arch}-v{}.zip`,
},
}
})
}
const packages = ref<Package[]>([
{
os: 'Windows',
arch: 'x86_64',
gui_pkg_tmpl: {
"exe": 'https://github.com/EasyTier/EasyTier/releases/download/v{}/easytier-gui_{}_x64-setup.exe'
},
cli_pkg_tmpl: {
"zip": 'https://github.com/EasyTier/EasyTier/releases/download/v{}/easytier-windows-x86_64-v{}.zip'
},
comment: "Windows 7 requires SP1 or above, and the installation of KB3063858 and KB4474419 patches"
},
{
os: "Windows",
arch: "arm64",
gui_pkg_tmpl: {
"exe": 'https://github.com/EasyTier/EasyTier/releases/download/v{}/easytier-gui_{}_arm64-setup.exe'
},
cli_pkg_tmpl: {
"zip": 'https://github.com/EasyTier/EasyTier/releases/download/v{}/easytier-windows-arm64-v{}.zip'
},
},
{
os: "Linux",
arch: "x86_64",
gui_pkg_tmpl: {
"deb": 'https://github.com/EasyTier/EasyTier/releases/download/v{}/easytier-gui_{}_amd64.deb',
"AppImage": 'https://github.com/EasyTier/EasyTier/releases/download/v{}/easytier-gui_{}_amd64.AppImage',
},
cli_pkg_tmpl: {
"zip": 'https://github.com/EasyTier/EasyTier/releases/download/v{}/easytier-linux-x86_64-v{}.zip',
},
},
{
os: "Linux",
arch: "aarch64",
gui_pkg_tmpl: {
"deb": 'https://github.com/EasyTier/EasyTier/releases/download/v{}/easytier-gui_{}_arm64.deb',
},
cli_pkg_tmpl: {
"zip": 'https://github.com/EasyTier/EasyTier/releases/download/v{}/easytier-linux-aarch64-v{}.zip',
},
},
...gen_pkg_without_gui("Linux", ["arm", "armhf", "armv7", "armv7hf", "mips", "mipsel"]),
{
os: "MacOS",
arch: "x86_64",
gui_pkg_tmpl: {
"dmg": 'https://github.com/EasyTier/EasyTier/releases/download/v{}/easytier-gui_{}_x64.dmg',
},
cli_pkg_tmpl: {
"zip": 'https://github.com/EasyTier/EasyTier/releases/download/v{}/easytier-macos-x86_64-v{}.zip',
},
comment: "After installing the GUI, you need to manually execute xattr -c /Applications/easytier-gui.app, otherwise it will prompt that the file is damaged"
},
{
os: "MacOS",
arch: "aarch64",
gui_pkg_tmpl: {
"dmg": 'https://github.com/EasyTier/EasyTier/releases/download/v{}/easytier-gui_{}_aarch64.dmg',
},
cli_pkg_tmpl: {
"zip": 'https://github.com/EasyTier/EasyTier/releases/download/v{}/easytier-macos-aarch64-v{}.zip',
},
comment: "After installing the GUI, you need to manually execute xattr -c /Applications/easytier-gui.app, otherwise it will prompt that the file is damaged"
},
{
os: "Android",
arch: "universal",
gui_pkg_tmpl: {
"apk": 'https://github.com/EasyTier/EasyTier/releases/download/v{}/app-universal-release.apk',
},
cli_pkg_tmpl: {},
comment: "If you encounter abnormal display issues, please try upgrading WebView"
},
{
os: "FreeBSD 13.2",
arch: "x86_64",
gui_pkg_tmpl: {},
cli_pkg_tmpl: {
"zip": 'https://github.com/EasyTier/EasyTier/releases/download/v{}/easytier-freebsd-13.2-x86_64-v{}.zip',
},
}
])
const all_archs = new Set(packages.value.map(pkg => pkg.arch))
const all_os = new Set(packages.value.map(pkg => pkg.os))
const all_proxy = new Set(data.github_accels)
const version = ref(data.easytier_latest_version)
const url = 'https://github.com/EasyTier/EasyTier/releases/tag/v'
const filter_os = ref('')
const filter_arch = ref('')
const accel_proxy = ref('')
function renderUrlTmpl(url_tmpl: string): string {
return accel_proxy.value + url_tmpl.replace(/\{\}/g, version.value)
}
</script>
# Download { #download }
You can directly go to the [GitHub Release page](https://github.com/EasyTier/EasyTier/releases) to view the download links for all versions, or use the table below to find the version that suits you.
The command line program package includes three executables:
- `easytier-core`: The core program of EasyTier
- `easytier-cli`: EasyTier management program, after starting easytier-core, you can use easytier-cli to view virtual network information
- `easytier-web`: Used for self-hosting the EasyTier Web console backend, generally no need to self-host, you can use the official Web console
## <a :href="url + version">EasyTier v{{ version }}</a> { #latest }
- GitHub Acceleration
<div>
<select name="pets" id="gh-accel-select" v-model="accel_proxy" class="filter-select">
<option value=""> Direct </option>
<option v-for="p in all_proxy" :value="p"> {{ p }} </option>
</select>
</div>
- Filter by Operating System
<div>
<select name="pets" id="os-select" v-model="filter_os" class="filter-select">
<option value=""> All </option>
<option v-for="os in all_os" :value="os"> {{ os }} </option>
</select>
</div>
- Filter by Hardware Architecture
<div>
<select name="pets" id="arch-select" v-model="filter_arch" class="filter-select">
<option value=""> All </option>
<option v-for="arch in all_archs" :value="arch"> {{ arch }} </option>
</select>
</div>
<table>
<thead>
<td> Operating System </td>
<td> Hardware Architecture </td>
<td> GUI Program </td>
<td> CLI Program </td>
<td> Notes </td>
</thead>
<tr v-for="pkg in packages" v-show="(!filter_os || pkg.os === filter_os) && (!filter_arch || pkg.arch === filter_arch)">
<td> {{ pkg.os }} </td>
<td> {{ pkg.arch }} </td>
<td>
<a v-for="(url_tmpl, format) in pkg.gui_pkg_tmpl" class="download-link-span" :href="renderUrlTmpl(url_tmpl)">
{{format}}
</a>
</td>
<td>
<a v-for="(url_tmpl, format) in pkg.cli_pkg_tmpl" class="download-link-span" :href="renderUrlTmpl(url_tmpl)">
{{format}}
</a>
</td>
<td>
{{ pkg.comment }}
</td>
</tr>
</table>
+11
View File
@@ -0,0 +1,11 @@
# Public Server Networking
Currently, a small bandwidth public server is provided to facilitate networking for friends without a public server. In most cases, P2P tunneling can be successful. If P2P tunneling fails, the bandwidth between nodes may be relatively low.
The configuration method is shown in the figure.
![Configuration Interface](/assets/cn/config.png)
After the configuration is complete, click the Run Network button. The interface after the network runs successfully is shown in the figure.
![Running](/assets/cn/running.png)
+44
View File
@@ -0,0 +1,44 @@
# [EasyTier Game Launcher](https://github.com/EasyTier/EasytierGame)
## Introduction
EasyTierGame is a game launcher developed with `nuxt3`, `typescript`, `rust`, and `tauri`.
It features a simple interface and includes the latest EasyTier core, providing a comfortable experience both psychologically and practically when playing online. It also supports custom configuration file launches to meet various needs.
## Download
Github
Releases: [https://github.com/EasyTier/EasytierGame/releases](https://github.com/EasyTier/EasytierGame/releases)
- Only a green zip package is available. I personally dislike installers that write to the registry. Just extract and use, keeping the directory clean and tidy.
![game-step1](/assets/game-step1.png)
## Tutorial
- For the first use, enter a "hostname" and click to start the game. You can later create your own server or use servers provided by community members.
![game-step2](/assets/game-step2.png)
![game-step3](/assets/game-step3.png)
- There are some special configurations in the advanced options that you can choose from.
![game-step4](/assets/game-step4.png)
- If your needs are still not met, you can use a configuration file to start the game. For details on how to configure, refer to the documentation [Configuration File](/guide/network/config-file.html).
![game-step5](/assets/game-step5.png)
- After upgrading the EasyTier core, you can click the update plugin button to update. However, you need to use a VPN. If you cannot update, you can get the update from the community.
![game-step6](/assets/game-step6.png)
## Features
- Developed based on the EasyTier networking tool, with a clear and simple interface.
- Comes with an "update" button. When a new version of the EasyTier networking tool is released, click update to get it (requires a VPN).
- For the first use, enter a "hostname" and click to start the game. You can later create your own server or use servers provided by community members.
- Simple configuration with advanced features, also supports custom configuration file launches.
- **WinIPBroadcast** is enabled by default, so you no longer have to worry about not finding rooms when playing online (e.g., Borderlands 3).
- Tested and stable for online play with **Elden Ring**, **Borderlands 3**, **Deep Rock Galactic**, **Monster Hunter: World**, and more.
## System Support
Supports Windows 11, Windows 10, and Windows 7.
+74
View File
@@ -0,0 +1,74 @@
# [EasyTier Manager](https://github.com/xlc520/easytier-manager)
## Download
Github
Releases: [https://github.com/xlc520/easytier-manager/releases](https://github.com/xlc520/easytier-manager/releases)
#### Package Descriptions
- `exe`: Installer, needs to be installed before use
- `zip`: No installation required, just unzip to use
- `easytier-manager-win_2.0.0.exe`: Universal installer for 64-bit and 32-bit Windows systems
- `easytier-manager-win-x64_2.0.0.exe`: Installer for 64-bit Windows systems
- `easytier-manager-win-ia32_2.0.0.exe`: Installer for 32-bit Windows systems
- `easytier-manager-win7-x64_2.0.0.exe`: Installer for 64-bit Windows 7 systems
- `tar.gz` `deb` `rpm` `AppImage`: For use on Linux systems (untested)
## Tutorial
- **1. [Important] On the settings page, check if the kernel exists. If not, download and install the kernel, then check again** (only needed for the first use, subsequent uses can run directly if the kernel exists)
![manage-step1](/assets/manage-step1.png)
![manage-step2](/assets/manage-step2.png)
- 2. On the configuration page, create a new network configuration, either by editing the code directly or by filling out a form
![manage-step3](/assets/manage-step3.png)
![manage-step4](/assets/manage-step4.png)
![manage-step5](/assets/manage-step5.png)
![manage-step6](/assets/manage-step6.png)
- 3. On the workspace (home page), run the specified configuration
![manage-step7](/assets/manage-step7.png)
- 4. [Optional] After the network is successfully configured, you can exit the manager if there are no connection issues. The core program will run in the background (right-click the tray icon and select `exit`)
- 5. [Optional] On the configuration page, install the specified configuration as a system service
![manage-step8](/assets/manage-step8.png)
![manage-step9](/assets/manage-step9.png)
## Introduction
EasyTier Manager integrates Vue3 + Vite5 + Electron33 + Element-Plus. It is a free and open-source network management tool based on `element-plus`. It is developed using the latest technologies such as `vue3`, `vite5`, and `TypeScript`.
## Features
- **Memory Usage**: After the network is successfully configured, you can exit the manager without affecting the network, so it won't occupy memory or cause memory leaks
- **Multiple Configurations**: Supports running and managing multiple network configurations
- **System Service Installation**: One-click installation as a system service with automatic startup on boot
- **Visual Configuration**: Provides a form for visual network configuration, making it simple and convenient
- **Visual Log Viewing**: View logs of the current network configuration on the home page
- **One-Click Download and Install**: One-click download and install of the kernel with built-in accelerated sources, no manual download required
- **Latest Tech Stack**: Developed using cutting-edge technologies like Electron33/Vue3/vite5
- **TypeScript**: A language for application-scale JavaScript
- **Internationalization**: Built-in comprehensive internationalization solution
## Bug Reports & Suggestions
> The project is stable and may not have new features developed, only bug fixes
Check [TODO](https://github.com/xlc520/easytier-manager/blob/master/TODO.md) to see if there are existing records to avoid duplication
[BUG Report | Feature Suggestion](https://github.com/xlc520/easytier-manager/issues/new/choose)
## System Support
Theoretically supports Windows 11, Windows 10, Windows 7
+9
View File
@@ -0,0 +1,9 @@
# Graphical User Interface (GUI) Networking
The graphical interface program can also be downloaded from the GitHub Release page, with the prefix easytier-gui.
Note that after installation on MacOS, you need to execute the following command in the terminal, otherwise, it will mistakenly report that the file is damaged.
```bash
xattr -c /Applications/easytier-gui.app
```
+6
View File
@@ -0,0 +1,6 @@
# 手动组网
EasyTier 不区分客户端服务端,且完全去中心化,新增节点只需与虚拟网络中的任意节点建链即可加入组网。配置方法如下图所示。
![手动组网](/assets/cn/manual.png)
+7
View File
@@ -0,0 +1,7 @@
# Subnet Proxy
By setting up a subnet proxy, you can connect the local area network and the virtual local area network.
Assuming the devices at home are in the 192.168.1.0/24 subnet, and you want to access any device at home from the company, you can start an EasyTier node at home and add a subnet proxy for 192.168.1.0/24. No additional configuration is needed on the company's devices; simply connect to the home node successfully, and you can access any device at home.
![Subnet Proxy Configuration](/assets/cn/subnet.png)
+11
View File
@@ -0,0 +1,11 @@
# WireGuard Access
Each node in EasyTier can act as a WireGuard server, allowing mobile devices such as Android and iOS to easily access devices in the virtual LAN.
Configuration method as shown in the figure.
![Wireguard Portal Config](/assets/cn/portal.png)
Click the "Show WireGuard Portal Configuration" button on the network success page to view the client configuration file. Import this configuration file into a third-party client on your phone to allow the phone to access the virtual LAN.
![Client Config](/assets/cn/portal_config.png)
+65 -51
View File
@@ -1,84 +1,98 @@
# Installation {#installation}
1. **Download the precompiled binary file**
Visit the [GitHub Release page](https://github.com/EasyTier/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.
## Installation Methods
1. **Download Precompiled Binaries (Recommended)**
Visit the [⬇️Download Page](./download) to download the binaries or installation packages for your operating system.
2. **Install via crates.io**
::: code-group
```sh [cargo]
cargo install easytier
```
:::
3. **DockerHub**
3. **Install from source code**
::: code-group
```sh [cargo]
cargo install --git https://github.com/EasyTier/EasyTier.git
[DockerHub Image](https://hub.docker.com/layers/easytier/easytier)
```sh [docker]
docker pull easytier/easytier:latest
```
:::
4. **Install via Docker Compose**
::: code-group
::: details docker-compose.yml
```yaml [docker-compose.yml]
version: "3.8"
version: '3.8'
services:
watchtower: # Used to automatically update the easytier image, delete this part if not needed
command: --interval 3600 --cleanup --label-enable
container_name: watchtower
environment:
- WATCHTOWER_NO_STARTUP_MESSAGE
image: containrrr/watchtower
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
easytier:
restart: always
labels:
com.centurylinklabs.watchtower.enable: "true"
privileged: true
mem_limit: 0m
container_name: easytier
hostname: easytier
network_mode: host
volumes:
- /etc/easytier:/root
environment:
- TZ=Asia/Shanghai
image: easytier/easytier:latest
command: -i <ip> --network-name <user> --network-secret <password> -e tcp://<server address>:11010 -l <listen address>
watchtower: # Used to automatically update the easytier image, delete this part if not needed
command: --interval 3600 --cleanup --label-enable
container_name: watchtower
environment:
- TZ=Asia/Shanghai
- WATCHTOWER_NO_STARTUP_MESSAGE
image: containrrr/watchtower
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock
easytier:
restart: always
labels:
com.centurylinklabs.watchtower.enable: 'true'
privileged: true
mem_limit: 0m
container_name: easytier
hostname: easytier
network_mode: host
volumes:
- /etc/easytier:/root
environment:
- TZ=Asia/Shanghai
image: easytier/easytier:latest
command: -i <ip> --network-name <user> --network-secret <password> -p tcp://<server_address>:11010
```
:::
5. One-Click Installation Script (For Linux Only)
5. **One-Click Installation Script (Linux Only)**
```bash
wget -O /tmp/easytier.sh "https://raw.githubusercontent.com/EasyTier/EasyTier/main/script/install.sh" && bash /tmp/easytier.sh install
```
```bash
wget -O /tmp/easytier.sh "https://raw.githubusercontent.com/EasyTier/EasyTier/main/script/install.sh" && bash /tmp/easytier.sh install
```
# Frequently Asked Questions
6. **Install from Source**
## Question 1
```sh [cargo]
cargo install --git https://github.com/EasyTier/EasyTier.git easytier
```
Q: On Windows 7, I cannot create a network, the program crashes or fails to create a virtual network.
## Third-Party Tools
A: Windows 7 must be Service Pack 1 (SP1) or later, and you need to install the patches [KB3063858](https://www.microsoft.com/en-us/download/details.aspx?id=47409) and [KB4474419](https://www.catalog.update.microsoft.com/search.aspx?q=KB4474419).
- [EasyTier Game (Windows)](/guide/gui/easytier-game)
- [EasyTier Manager (Windows)](/guide/gui/easytier-manager)
- [luci-app-easytier (OpenWrt)](https://github.com/EasyTier/luci-app-easytier)
## Question 2
## FAQ {#faq}
Q: The command-line help in Linux is in English, how can I switch it to Chinese?
### Question 1
A: You need to set the environment variable `LANG=zh_CN`. Command: `export LANG=zh_CN`
Q: Unable to create a network on Windows 7, the program crashes or reports an error that it cannot create a virtual network.
## Question 3
A: Windows 7 requires SP1 or above, and the installation of [KB3063858](https://www.microsoft.com/en-us/download/details.aspx?id=47409) and [KB4474419](https://www.catalog.update.microsoft.com/search.aspx?q=KB4474419) patches.
Q: After starting, I get a TunError message.
### Question 2
A: Ensure that the TUN driver has been correctly loaded and that the file `/dev/net/tun` exists. If using Docker, make sure privilege mode is enabled. To load the Linux TUN driver:
Q: The Linux command line help is in English, how to change it to Chinese?
A: You need to set the environment variable LANG=zh_CN, command: `export LANG=zh_CN`
### Question 3
Q: TunError is prompted after startup.
A: Ensure that the TUN driver is correctly loaded and the `/dev/net/tun` file exists. If using Docker, make sure to enable privileged mode. The method to load the Linux TUN driver is:
```bash
modprobe tun
+14 -14
View File
@@ -1,23 +1,23 @@
# Introduction
# Feature Overview
EasyTier is a simple, safe and decentralized SD-WAN networking solution implemented with the Rust language and Tokio framework.
A simple, secure, decentralized SD-WAN solution for remote networking, implemented using Rust and the Tokio framework.
## 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/FreeBSD/Android, will support IOS 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/networking-without-public-ip)
- **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 virtual network, 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.
- **Secure**: Supports encrypted communication using WireGuard, and also supports AES-GCM encryption to protect relay traffic.
- **High Performance**: Zero-copy throughout the entire link, performance comparable to mainstream networking software.
- **Cross-Platform**: Supports MacOS/Linux/Windows/FreeBSD/Android, with future support for IOS. Executable files are statically linked, making deployment simple.
- **Networking without Public IP**: Supports networking using shared public nodes, refer to [Configuration Guide](/guide/network/networking-without-public-ip)
- **NAT Traversal**: Supports UDP-based NAT traversal, enabling stable connections even in complex network environments.
- **Subnet Proxy (Point-to-Network)**: Nodes can expose accessible subnets as proxies to the virtual network, allowing other nodes to access these subnets through the node.
- **Intelligent Routing**: Intelligently selects links based on traffic to reduce latency and increase throughput.
- **TCP Support**: Provides reliable data transmission through concurrent TCP connections when UDP is restricted, optimizing performance.
- **High Availability**: Supports multipath and switches to healthy paths when high packet loss or network errors are detected.
- **IPV6 Support**: Supports networking using IPV6.
## GUI
![alt text](/assets/image-5.png)
![alt text](/assets/image-6.png)
![alt text](/assets/image-4.png)
![alt text](/assets/image-7.png)
+2 -2
View File
@@ -1,3 +1,3 @@
# License
# 许可证
EasyTier is released under the [Apache License 2.0](https://github.com/EasyTier/EasyTier/blob/main/LICENSE).
EasyTier 基于 [Apache License 2.0](https://github.com/EasyTier/EasyTier/blob/main/LICENSE) 许可发布。
+7 -82
View File
@@ -1,90 +1,15 @@
# Configuration File
Supports specifying the configuration file path using the -c parameter.
Note: The configuration file has a higher priority. When a configuration file is specified at runtime, all command line parameters except for -c will be ignored and only the configuration file will take effect.
You can specify the configuration file path using the -c parameter.
```sh
./easytier-core -c ./config.toml
easytier-core -c ./config.yaml
```
You can run `./easytier-core` directly without using any parameters to obtain the minimal configuration file. By running the command with parameters, you can get a configuration file corresponding to those parameters. The configuration file will be printed on the command line, and you can manually copy the relevant configuration and save it as a TOML file.
::: warning Note
Note: The configuration file has a higher priority. When a configuration file is specified at runtime, all other command line parameters except `-c` will be ignored and only the configuration file will take effect.
:::
Below is an example of a configuration file along with annotations for various configuration options.
Running with parameters can generate a configuration file with the corresponding parameters. The configuration file will be printed in the command line, and you can manually copy and save it as a toml file.
```toml
# instance name to identify this node in same machine
instance_name = ""
# Hostname, used to identify the hostname of this device
hostname = ""
# Instance ID, usually a UUID, unique within the same network
instance_id = ""
# The IPv4 address of this node. If left empty, this node will only forward packets and will not create a TUN device
ipv4 = ""
# Automatically determined and assigned IP address by EasyTier, starting from 10.0.0.1 by default. Warning: When using DHCP, if an IP conflict occurs within the network, the IP address will be automatically changed.
dhcp = false
# List of listeners, used for accepting connections
listeners = [
"tcp://0.0.0.0:11010",
"udp://0.0.0.0:11010",
"wg://0.0.0.0:11011",
"ws://0.0.0.0:11011/",
"wss://0.0.0.0:11012/",
]
# List of exit nodes
exit_nodes = []
# Rpc portal address to listen for management
rpc_portal = "127.0.0.1:15888"
[network_identity]
# network name to identify this virtual network
network_name = ""
# network secret to verify this node belongs to the virtual network
network_secret = ""
# This is the configuration for peer connection nodes, allowing multiple entries to support multiple peer connections
[[peer]]
uri = ""
[[peer]]
uri = ""
# This is the configuration for subnet proxy nodes, where multiple entries can be configured to support multiple subnets
[[proxy_network]]
cidr = "10.0.1.0/24"
[[proxy_network]]
cidr = "10.0.2.0/24"
# wg configuration information
[vpn_portal_config]
# The subnet where the wg client is located, as shown in the example below.
client_cidr = "10.14.14.0/24"
# The port that wg listens to (please do not conflict with the listeners' wg).
wireguard_listen = "0.0.0.0:11012"
[flags]
# default protocol to use when connecting to peers
default_protocol = "tcp"
# TUN device name. If left empty, the default name will be used
dev_name = ""
# enable encryption for peers communication
enable_encryption = true
# enable IPv6 support
enable_ipv6 = true
# mtu of the TUN device
mtu = 1380
# latency priority mode will attempt to forward traffic using the path with the lowest latency. By default, the shortest path is used
latency_first = false
# configure this node as an exit node
enable_exit_node = false
# disable TUN device
no_tun = false
# enable smoltcp stack for subnet proxy
use_smoltcp = false
# only forward traffic from the whitelist networks, supporting wildcard strings, multiple network names can be separated by spaces. if this parameter is empty, forwarding is disabled. by default, all networks are allowed. e.g.: '*' (all networks), 'def*' (networks with the prefix 'def'), 'net1 net2' (only allow net1 and net2)
foreign_network_whitelist = "*"
```
Running `easytier-core` directly without parameters will generate the minimal configuration file.
+84 -89
View File
@@ -1,93 +1,88 @@
# Configurations
# Complete Configuration Options
You can use `easytier-core --help` to view all configuration items
You can use `easytier-core --help` to view all configuration options.
```sh
A full meshed p2p networking tool, connecting all your devices in one network with one command.
## Basic Settings
Usage: easytier-core [OPTIONS]
- **Startup and Version**
Options:
-c, --config-file <CONFIG_FILE>
path to the config file, NOTE: if this is set, all other options will be ignored
--network-name <NETWORK_NAME>
network name to identify this virtual network [default: default]
--network-secret <NETWORK_SECRET>
network secret to verify this node belongs to the virtual network [default: ]
-i, --ipv4 <IPV4>
ipv4 address of this node, if empty, this node will only forward packets and no TUN device will be
created
-d, --dhcp
automatically determine and set IP address by Easytier, and the
IP address starts from 10.0.0.1 by default. Warning, if there is an IP
conflict in the network when using DHCP, the IP will be automatically
changed.
-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 virtual network
-r, --rpc-portal <RPC_PORTAL>
rpc portal address to listen for management. 0 means random
port, 12345 means listen on 12345 of localhost, 0.0.0.0:12345 means
listen on 12345 of all interfaces. default is 0 and will try 15888 first [default: 0]
-l, --listeners [<LISTENERS>...]
listeners to accept connections, allow format:
a port number: 11010, means tcp/udp will listen on 11010, ws/wss will listen on 11010 and 11011, wg will
listen on 11011
url: tcp://0.0.0.0:11010, tcp can be tcp, udp, ring, wg, ws, wss,
proto:port: wg:11011, means listen on 11011 with wireguard protocol
url and proto:port can occur multiple times.
[default: 11010]
--no-listener
do not listen on any port, only connect to peers
--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
--hostname <HOSTNAME>
host name to identify this device
-m, --instance-name <INSTANCE_NAME>
instance name to identify this node in same machine [default: default]
--vpn-portal <VPN_PORTAL>
url that defines the portal, allow other kinds of clients to connect.
example: wg://0.0.0.0:11010/10.14.14.0/24, means the portal is a wireguard server listening on
0.0.0.0:11010, and the wireguard 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
--dev-name <DEV_NAME>
optional tun interface name
--mtu <MTU>
mtu of the TUN device, default is 1420 for non-encryption, 1400 for encryption
--latency-first
latency first mode, will try to relay traffic with lowest latency path, default is using shortest path
--exit-nodes [<EXIT_NODES>...]
exit nodes to forward all traffic to, a virtual ipv4 address, priority is determined by the order of the
list
--enable-exit-node
allow this node to be an exit node, default is false
--no-tun
do not create TUN device, can use subnet proxy to access node
--use-smoltcp
enable smoltcp stack for subnet proxy
--manual-routes [<MANUAL_ROUTES>...]
assign routes cidr manually, will disable subnet proxy and
wireguard routes propogated from peers. e.g.: 192.168.0.0/16
--relay-network-whitelist [<RELAY_NETWORK_WHITELIST>...]
only relay traffic of whitelisted networks, input is a wildcard
string, e.g.: '*' (all networks), 'def*' (network prefixed with def), can specify multiple networks
disable relay if arg is empty. default is allowing all networks
-h, --help
Print help
-V, --version
Print version
```
- `-h, --help`: Print help information.
- `-V, --version`: Print version information.
- **Configuration File**
- `-c, --config-file <CONFIG_FILE>`: Path to the configuration file. If this option is set, all other options will be ignored.
- **Instance Identification**
- `--hostname <HOSTNAME>`: Hostname to identify this device.
- `-m, --instance-name <INSTANCE_NAME>`: Instance name, default is `default`.
## Network Configuration
- **Server and Network**
- `-w, --config-server <CONFIG_SERVER>`: Configuration server address.
- `--network-name <NETWORK_NAME>`: Network name, default is `default`.
- `--network-secret <NETWORK_SECRET>`: Network secret, default is empty.
- **IP Configuration**
- `-i, --ipv4 <IPV4>`: IPv4 address of this node, empty means only forwarding packets.
- `-d, --dhcp`: Automatically set IP address, default starts from 10.0.0.1.
- `--dev-name <DEV_NAME>`: Optional TUN interface name.
- `--mtu <MTU>`: MTU of the TUN device, default is 1380 for non-encrypted, 1360 for encrypted.
## Connection Management
- **Listeners and Portals**
- `-l, --listeners [<LISTENERS>...]`: Listeners to accept connections.
- `--mapped-listeners [<MAPPED_LISTENERS>...]`: Specify public addresses for listeners.
- `--no-listener`: Do not listen on any port.
- `--vpn-portal <VPN_PORTAL>`: Define the URL of the VPN portal.
- `--rpc-portal <RPC_PORTAL>`: Management RPC portal address, default is 15888.
- **Nodes and Routing**
- `-p, --peers [<PEERS>...]`: Initial peers to connect to.
- `-e, --external-node <EXTERNAL_NODE>`: Use public shared nodes to discover peers.
- `--exit-nodes [<EXIT_NODES>...]`: Exit nodes to forward all traffic.
- `--enable-exit-node`: Allow this node to become an exit node.
- `--manual-routes [<MANUAL_ROUTES>...]`: Manually assign route CIDR.
- `--relay-network-whitelist [<RELAY_NETWORK_WHITELIST>...]`: Only forward traffic for whitelisted networks.
## Logging and Debugging
- **Log Level**
- `--console-log-level <CONSOLE_LOG_LEVEL>`: Console log level.
- `--file-log-level <FILE_LOG_LEVEL>`: File log level.
- **Log Storage**
- `--file-log-dir <FILE_LOG_DIR>`: Directory to store log files.
## Advanced Features
- **Performance Optimization**
- `--latency-first`: Latency first mode.
- `--multi-thread`: Run with multi-threading.
- `--disable-udp-hole-punching`: Disable UDP hole punching.
- **Security and Privacy**
- `-u, --disable-encryption`: Disable encryption, default is false.
- `--disable-ipv6`: Do not use IPv6.
- `--compression <COMPRESSION>`: Compression algorithm to use, default is `none`.
- **Proxy and Forwarding**
- `--proxy-networks <PROXY_NETWORKS>`: Export local networks to other peers.
- `--socks5 <SOCKS5>`: Enable socks5 server.
- `--ipv6-listener <IPV6_LISTENER>`: IPv6 listener URL.
- `--no-tun`: Do not create TUN device.
- `--use-smoltcp`: Enable smoltcp stack.
- `--bind-device <BIND_DEVICE>`: Bind socket to physical device.
- `--relay-all-peer-rpc`: Forward all peer RPC packets.
- **Communication Restrictions**
- `--disable-p2p`: Disable P2P communication.
- `--no-tun`: Do not create TUN device to use subnet proxy to access nodes.
@@ -0,0 +1,74 @@
# Decentralized Networking
Most networking software is centralized, where all devices must connect to a central server to form a network.
EasyTier is decentralized, with no distinction between server and client. As long as one device can communicate with any node in the virtual network, it can join the virtual network.
## Two-Node Networking
Assume the network topology of two nodes is as follows:
```mermaid
flowchart LR
subgraph Node A IP 22.1.1.1
nodeA[EasyTier<br/>10.144.144.1]
end
subgraph Node B IP 33.1.1.1
nodeB[EasyTier</br>10.144.144.2]
end
nodeA <-----> nodeB
```
1. Execute on Node A:
```sh
sudo easytier-core -i 10.144.144.1
```
2. Execute on Node B:
```sh
sudo easytier-core -d -p udp://22.1.1.1:11010
```
Here, `-d` represents DHCP mode, and EasyTier will automatically obtain an IP address.
## Three-Node Networking
Based on the previous two-node networking example, the third node C can join the virtual network by connecting to either Node A or Node B.
Assume it connects to Node A, the network topology is as follows:
```mermaid
flowchart LR
subgraph Node A IP 22.1.1.1
nodeA[EasyTier<br/>10.144.144.1]
end
subgraph Node C
nodeC[EasyTier<br/>10.144.144.3]
end
subgraph Node B IP 33.1.1.1
nodeB[EasyTier</br>10.144.144.2]
end
nodeA <-----> nodeB
nodeC <-----> nodeA
```
Execute on Node C:
```sh
sudo easytier-core -d -p udp://22.1.1.1:11010
```
Then C can communicate with A and B through the virtual network.
+178
View File
@@ -0,0 +1,178 @@
# Fast Networking
## Networking with Shared Nodes
When you don't have a public IP, you can use the free shared nodes provided by the EasyTier community to quickly set up a network. After successfully networking between nodes, NAT traversal will be attempted automatically to establish a P2P connection. Before successful P2P, the shared nodes will help forward data.
Assume there are two nodes A and B:
1. Execute on node A (please replace abc with a more complex network name to avoid connection failure due to network name conflict)
```sh
sudo easytier-core -i 10.144.144.1 --network-name abc --network-secret abc -p tcp://public.easytier.cn:11010
```
> `-i` specifies the virtual network IP address, default /24 subnet;
>
> `--network-name` and `--network-secret` represent the network name and network secret;
>
> `-p` specifies the node address, here using the official shared node.
2. Execute on node B
```sh
sudo easytier-core -d --network-name abc --network-secret abc -p tcp://public.easytier.cn:11010
```
> `-d` represents DHCP mode, EasyTier will automatically obtain an IP address.
3. Test connectivity
The two nodes should successfully connect and be able to communicate within the virtual subnet. You can execute the following on node B to test.
```sh
ping 10.144.144.1
```
::: warning Note
Some systems have firewalls enabled by default, which may block inbound traffic, causing the virtual IP to be unreachable or various services to be inaccessible. You need to manually disable the firewall or add rules.
:::
## Check Virtual Network Status
After starting easytier-core, you can use easytier-cli for management.
- View node information in the virtual network
```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 |
- View virtual network routing information
```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 |
- View information of the local node
```sh
easytier-cli node
```
```
┌───────────────┬──────────────────────┐
│ Virtual IP │ 10.144.144.1 │
├───────────────┼──────────────────────┤
│ Hostname │ archlinux-base │
├───────────────┼──────────────────────┤
│ Proxy CIDRs │ 10.147.223.0/24 │
├───────────────┼──────────────────────┤
│ Peer ID │ 2616333191 │
├───────────────┼──────────────────────┤
│ Public IP │ 75.52.125.26 │
├───────────────┼──────────────────────┤
│ UDP Stun Type │ FullCone │
├───────────────┼──────────────────────┤
│ Listener 1 │ tcp://0.0.0.0:11010 │
├───────────────┼──────────────────────┤
│ Listener 2 │ udp://0.0.0.0:11010 │
├───────────────┼──────────────────────┤
│ Listener 3 │ wg://0.0.0.0:11011 │
├───────────────┼──────────────────────┤
│ Listener 4 │ ws://0.0.0.0:11011/ │
├───────────────┼──────────────────────┤
│ Listener 5 │ wss://0.0.0.0:11012/ │
├───────────────┼──────────────────────┤
│ Listener 6 │ udp://[::]:37039 │
└───────────────┴──────────────────────┘
```
## Using Multiple Shared Nodes
To avoid virtual network unavailability due to a single shared node failure, you can connect to multiple shared nodes simultaneously. Just specify multiple `-p` parameters, such as: `-p tcp://1.1.1.1:11010 -p udp://1.1.1.2:11011`. Each node in the virtual network should specify the same list of public servers.
This relies on the shared node cluster feature supported by EasyTier. Assume there are two shared nodes A and B, which are interconnected to form a cluster. When C and D want to network, they can connect to both A and B simultaneously. This way, even if A or B fails, C and D can still communicate. The networking mode is shown in the diagram:
```mermaid
flowchart LR
subgraph Node C
nodeC[Node C</br>Network Name: abc]
end
subgraph Shared Node A
nodeA[Shared Node A</br>Network Name: Public]
end
subgraph Shared Node B
nodeB[Shared Node B</br>Network Name: Public]
end
subgraph Node D
nodeD[Node D</br>Network Name: abc]
end
nodeA <-----> nodeB
nodeC <-----> nodeA
nodeC <-----> nodeB
nodeA <-----> nodeD
nodeB <-----> nodeD
```
Even in the case of network partitioning, where C can only connect to A and D can only connect to B, C and D can still communicate.
```mermaid
flowchart LR
subgraph Node C
nodeC[Node C</br>Network Name: abc]
end
subgraph Shared Node A
nodeA[Shared Node A</br>Network Name: Public]
end
subgraph Shared Node B
nodeB[Shared Node B</br>Network Name: Public]
end
subgraph Node D
nodeD[Node D</br>Network Name: abc]
end
nodeA <-----> nodeB
nodeC <-----> nodeA
nodeB <-----> nodeD
```
## Joining Multiple Virtual Networks Simultaneously
EasyTier supports running multiple processes on the same device, each joining a different virtual network by using different parameters at startup. Note that the virtual IP subnets of multiple virtual networks should not overlap, otherwise routing conflicts will occur.
Additionally, when running multiple EasyTier instances, different listener ports need to be specified to avoid port conflicts.
For example, you can start two EasyTier processes with the following commands:
```sh
sudo easytier-core --network-name net1 -p tcp://public.easytier.cn:11010 -l 11010
sudo easytier-core --network-name net2 -p tcp://public.easytier.cn:11010 -l 21010
```
> `-l` specifies the listener port.
+8 -12
View File
@@ -1,27 +1,23 @@
# Self-Hosted Public Server
# Setting Up a Shared Node
Users can use their own public IP nodes to host a public server, making it convenient for other users without public IPs to form networks. To start EasyTier as a public server, simply launch `easytier-core` without any parameters (no root permissions required):
Users can use their own public nodes to set up a public shared node for networking without a public IP, making it easier for other users without a public IP to network. Simply start EasyTier without any parameters, and the node can be used as a public server (no root privileges required):
```
easytier-core
```
EasyTier supports public server clusters. Each virtual network (created using the same network name and key) can function as a public server cluster. Nodes from other networks can connect to any node in the public server cluster and discover each other without the need for a public IP. Running a self-hosted public server cluster is identical to running a virtual network, except you can skip configuring an IPv4 address.
Additionally, EasyTier supports shared node clusters. Each virtual network (created with the same network name and key) can act as a shared node cluster, and nodes from other networks can connect to any node in the shared node cluster, discovering each other without a public IP. Running a self-built public server cluster is the same as running a virtual network, but you can skip configuring the IPv4 address.
You can also use the following command to join the official public server cluster. In the future, load balancing between nodes in the public server cluster will be implemented:
```
sudo easytier-core --network-name easytier --network-secret easytier -p tcp://public.easytier.top:11010
```
If you wish to contribute a public server to the EasyTier community, you can contact the administrator, and we will inform you how to add your node to the community shared node list. Of course, this requires your node to have a certain level of bandwidth and stability.
## Disable Forwarding
By default, every node of EasyTier is capable of providing forwarding services for other virtual networks, even if the node has specified a `--network-name` and `--network-secret` and has joined a virtual network.
By default, each EasyTier node allows forwarding services for other virtual networks, even if the node has specified a network name (`--network-name`) and network key (`--network-secret`), and has joined a virtual network.
If you wish to change this behavior, you can use the `--relay-network-whitelist` parameter to define a whitelist of network names (a space-separated list of wildcard patterns, e.g., `"ab* abc"`). When the list for this parameter is empty, the node will not provide forwarding services for all other networks.
To change this behavior, you can use the `--relay-network-whitelist` parameter to specify a whitelist of network names that can be forwarded (a space-separated list of wildcards, such as `"ab* abc"`). When this parameter's list is empty, it will not provide forwarding services for any other networks.
EasyTier can be configured not to forward packets from other virtual networks but instead help establish P2P connections by leaving the whitelist empty and setting it to only forward RPC traffic. The reference command is:
EasyTier can avoid forwarding network packets for other virtual networks and only help them establish P2P links by setting the whitelist to empty and configuring it to only forward RPC traffic. The reference command is:
```
easytier-core --relay-network-whitelist --relay-all-peer-rpc
```
```
@@ -1,18 +1,18 @@
# Installing as macOS service
# Install as a macOS Service
Download and install [serviceman](https://webinstall.dev/serviceman)
Download and install [serviceman](https://webinstall.dev/serviceman).
Open terminal and run the following commands to register easytier service:
Open Terminal and run the following commands to register the service:
```bash
# Start easytier with configuration file
# Register the easytier service using a configuration file
sudo serviceman add -name easytier -system \
--workdir /var/log/easytier \
-groupname wheel -username root \
-cap-net-bind \
-- easytier-core -c ~/.config/easytier.toml
# or you can register easytier service without configuration
# Register the easytier service without using a configuration file
sudo serviceman add -name easytier -system \
--workdir /var/log/easytier \
-groupname wheel -username root \
@@ -20,13 +20,13 @@ sudo serviceman add -name easytier -system \
-- easytier-core --ipv4 x.x.x.x --network-name xxx --network-secret yyy --peers tcp://peer_host:11010
```
Start easytier service
Start the easytier service:
```bash
sudo serviceman start easytier
```
Stop easytier service:
Stop the easytier service:
```bash
sudo serviceman stop easytier
@@ -1,8 +1,8 @@
# Installing as a Linux Systemd Service
# Install the Service as a Linux Systemd Service
On Linux distributions that support systemd, you can configure the service to start automatically with the system by following these steps:
On Linux distributions that support systemd, you can configure the service to start with the system by following these steps:
1. Create a new service file at `/etc/systemd/system/easytier.service` and modify the command line parameters after `ExecStart` as needed.
1. Create a new service file `/etc/systemd/system/easytier.service` and modify the command line parameters after `ExecStart` as needed.
```shell
[Unit]
@@ -31,4 +31,4 @@ systemctl start easytier.service
systemctl stop easytier.service
```
Please note that using the `systemctl` command instead of the `service` command is the more modern approach, and it is recommended to use it on systems that support systemd.
Please note that using the `systemctl` command instead of the `service` command is a more modern approach and is recommended on systems that support systemd.
@@ -1,9 +1,10 @@
# Installing as a Windows Service
# Install as a Windows Service
1. Go to the NSSM official website [https://nssm.cc/download] to download NSSM and extract it to a local directory.
2. Download the command-line version of `easytier-core.exe`, remember the installation directory, such as `D:\Software\Easytier\cli\easytier-core.exe`.
3. Register it as a Windows service, naming it `easytier_service`:
- `nssm.exe install easytier_service D:\Software\Easytier\cli\easytier-core.exe --ipv4 10.144.144.2 --network-name abc --network-secret abc -e tcp://public.easytier.top:11010`
4. Run `services.msc`, locate the `easytier_service` service, enable it, and set it to start with a delay.
5. To remove the service: `nssm.exe remove easytier_service`.
6. Note that after registering as a service, the program (referring to easytier-core.exe) cannot be modified, deleted, or moved. Otherwise, it needs to be removed for re-registration or modifying the Windows registry.
7. For convenient execution of `easytier-cli.exe` to view connection status, you can place it in `C:\Users\Administrator` (Administrator being your Windows username). Simply open cmd or PowerShell and execute, for example: `easytier-cli.exe peer`.
2. Download the command-line version of easytier-core.exe and remember the storage directory, such as `D:\Software\Easytier\cli\easytier-core.exe`.
3. Register it as a Windows service, for example, name it `easytier_service`:
- `nssm.exe install easytier_service D:\Software\Easytier\cli\easytier-core.exe --ipv4 10.144.144.2 --network-name abc --network-secret abc -e tcp://public.easytier.top:11010`
4. Run `services.msc`, find the easytier_service service, enable it and set it to delayed start.
5. To remove the service: `nssm.exe remove easytier_service`
6. Note that after registering as a service, the program (referring to easytier-core.exe) cannot be modified, deleted, or moved. Otherwise, you need to delete and re-register or modify the Windows registry.
7. To conveniently execute `easytier-cli.exe` to check the connection status, you can store it under `C:\Users\Administrator` (Administrator is your Windows username). You can open cmd or PowerShell at will to execute it, such as: `easytier-cli.exe peer`.
-11
View File
@@ -1,11 +0,0 @@
# 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.
```sh
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.
---
+18 -14
View File
@@ -1,45 +1,49 @@
# Network-to-Network
# Network to Network
The network topology of network-to-network is shown in the figure below.
The network topology of network to network is shown in the figure
```mermaid
flowchart LR
subgraph Node A
nodeA[EasyTier\n10.144.144.1]
nodeA[EasyTier</br>10.144.144.1]
end
subgraph Node B
nodeB[EasyTier\n10.144.144.2]
nodeB[EasyTier</br>10.144.144.2]
end
id1[[10.1.1.0/24]]
id2[[192.168.1.0/24]]
id2 <-.Subnet proxy.-> nodeA <--> nodeB <-.Subnet proxy.-> id1
id2 <-.Subnet Proxy.-> nodeA <--> nodeB <-.Subnet Proxy.-> id1
id2 -.No need for EasyTier to access each other's subnet.-> id1
id2 -.No EasyTier needed to access the other subnet.-> id1
```
After the network-to-network configuration is successful, devices in the 192.168.1.0/24 subnet can access devices in the 10.1.1.0/24 subnet for mutual communication without installing EasyTier.
After the network to network configuration is successful, devices in the 192.168.1.0/24 subnet can communicate with devices in the 10.1.1.0/24 subnet without installing EasyTier.
To achieve network-to-network, Node A needs to be the gateway of the 192.168.1.0/24 subnet. The startup and configuration parameters for the two EasyTier nodes are as follows:
## Linux Network to Network Configuration
To achieve network to network, Node A needs to be the gateway for the 192.168.1.0/24 subnet. The startup and configuration parameters for the two EasyTier nodes are as follows:
Node A
```bash
# Start EasyTier and proxy the 192.168.1.0/24 subnet, and use a public server to help network
# Start EasyTier and proxy the 192.168.1.0/24 subnet, using a public server to help network
easytier-core -i 10.144.144.1 -n 192.168.1.0/24 -p tcp://public.easytier.top:11010 --network-name n2n_test
# Allow the gateway to forward traffic and configure the firewall to allow forwarding traffic
# Allow the gateway to forward traffic and configure the firewall to allow traffic forwarding
sysctl -w net.ipv4.ip_forward=1
iptables -A FORWARD -s 192.168.1.0/24 -j ACCEPT
iptables -A FORWARD -d 192.168.1.0/24 -j ACCEPT
```
Node B
```bash
# Start EasyTier and proxy the 10.1.1.0/24 subnet, and use a public server to help network
easytier-core -i 10.144.144.2 -n 10.1.1.0/24 -p tcp://public.easytier.top:11010 --network-name n2n_test $
```
```bash
# Start EasyTier and proxy the 10.1.1.0/24 subnet, using a public server to help network
easytier-core -i 10.144.144.2 -n 10.1.1.0/24 -p tcp://public.easytier.top:11010 --network-name n2n_test
```
@@ -1,25 +0,0 @@
# Networking without Public IP
EasyTier supports networking using shared public nodes. The currently deployed shared public node is
`tcp://public.easytier.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 -p tcp://public.easytier.top:11010
```
Node B executes
```sh
sudo easytier-core --ipv4 10.144.144.2 --network-name abc --network-secret abc -p tcp://public.easytier.top:11010
```
After the command is successfully executed, Node A can access Node B through the virtual IP 10.144.144.2.
`--ipv4 x.x.x.x` can be replaced with `-d` to enable the DHCP function, allowing EasyTier to automatically assign the node's IP address based on other existing virtual IPs within the virtual network.
Nodes can connect to multiple public servers, and even if one public server fails, nodes can still communicate using other active public servers. Simply specify multiple `-p` parameters, such as: `-p tcp://1.1.1.1:11010 -p udp://1.1.1.2:11011`. It is important to note that each node in the virtual network must specify the same list of public servers; otherwise, proper networking may not be achieved.
+3 -3
View File
@@ -1,7 +1,7 @@
# No TUN Mode (No Root Permission Required)
Since creating a TUN device requires ROOT permission, EasyTier also provides a method of use that does not depend on TUN for environments where ROOT permission cannot be obtained. Simply add the `--no-tun` parameter when starting EasyTier.
Since creating a TUN device requires ROOT permissions, EasyTier provides a method that does not rely on TUN for environments where Root permissions cannot be obtained. Simply add the `--no-tun` parameter when starting EasyTier.
When networking in No TUN mode, nodes can be accessed via virtual IPs (supporting TCP, UDP, and ICMP), and can also act as subnet proxies (using the -n parameter). However, they cannot initiate visits to other nodes.
When using the no TUN mode for networking, nodes can be accessed via virtual IP (TCP, UDP, and ICMP are all supported), and can also act as subnet proxies (using the -n parameter). However, they cannot actively initiate access to other nodes.
To actively access other nodes in No TUN mode, you can use EasyTier's [SOCKS5 server functionality](/en/guide/network/socks5).
To actively access other nodes in no TUN mode, you can use EasyTier's [SOCKS5 server feature](/guide/network/socks5).
+28
View File
@@ -0,0 +1,28 @@
# P2P Optimization
If you want EasyTier to establish P2P connections with other nodes more easily, you can optimize it in the following ways.
## IPv6
EasyTier supports P2P communication between nodes via IPv6. By default, EasyTier will randomly listen on an IPv6 UDP port.
In some cases, specifying the listening IPv6 address and port may be more beneficial for P2P communication between nodes.
You can use the `-l` option to configure the IPv6 listener. For example:
```sh
easytier-core -l 'tcp://[::]:12345' -l 'udp://[::]:12345'
```
## Specify Public IP and Port
In some cases, the node has a public IP and port, but EasyTier cannot correctly identify them (e.g., NAT host). You can use the `--mapped_listeners` option to configure the public IP and port. For example:
```sh
easytier-core --mapped_listeners tcp://8.8.8.8:12345 -l tcp://0.0.0.0:11010
```
This EasyTier instance listens on the local 11010 TCP port, and this port is mapped to the public 12345 port. Other nodes will try to connect to the public 12345 port.
## Disable Internet Assistance Tools
Some internet assistance tools may affect the results of STUN tests, causing EasyTier to fail to identify the NAT type or to identify the wrong public IP and port. You can try disabling these tools.
+30 -13
View File
@@ -1,33 +1,33 @@
# 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.
Assume the network topology is as follows, and 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]
nodeA[EasyTier</br>10.144.144.1]
end
subgraph Node B
nodeb[EasyTier\n10.144.144.2]
nodeB[EasyTier</br>10.144.144.2]
end
id1[[10.1.1.0/24]]
nodea <--> nodeb <-.-> id1
nodeA <--> nodeB <-.-> id1
```
Then the startup parameters for Node B's easytier are (new -n parameter)
The startup parameters for node B's easytier are as follows (add the -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.
The subnet proxy information will be automatically synchronized to each node in the virtual network, and each node will automatically configure the corresponding routes. Node A can check if the subnet proxy is effective with the following command.
1. Check whether the routing information has been synchronized, the proxy_cidrs column shows the proxied subnets.
1. Check if the routing information has been synchronized. The proxy_cidrs column shows the proxied subnets.
```sh
easytier-cli route
@@ -37,24 +37,41 @@ Subnet proxy information will automatically sync to each node in the virtual net
| :----------- | :------- | :---------- | :------------ | :---------------- | :----------- | :--- |
| 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
2. Test if node A can access the nodes under the proxied subnet
```sh
ping 10.1.1.2
```
::: warning Note
The -n parameter for subnet proxy can be specified multiple times to proxy multiple subnets; you can also set the mask to 32 to proxy a single IP address.
```sh
easytier-core -n 10.1.1.0/24 -n 10.2.0.0/16 -n 10.3.3.3/32
```
:::
## Manually Specifying Routes
By default, when a node in the virtual network is configured with a subnet proxy, the subnet proxy's segment is synchronized to all nodes within the virtual network, and a route is automatically generated to handle packets destined for these segments via the virtual network.
By default, when a node in the virtual network configures a subnet proxy, the subnet proxy segment will be synchronized to all nodes in the virtual network, and a route will be automatically generated to forward packets destined for these segments to the virtual network.
This simplifies networking in most cases, but in some scenarios, users may not want EasyTier to automatically configure routes on the node. Users can manually configure the traffic that needs to be forwarded to the virtual network using the `--manual-routes` parameter.
This can simplify networking in most cases, but in some scenarios, users may not want EasyTier to automatically configure routes on the nodes. Users can manually configure the traffic to be forwarded to the virtual network using the `--manual-routes` parameter.
After using `--manual-routes`, only the segments configured with this parameter will enter the virtual network. If the list after this parameter is empty, EasyTier will not process any traffic for non-virtual network segments.
When using `--manual-routes`, only the segments configured with this parameter will enter the virtual network. If the list after this parameter is empty, EasyTier will not handle any traffic for non-virtual network segments.
## Firewall
Since proxy traffic requires the use of the system's network stack, the subnet proxy needs to disable the firewall on the virtual network card (this applies to both Linux and Windows).
Since proxy traffic needs to use the system's network stack, the subnet proxy requires the firewall on the virtual network card to be disabled (this applies to both Linux and Windows).
If it is not possible to disable the firewall, you can try using the user-space network stack for the subnet proxy, which can eliminate the need to configure the firewall. Simply add the `--use-smoltcp` parameter when starting EasyTier.
If disabling the firewall is not possible, you can try using a user-space network stack for the subnet proxy, which can avoid the need to configure the firewall. Simply add the `--use-smoltcp` parameter when starting EasyTier.
::: warning Note
The user-space protocol stack will be inferior to the kernel protocol stack in terms of performance, congestion control, etc.
Currently, the `--use-smoltcp` parameter only affects the TCP protocol. UDP and ICMP will use the user-space protocol stack regardless of whether this parameter is used.
:::
---
+2 -2
View File
@@ -1,5 +1,5 @@
# SOCKS5
EasyTier supports the creation of a SOCKS5 server, allowing other programs on the node to access the virtual network and other proxy subnets within the virtual network by setting their proxy to the EasyTier SOCKS5 service.
EasyTier supports creating SOCKS5 servers. Other programs on the node can access the virtual network and other proxy subnets within the virtual network by setting the proxy to EasyTier's SOCKS5 service.
The parameter to start the SOCKS5 service is `--socks5 12333`. By adding this parameter to the easytier-core startup command, the local port 12333 can serve SOCKS5 clients. Currently, the SOCKS5 server does not require username and password authentication and can be used directly.
The parameter to enable the SOCKS5 service is `--socks5 12333`. Adding this parameter to the easytier-core startup command will allow the local 12333 port to serve SOCKS5 clients. Currently, the SOCKS5 server does not require username and password authentication and can be used directly.
-127
View File
@@ -1,127 +0,0 @@
# 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
$ 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
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
```
| 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 |
Use easytier-cli to view routing information in the subnet
```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 |
Use easytier-cli to view local node info.
```sh
easytier-cli node
```
```
┌───────────────┬──────────────────────┐
│ Virtual IP │ 10.144.144.1 │
├───────────────┼──────────────────────┤
│ Hostname │ archlinux-base │
├───────────────┼──────────────────────┤
│ Proxy CIDRs │ 10.147.223.0/24 │
├───────────────┼──────────────────────┤
│ Peer ID │ 2616333191 │
├───────────────┼──────────────────────┤
│ Public IP │ 75.52.125.26 │
├───────────────┼──────────────────────┤
│ UDP Stun Type │ FullCone │
├───────────────┼──────────────────────┤
│ Listener 1 │ tcp://0.0.0.0:11010 │
├───────────────┼──────────────────────┤
│ Listener 2 │ udp://0.0.0.0:11010 │
├───────────────┼──────────────────────┤
│ Listener 3 │ wg://0.0.0.0:11011 │
├───────────────┼──────────────────────┤
│ Listener 4 │ ws://0.0.0.0:11011/ │
├───────────────┼──────────────────────┤
│ Listener 5 │ wss://0.0.0.0:11012/ │
├───────────────┼──────────────────────┤
│ Listener 6 │ udp://[::]:37039 │
└───────────────┴──────────────────────┘
```
---
@@ -1,13 +1,13 @@
# Use EasyTier with WireGuard Client
# Connect Using 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), this method can be used to connect to the EasyTier network.
EasyTier can be used as a WireGuard server, allowing any device with a WireGuard client installed to access the EasyTier network. For platforms currently not supported by EasyTier (such as iOS), this method can be used to connect to the EasyTier network.
Assuming the network topology is as follows:
Assume the network topology is as follows:
```mermaid
flowchart LR
ios[[iPhone \n WireGuard Installed]]
ios[[iPhone \n with WireGuard installed]]
subgraph Node A IP 22.1.1.1
nodea[EasyTier\n10.144.144.1]
@@ -22,16 +22,16 @@ 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:
We need the iPhone to access the EasyTier network through Node A, and the configuration can be as follows:
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.
In the easytier-core command on Node A, add the --vpn-portal parameter to specify the port WireGuard 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
# The following parameters mean: listen on port 11013 on 0.0.0.0, WireGuard uses the 10.14.14.0/24 subnet
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.
After easytier-core starts successfully, use easytier-cli to get the WireGuard Client configuration.
```sh
$> easytier-cli vpn-portal
@@ -52,4 +52,6 @@ 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.
Before using the Client Config, you need to modify the Interface Address and Peer Endpoint to the client's IP and the EasyTier node's IP, respectively. Import the configuration file into the WireGuard client to access the EasyTier network.
---
+38
View File
@@ -0,0 +1,38 @@
# Using the Web Console
EasyTier supports using the [Web Console](https://easytier.cn/web#/) to manage EasyTier nodes, including viewing node status, configuring node parameters, viewing node logs, and more.
## Register an Account
To use the Web Console for the first time, you need to register an account. [Registration link](https://easytier.cn/web#/auth/register).
## Running EasyTier Node
If you want the EasyTier node to be managed by the Web Console, you need to specify the `--config-server` or `-w` parameter when starting, for example:
```sh
./easytier-core -w <your username>
```
> Please replace `<your username>` with the username you registered on the Web Console.
If the terminal shows messages like "Connection successful" or "Connected to server", it means Easytier Core has successfully connected to the Web Console server.
::: danger Note
Only one EasyTier process on a machine can be managed by the Web Console. Having multiple processes may cause unexpected issues.
:::
## Using the Web Console
Log in to the [Web Console](https://easytier.cn/web#/) using the username and password you just registered. After logging in successfully, you will see the node list.
Select the device you need to configure on the webpage.
![alt text](/assets/web-homepage.png)
After opening the device, click the green connect button.
![alt text](/assets/web-device-list.png)
![alt text](/assets/web-device-config.png)
The subsequent configuration steps are the same as configuring a program with a GUI.
+3 -3
View File
@@ -1,7 +1,7 @@
# Networking
::: warning 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.
::: warning Note
The following only describes the use of command-line tools. For graphical interface programs, you can refer to the concepts below for configuration, or refer to [Graphical Interface GUI Networking](/guide/gui/index).
:::
Make sure EasyTier is installed according to the [Installation Guide](/en/guide/installation), and both easytier-core and easytier-cli commands are available.
Make sure you have installed EasyTier according to the [Installation Guide](/guide/installation), and that both the easytier-core and easytier-cli commands are available.
+149
View File
@@ -0,0 +1,149 @@
# Performance Testing
Software and versions involved in the test (to avoid bias and for fair treatment, use "X" as a placeholder):
| Software | Version | Link |
| ----------------- | ----------------- | ------------------------------------ |
| EasyTier | 1.2.1 | https://github.com/EasyTier/EasyTier |
| Networking Tool A | July 2024 Version | |
To be tested:
- WireGuard
- TailScale
- ZeroTier
## X86
| | |
| ------------- | -------------------------------------------- |
| Machine Model | Alibaba Cloud ecs.ic5.2xlarge |
| vCPU | 8 vCPU |
| RAM | 8G |
| CPU Model | Intel(R) Xeon(R) Platinum 8163 CPU @ 2.50GHz |
| OS | Ubuntu 22.04 64-bit |
## Test Results
| Software | Test Item | Performance ( No -R / With -R ) Gbit/s |
| :---------------: | :---------------: | :------------------------------------: |
| LoopBack Device | | 28.3 / 28.3 |
| EasyTier | UDP No Encryption | 1.43 / 1.46 |
| EasyTier | UDP AES-128-GCM | 1.36 / 1.37 |
| EasyTier | TCP No Encryption | 1.31 / 1.41 |
| EasyTier | TCP AES-128-GCM | 1.42 / 1.41 |
| | | |
| Networking Tool A | UDP No Encryption | 1.10 / 1.11 |
| Networking Tool A | UDP AES-128-GCM | 0.93 / 0.98 |
## Reproduction Method
### Basic Preparation
The test is based on Linux network namespace functionality and can be performed using Ubuntu virtual machines, physical machines, Docker containers, etc.
Initialization commands (execute with root privileges)
```bash
apt update
apt install iperf3 iptables -y
ip netns add red
ip netns add green
ip link add br0 type bridge
ip link set br0 up
ip addr add 192.168.0.1/16 dev br0
ip link add vethcab0 type veth peer name red0
ip link set vethcab0 master br0
ip link set red0 netns red
ip netns exec red ip link set lo up
ip netns exec red ip link set red0 up
ip netns exec red ip addr add 192.168.0.2/16 dev red0
ip netns exec red ip route add default via 192.168.0.1
ip link set vethcab0 up
ip link add vethcab1 type veth peer name green0
ip link set vethcab1 master br0
ip link set green0 netns green
ip netns exec green ip link set lo up
ip netns exec green ip link set green0 up
ip netns exec green ip addr add 192.168.0.3/16 dev green0
ip netns exec green ip route add default via 192.168.0.1
ip link set vethcab1 up
sysctl net.ipv4.ip_forward=1
sysctl net.bridge.bridge-nf-call-iptables=0
sysctl net.bridge.bridge-nf-call-ip6tables=0
sysctl net.ipv6.conf.lo.disable_ipv6=0
# Note: EasyTier does not rely on public network services, so iptables forwarding can be omitted
iptables -t nat -A POSTROUTING -j MASQUERADE
iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE
iptables -A FORWARD -i eht0 -j ACCEPT
iptables --policy FORWARD ACCEPT
nohup ip netns exec red iperf3 -s &
```
Additionally, ensure that the programs to be tested are in the PATH environment variable.
The following iperf3 command does not include -R; in actual tests, data with -R will be measured.
### LoopBack
```bash
ip netns exec green iperf3 -c 192.168.0.2
```
### EasyTier
#### UDP No Encryption:
```bash
ip netns exec red easytier-core -i 10.126.126.2 --multi-thread -u
ip netns exec green easytier-core -i 10.126.126.3 -p udp://192.168.0.2:11010 --multi-thread -u
ip netns exec green iperf3 -c 10.126.126.2
```
#### UDP Encryption:
```bash
ip netns exec red easytier-core -i 10.126.126.2 --multi-thread
ip netns exec green easytier-core -i 10.126.126.3 -p udp://192.168.0.2:11010 --multi-thread
ip netns exec green iperf3 -c 10.126.126.2
```
#### TCP No Encryption
```bash
ip netns exec red easytier-core -i 10.126.126.2 --multi-thread -u
ip netns exec green easytier-core -i 10.126.126.3 -p tcp://192.168.0.2:11010 --multi-thread -u
ip netns exec green iperf3 -c 10.126.126.2
```
#### TCP Encryption
```bash
ip netns exec red easytier-core -i 10.126.126.2 --multi-thread
ip netns exec green easytier-core -i 10.126.126.3 -p tcp://192.168.0.2:11010 --multi-thread
ip netns exec green iperf3 -c 10.126.126.2
```
### Networking Tool A
#### UDP No Encryption
```bash
ip netns exec red xxx -k iperf -s 8.134.146.7:29872 --ip 10.26.0.2
ip netns exec green xxx -k iperf -s 8.134.146.7:29872 --ip 10.26.0.3
ip netns exec green iperf3 -c 10.26.0.2
```
#### UDP Encryption
```bash
ip netns exec red xxx -k iperf -s 8.134.146.7:29872 -w 1234 --ip 10.26.0.2
ip netns exec green xxx -k iperf -s 8.134.146.7:29872 -w 1234 --ip 10.26.0.3
ip netns exec green iperf3 -c 10.26.0.2
```
+6 -4
View File
@@ -1,6 +1,8 @@
# Roadmap
- [ ] Improve documentation and user guides.
- [ ] Support features such as encryption, TCP hole punching,etc.
- [ ] Support IOS.
- [ ] Support Web configuration management.
- [ ] Support for optimizing P2P transmission using KCP / FEC.
- [ ] Support for UPnP.
- [ ] Support for IOS.
- [ ] Support for TCP hole punching.
- [x] Support for Web configuration management.
- [x] Improve documentation and user guides.