EasyTier 异地组网

文档

配置文件示例

生成配置文件方式:在桌面版 UI 中配置完成后,复制到 Linux 中

/etc/easytier-core/config.toml

instance_name = "pi"
hostname = "pi"
instance_id = "pi"
ipv4 = "10.25.25.22/24"
dhcp = false
listeners = [
    "tcp://0.0.0.0:11010",
    "udp://0.0.0.0:11010",
    "wg://0.0.0.0:11011",
]
rpc_portal = "0.0.0.0:0"

[network_identity]
network_name = "wangluo"
network_secret = "mima"

[[peer]]
uri = "tcp://IP:端口"

[flags]

服务

/usr/lib/systemd/system/easytier-core.service

[Unit]
After=syslog.target

[Service]
ExecStart=/root/.cargo/bin/easytier-core -c /etc/easytier-core/config.toml
Restart=always
RestartSec=1

[Install]
WantedBy=multi-user.target

树莓派

问题

  • 树莓派 RaspberryPi Debian bookworm 无法直接运行 官网下载页面 构建的二进制文件

    1. 可以运行 easytier-cli
    2. 无法运行 easytier-core
    xuxiaowei@raspberrypi:/srv$ ./easytier-linux-aarch64/easytier-cli -V
    easytier-cli 2.4.5-4c4d172e
    xuxiaowei@raspberrypi:/srv$ ./easytier-linux-aarch64/easytier-core -V
    <jemalloc>: Unsupported system page size
    <jemalloc>: Unsupported system page size
    memory allocation of 16 bytes failed
    Aborted
    xuxiaowei@raspberrypi:/srv$
    

源码编译安装

使用 GitHub 安装

sudo apt update
sudo curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
. "$HOME/.cargo/env"
cargo -V
sudo apt install -y llvm protobuf-compiler clang
cargo install --git https://github.com/EasyTier/EasyTier.git easytier

$HOME/.cargo/bin/easytier-cli -V
$HOME/.cargo/bin/easytier-core -V

使用 gh-proxy.org 安装

sudo apt update
sudo curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
. "$HOME/.cargo/env"
cargo -V
sudo apt install -y llvm protobuf-compiler clang
cargo install --git https://gh-proxy.org/https://github.com/EasyTier/EasyTier.git easytier

$HOME/.cargo/bin/easytier-cli -V
$HOME/.cargo/bin/easytier-core -V