fix: shellclash username not found

This commit is contained in:
SunBK201 2024-02-27 14:35:10 +08:00
parent 17f8a448b7
commit 5dff079f51
6 changed files with 12 additions and 5 deletions

View File

@ -67,9 +67,11 @@ reload_config
sudo -u nobody /root/ua3f
```
shellclash 用户建议使用以下命令启动:
shellclash/shellcrash 用户建议使用以下命令启动:
```sh
sudo -u shellclash /root/ua3f
# 如果上面命令报错执行下面该命令
sudo -u shellcrash /root/ua3f
```
### Clash 的配置建议

View File

@ -1,7 +1,7 @@
#!/bin/sh
project_name="ua3f"
release_version="0.2.2"
release_version="0.2.3"
target=cmd/ua3f.go
release_dir=./bin

View File

@ -17,7 +17,7 @@ import (
"github.com/sirupsen/logrus"
)
var version = "0.2.2"
var version = "0.2.3"
var payloadByte []byte
var cache *expirable.LRU[string, string]
var HTTP_METHOD = []string{"GET", "POST", "HEAD", "PUT", "DELETE", "OPTIONS", "TRACE", "CONNECT"}

View File

@ -20,12 +20,15 @@ ckcmd() {
cd /root
getcpucore
version=0.2.2
version=0.2.3
ua3f_tar=ua3f-$version-$cpucore.tar.gz
if id -u shellclash >/dev/null 2>&1; then
chmod o+w /etc/clash >/dev/null 2>&1
fi
if id -u shellcrash >/dev/null 2>&1; then
chmod o+w /etc/clash >/dev/null 2>&1
fi
if [ -f "ua3f" ]; then
rm "ua3f"

View File

@ -3,7 +3,7 @@ local uci = require("luci.model.uci").cursor()
ua3f = Map("ua3f",
"UA3F",
[[
<a href="https://github.com/SunBK201/UA3F" target="_blank">Version: 0.2.2</a>
<a href="https://github.com/SunBK201/UA3F" target="_blank">Version: 0.2.3</a>
<br>
Across the Campus we can reach every corner in the world.
]]

View File

@ -40,6 +40,8 @@ start_service() {
if id -u shellclash >/dev/null 2>&1; then
procd_set_param user shellclash
elif id -u shellcrash >/dev/null 2>&1; then
procd_set_param user shellcrash
elif id -u nobody >/dev/null 2>&1; then
procd_set_param user nobody
fi