SukkaW / Koolshare-Clash

:cat: Run Clash Tunnel on Koolshare OpenWrt
https://koolclash.js.org
GNU General Public License v3.0
1.33k stars 240 forks source link

KoolClash Feature 征集 #71

Open SukkaW opened 4 years ago

SukkaW commented 4 years ago

KoolClash 即将开始进行重构。如果你有什么在 UI 或功能、特性上的需求,可以在这里提出来供我参考。

目前计划中的功能有:

image

KoolClash 不会提供全局 DNS 劫持功能,以回避 DNS 回环解析

目前 暂不 考虑 的功能:

ChengduKarthago commented 4 years ago

1, 定时自动更新ss订阅链接(如96小时,24小时等),并自动重启Clash

ChengduKarthago commented 4 years ago

2,选择特定白名单设备,或黑名单设备,这样可以让部分设备翻,部分设备不翻

tony27786 commented 4 years ago

希望加入 GFWlist 规则支持

SukkaW commented 4 years ago

@tony27786 KoolClash 永远 不会加入 GFWlist 规则支持。建议自行将 GFWList 转换为 Clash 配置文件。

ntgeralt commented 4 years ago

建议放一份标准的yml文件标准在说明里。想找个rixCloud 和 DlerCloud clash订阅例子参考下,找了N久找不到。你写那么多字,不如直接放个例程,标注下vmess节点需要改成自己的,供使用者参考。

hiboyhiboy commented 4 years ago

订阅使用api热重载配置 启动时保持上一次的节点选择的功能


reload_yml () {
[ "$app_120" == "2" ] && return
[ -z "`pidof clash`" ] && return

if [ "$1" == "check" ] ; then
curltest=`which curl`
if [ -z "$curltest" ] || [ ! -s "`which curl`" ] ; then
    logger -t "【clash】" "找不到 curl ,需要手动安装 opt 后输入[opkg update; opkg install curl]安装"
    eturn 1
fi
if [[ "$(jq -h 2>&1 | wc -l)" -lt 2 ]] ; then
jq_check
if [[ "$(jq -h 2>&1 | wc -l)" -lt 2 ]] ; then
    logger -t "【clash】" "错误!找不到 jq 程序"
    return 1
fi
fi
mkdir -p /etc/storage/clash
secret="$(yq r /opt/app/clash/config/config.yaml secret)"
#secret="$clash_secret"
fi
if [ "$1" == "save" ] ; then
logger -t "【clash】" "保存web节点选择"
curl -H "Authorization: Bearer $secret" 'http://127.0.0.1:9090/proxies' | jq --raw-output '(.proxies[]|select(.type=="Selector")).name' > /tmp/Selector_name.txt
[ -s /tmp/Selector_name.txt ] && cp -f /tmp/Selector_name.txt /etc/storage/clash/Selector_name.txt
curl -H "Authorization: Bearer $secret" 'http://127.0.0.1:9090/proxies' | jq --raw-output '(.proxies[]|select(.type=="Selector")).now' > /tmp/Selector_now.txt
[ -s /tmp/Selector_now.txt ] && cp -f /tmp/Selector_now.txt /etc/storage/clash/Selector_now.txt
rm -f /tmp/Selector_name.txt /tmp/Selector_now.txt
fi
if [ "$1" == "set" ] ; then
logger -t "【clash】" "恢复web节点选择"
[ -s /etc/storage/clash/Selector_name.txt ] && [ -s /etc/storage/clash/Selector_now.txt ] && eval "$(awk 'NR==FNR{a[NR]=$0}NR>FNR{print "curl -X PUT -w \"\%\{http_code\}\" -H \"Authorization: Bearer '$secret'\" -H \"Content-Type: application\/json\" -d \047\{\"name\": \""$0"\"\}\047  \047http://127.0.0.1:9090/proxies/"a[FNR]"\047"}' /etc/storage/clash/Selector_name.txt /etc/storage/clash/Selector_now.txt)"
fi
if [ "$1" == "reload" ] ; then
logger -t "【clash】" "api热重载配置"
curl -X PUT -w "%{http_code}" -H "Authorization: Bearer $secret" -H "Content-Type: application/json" -d '{"path": "/opt/app/clash/config/config.yaml"}' 'http://127.0.0.1:9090/configs?force=true'
fi

}
SukkaW commented 4 years ago

@hiboyhiboy

启动时保持上一次的节点选择的功能

这个 Feature 也有很多人给 Clash 提过了,我也和 Dreamacro 交流过,目前情况是要等 Clash 内部的 Event 管理做出来,Clash 的计划是在 config 目录下写一个状态保存文件。

这个功能还是让 Clash 上游去实现比较合适,这样本地不需要轮询,也可以适配现有所有的 Clash Web 面板。面板如果有现成的了就没必要再去造轮子了。

订阅使用 api 热重载配置

这一块逻辑我还在想怎么做,打算参考 Clash for Windows,毕竟未来有计划做多配置文件,肯定是要用 API 重载的。

teel-writ-ros commented 4 years ago

Dashboard 换成 http://yacd.haishan.me/#/, https://github.com/haishanh/yacd

SukkaW commented 4 years ago

Dashboard 换成 http://yacd.haishan.me/#/, https://github.com/haishanh/yacd

移动端适配不佳、非 Dreamacro 维护,不予内置,建议自行 Host。

z44499783 commented 4 years ago

有规范性_config.yaml文件参考嘛我编写的外部控制部分链接不上

chacha20 commented 4 years ago

我希望能把Trojan集成进去,虽然Clash不支持trojan,但可以用Socks方式兼容进去

teel-writ-ros commented 4 years ago

我希望能把Trojan集成进去,虽然Clash不支持trojan,但可以用Socks方式兼容进去

已经兼容了 @chacha20

SukkaW commented 4 years ago

Clash 0.19 已经提供了对 UDP TPROXY 的支持,所以可以没有必要等 TUN 了、可以直接做 UDP 转发支持。

rapiz1 commented 4 years ago

支持配置和上传 external-ui:

SukkaW commented 4 years ago

@Rapiz1

可以考虑和 OpenClash 一样内置多个版本的面板,不过不一定提供上传。

rapiz1 commented 4 years ago

https://github.com/SukkaW/Koolshare-Clash/issues/70 提供用户自定义api token的接口来解决这个问题 希望集成 https://dev.maxmind.com/geoip/geoipupdate/ maxmind的自动化更新工具

huozhong-in commented 3 years ago

我希望能把Trojan集成进去,虽然Clash不支持trojan,但可以用Socks方式兼容进去

我也希望把trojan的支持加进去,trojan对UDP支持好