-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
123 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
hide: | ||
# - navigation | ||
- toc | ||
--- | ||
|
||
# 常见问题 | ||
|
||
### alpha 和 meta 分支的区别 | ||
|
||
alpha 分支为最新提交分支,meta 分支每隔一段时间合并 alpha 分支的代码,meta 分支不一定比 alpha 分支更稳定。 | ||
|
||
### 我应该下载哪一个文件? | ||
|
||
release 中,包的文件名中包含了多个信息,包括 | ||
|
||
- 程序名称(clash.meta) | ||
- 操作系统(如 android、darwin、freebsd、linux、windows 等) | ||
- 架构(如 386、amd64、arm32v7、arm64 等) | ||
- 编译方式 | ||
> - `默认(无额外标识)`: 使用 GOAMD64=v3 标签编译的默认版本。👉[在此了解](https://github.com/golang/go/wiki/MinimumRequirements#amd64)更多关于 GOAMD64 标签的信息。 | ||
> - `cgo`: 使用 GOAMD64=v1 标签进行编译。该版本具有与默认版本不同的功能和特性,包括支持 lwip tun 堆栈。 | ||
> - `compatible`: 使用 GOAMD64=v1 标签进行编译。该版本是为了兼容特定的操作系统或架构而编译的。 | ||
- 分支(alpha) | ||
- 提交的 git hash 值(如 f90066f) | ||
|
||
可以根据这些信息或使用 `uname -m` 检查设备的 CPU 架构, 并在发布页面中找到相应的版本的可执行文件。 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
--- | ||
hide: | ||
# - navigation | ||
- toc | ||
--- | ||
|
||
# Clash 服务运行 | ||
|
||
## 使用 systemd | ||
|
||
- 创建名为 `clash-meta` 的用户 | ||
|
||
- 下载二进制可执行文件 [releases](https://github.com/MetaCubeX/Clash.Meta/releases) | ||
|
||
- 将下载的二进制可执行文件重名名为 `Clash-Meta` 并移动到 `/usr/local/bin/` | ||
|
||
- 以守护进程的方式,由用户 `clash-meta` 运行 Clash-Meta。 | ||
|
||
使用以下命令将 Clash 二进制文件复制到 /usr/local/bin, 配置文件复制到 /etc/clash: | ||
|
||
```shell | ||
cp Clash-Meta /usr/local/bin | ||
cp config.yaml /etc/Clash-Meta | ||
``` | ||
|
||
创建 systemd 配置文件 `/etc/systemd/system/Clash-Meta.service`: | ||
|
||
```ini | ||
[Unit] | ||
Description=Clash-Meta Daemon, Another Clash Kernel. | ||
After=network.target NetworkManager.service systemd-networkd.service iwd.service | ||
|
||
[Service] | ||
Type=simple | ||
User=clash-meta | ||
Group=clash-meta | ||
LimitNPROC=500 | ||
LimitNOFILE=1000000 | ||
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_RAW CAP_NET_BIND_SERVICE | ||
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_RAW CAP_NET_BIND_SERVICE | ||
Restart=always | ||
ExecStartPre=/usr/bin/sleep 1s | ||
ExecStart=/usr/local/bin/Clash-Meta -d /etc/Clash-Meta | ||
ExecReload=/bin/kill -HUP $MAINPID | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
``` | ||
|
||
使用以下命令重新加载 systemd: | ||
|
||
```shell | ||
systemctl daemon-reload | ||
``` | ||
|
||
启用 clash-meta 服务: | ||
|
||
```shell | ||
systemctl enable Clash-Meta | ||
``` | ||
|
||
使用以下命令立即启动 Clash: | ||
|
||
```shell | ||
systemctl start Clash-Meta | ||
``` | ||
|
||
使用以下命令使 Clash-Meta 重新加载: | ||
|
||
```shell | ||
systemctl reload Clash-Meta | ||
``` | ||
|
||
使用以下命令检查 Clash 的运行状况和日志: | ||
|
||
```shell | ||
systemctl status clash | ||
journalctl -xe | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
mkdocs-git-revision-date-localized-plugin==1.2.0 | ||
mkdocs-material | ||
mkdocs-git-revision-date-localized-plugin==1.2.0 |