Skip to content

Commit 2dd190c

Browse files
Tangent-90CCopilot
andauthored
添加自建 Web 控制台的文档 (#217)
* 添加自建 Web 控制台的文档 Added instructions for self-hosting EasyTier Web Console, including service architecture and common parameters. * 添加注意事项 Add warning about default admin account in web console * Update web console documentation for default accounts * Document self-hosted web console configuration Added documentation for self-hosted web console setup and usage. * Add files via upload * Update images in web-console documentation * Update image syntax and correct username placeholder * Update guide/network/web-console.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update guide/network/web-console.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent d548b06 commit 2dd190c

4 files changed

Lines changed: 133 additions & 0 deletions

File tree

assets/web-api-host-config.png

34.6 KB
Loading

assets/web-no-captcha.png

48.9 KB
Loading

en/guide/network/web-console.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,69 @@ Configure
5656
![alt text](/assets/web-device-run-network.png)
5757

5858
The subsequent configuration steps are the same as configuring a program with a GUI.
59+
60+
61+
# Self-Hosted Web Console
62+
63+
EasyTier supports self-hosting a web console for managing EasyTier nodes. The EasyTier Web Console adopts a separated front-end and back-end architecture, consisting of 3 services in design:
64+
65+
1. Web Frontend (default port 11211)
66+
2. Web API Backend (default port 11211)
67+
3. Configuration Delivery Service (default port 22020, UDP protocol)
68+
69+
The web frontend and web API backend are bound to the same port by default, and the configuration delivery service is part of the web API backend.
70+
71+
EasyTier's web console has 2 versions:
72+
- `easytier-web` (web API backend only)
73+
- `easytier-web-embed` (web frontend + web API backend)
74+
75+
Below is an example of deploying both front-end and back-end using `easytier-web-embed`:
76+
77+
```sh
78+
./easytier-web-embed \
79+
--api-server-port 11211 \
80+
--api-host "http://127.0.0.1:11211" \
81+
--config-server-port 22020 \
82+
--config-server-protocol udp
83+
```
84+
85+
If no content is displayed after running, the deployment is successful.
86+
87+
Here are the descriptions of common parameters for `easytier-web-embed`:
88+
- `--api-server-port`: Port for the web front-end and back-end
89+
- `--api-host`: Specify the access address of the web API backend in the web frontend. Without this setting, you can only manually specify the API backend address in the web frontend.
90+
- `--config-server-port`: Port of the configuration delivery service for easytier-core connection
91+
- `--config-server-protocol`: Protocol of the configuration delivery service for easytier-core connection (tested to support tcp, udp, ws)
92+
- `--web-server-port`: Additional port for listening to the web frontend (note: this setting is not affected by --no-web)
93+
- `--no-web`: Do not run the web frontend (disable the front-end function on the --api-server-port)
94+
95+
After that, open the web console at `http://127.0.0.1:11211` to see the page.
96+
97+
![alt text](/assets/web-api-host-config.png)
98+
99+
Click `Register` to create an account. If the verification code fails to load, your `--api-host` setting is incorrect.
100+
101+
![alt text](/assets/web-no-captcha.png)
102+
103+
::: tip Note
104+
105+
You can use the official EasyTier frontend `https://easytier.cn/web` to access your self-hosted Web API backend without needing to self-host the frontend.
106+
107+
:::
108+
109+
## Connecting to the Self-Hosted Web Console
110+
111+
Previously, we set up the web console locally with the configuration delivery port 22020 and UDP protocol. The command for EasyTier to connect to the self-hosted console is:
112+
113+
```sh
114+
./easytier-core -w udp://127.0.0.1:22020/<your_username_on_the_self-hosted_web_console>
115+
```
116+
117+
Subsequent usage is the same as the official console.
118+
119+
::: tip Attention
120+
121+
The web console has two default accounts. The usernames and passwords are `admin` and `user` respectively. Although these are regular accounts, their existence should still be noted.
122+
123+
:::
124+

guide/network/web-console.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,70 @@ sudo ./easytier-core -w <你的用户名> --machine-id abc123
5656
![alt text](/assets/web-device-run-network.png)
5757

5858
接下来的配置步骤与之前配置带 GUI 的程序相同。
59+
60+
61+
# 自建 Web 控制台
62+
63+
EasyTier 支持自建 Web 控制台来管理 EasyTier 节点,EasyTier Web 控制台采用前后端分离的架构,在设计上共有3个服务
64+
65+
1. Web 前端(默认11211端口)
66+
2. Web API 后端(默认11211端口)
67+
3. 配置下发端(默认22020端口,UDP协议)
68+
69+
其中,web前端与web api后端默认绑定在同一端口,配置下发端则是web api后端的一部分。
70+
71+
EasyTier的web控制台有2个版本
72+
- `easytier-web`(仅web api后端)
73+
- `easytier-web-embed`(web前端 + web api后端)
74+
75+
下面举一个用`easytier-web-embed`前后端同时部署的例子
76+
77+
```sh
78+
./easytier-web-embed \
79+
--api-server-port 11211 \
80+
--api-host "http://127.0.0.1:11211" \
81+
--config-server-port 22020 \
82+
--config-server-protocol udp
83+
```
84+
85+
运行后若无任何内容显示则成功。
86+
87+
下面是`easytier-web-embed`常用参数的说明:
88+
- `--api-server-port`: web前后端的端口
89+
- `--api-host`: 在web前端指定web api后端的访问地址(不设你就只能在web前端手动指定api后端地址)
90+
- `--config-server-port`: 用于easytier-core连接的配置下发端的端口
91+
- `--config-server-protocol`: 用于easytier-core连接的配置下发端的协议(实测支持 tcp, udp, ws)
92+
- `--web-server-port`: 额外监听web前端的端口(注:此设置不受 --no-web 影响)
93+
- `--no-web`: 不运行web前端(关闭 --api-server-port 端口的前端功能)
94+
95+
之后打开 Web 控制台 `http://127.0.0.1:11211`就可以看到这个页面。
96+
97+
![alt text](/assets/web-api-host-config.png)
98+
99+
点击`Register`注册一个账户,若刷新不出验证码则说明你`--api-host`设置有误。
100+
101+
![alt text](/assets/web-no-captcha.png)
102+
103+
::: tip 提示
104+
105+
你可以用EasyTier官方前端`https://easytier.cn/web`访问你的Web API后端,无需自建前端。
106+
107+
:::
108+
109+
110+
111+
## 接入自建 Web 控制台
112+
113+
前面我们本地搭建好了web控制台,并且配置下发端口为22020,协议UDP,那么easytier接入自建控制台的指令就是
114+
115+
```sh
116+
./easytier-core -w udp://127.0.0.1:22020/<你在自建web控制台上的用户名>
117+
```
118+
119+
接下来的用法就和官方控制台一样了。
120+
121+
::: tip 注意
122+
123+
Web 控制台有了两个默认账户,用户名与密码分别为`admin``user`。虽然这属于普通账户,但仍需留意其存在。
124+
125+
:::

0 commit comments

Comments
 (0)