luci-app-openclash: bump to v0.36.3-beta
This commit is contained in:
parent
0eda3dde2c
commit
07f168e0e7
@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=luci-app-openclash
|
||||
PKG_VERSION:=0.36.2
|
||||
PKG_VERSION:=0.36.3
|
||||
PKG_RELEASE:=beta
|
||||
PKG_MAINTAINER:=vernesong <https://github.com/vernesong/OpenClash>
|
||||
|
||||
|
||||
@ -626,6 +626,10 @@ if [ "$enable" -eq 1 ] && [ -f "$CONFIG_FILE" ]; then
|
||||
en_mode_tun="1"
|
||||
en_mode="fake-ip"
|
||||
fi
|
||||
if [ "$en_mode" = "redir-host-tun" ]; then
|
||||
en_mode_tun="1"
|
||||
en_mode="redir-host"
|
||||
fi
|
||||
if [ "$en_mode" = "redir-host-vpn" ]; then
|
||||
en_mode_tun="2"
|
||||
en_mode="redir-host"
|
||||
@ -716,13 +720,8 @@ mkdir -p /var/etc
|
||||
cat > "/var/etc/openclash.include" <<-EOF
|
||||
/etc/init.d/openclash restart
|
||||
EOF
|
||||
if [ "$en_mode_tun" != "2" ]; then
|
||||
if [ -z "$en_mode_tun" ]; then
|
||||
iptables -t nat -N openclash
|
||||
|
||||
if [ "$en_mode_tun" = "1" ]; then
|
||||
iptables -t nat -A openclash -d 198.18.0.0/16 -j RETURN
|
||||
fi
|
||||
|
||||
iptables -t nat -A openclash -d 0.0.0.0/8 -j RETURN
|
||||
iptables -t nat -A openclash -d 10.0.0.0/8 -j RETURN
|
||||
iptables -t nat -A openclash -d 127.0.0.0/8 -j RETURN
|
||||
@ -736,10 +735,8 @@ EOF
|
||||
fi
|
||||
iptables -t nat -A openclash -p tcp -j REDIRECT --to-ports "$proxy_port"
|
||||
iptables -t nat -A PREROUTING -p tcp -j openclash
|
||||
iptables -t nat -A OUTPUT -p tcp -d 198.18.0.0/16 -j REDIRECT --to-ports "$proxy_port"
|
||||
|
||||
if [ "$en_mode_tun" != 1 ]; then
|
||||
iptables -t nat -A OUTPUT -p tcp -d 198.18.0.0/16 -j REDIRECT --to-ports "$proxy_port"
|
||||
fi
|
||||
|
||||
if [ "$ipv6_enable" -eq 1 ]; then
|
||||
ip6tables -t nat -N openclash
|
||||
@ -747,7 +744,7 @@ EOF
|
||||
ip6tables -t nat -A PREROUTING -p tcp -j openclash
|
||||
fi
|
||||
else
|
||||
#TUN2模式
|
||||
#TUN模式
|
||||
ipset create localnetwork hash:net
|
||||
ipset add localnetwork 127.0.0.0/8
|
||||
ipset add localnetwork 10.0.0.0/8
|
||||
@ -757,9 +754,13 @@ EOF
|
||||
ipset add localnetwork 240.0.0.0/4
|
||||
ipset add localnetwork 172.16.0.0/12
|
||||
#启动TUN
|
||||
if [ "$en_mode_tun" = "2" ]; then
|
||||
ip tuntap add user root mode tun clash0
|
||||
ip link set clash0 up
|
||||
ip route replace default dev clash0 table "$PROXY_ROUTE_TABLE"
|
||||
elif [ "$en_mode_tun" = "1" ]; then
|
||||
ip route replace default dev utun table "$PROXY_ROUTE_TABLE"
|
||||
fi
|
||||
ip rule add fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE"
|
||||
#设置防火墙
|
||||
iptables -t mangle -N openclash
|
||||
@ -887,6 +888,7 @@ stop()
|
||||
ip link set dev clash0 down >/dev/null 2>&1
|
||||
ip tuntap del clash0 mode tun >/dev/null 2>&1
|
||||
ip route del default dev clash0 table "$PROXY_ROUTE_TABLE" >/dev/null 2>&1
|
||||
ip route del default dev utun table "$PROXY_ROUTE_TABLE" >/dev/null 2>&1
|
||||
ip rule del fwmark "$PROXY_FWMARK" table "$PROXY_ROUTE_TABLE" >/dev/null 2>&1
|
||||
|
||||
iptables -t mangle -D OUTPUT -j openclash >/dev/null 2>&1
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -11,7 +11,14 @@ local uci = require "luci.model.uci".cursor()
|
||||
|
||||
m = Map(openclash, translate("Game Rules and Groups"))
|
||||
m.pageaction = false
|
||||
m.description=translate("注意事项:<br/>游戏模式为测试功能,不保证可用性。使用的内核由comzyh修改<br/>项目地址:https://github.com/comzyh/clash <br/>使用步骤:<br/>1、在《服务器与策略组管理》页面创建您准备使用的游戏策略组和游戏节点(节点添加时必须选择要加入的策略组),策略组类型建议:FallBack,游戏节点必须支持UDP<br/>2、在此页面的游戏规则列表下载您要使用的游戏规则<br/>3、在此页面上方设置您已下载的游戏规则的对应策略组并保存设置<br/>4、替换内核,下载地址:(https://github.com/vernesong/OpenClash/releases/tag/TUN)<br/>5、在《全局设置》-《常规设置》-《运行模式》中选择游戏模式并启动")
|
||||
m.description=translate("注意事项:<br/>游戏代理为测试功能,不保证可用性。其中游戏模式使用的内核由comzyh修改 \
|
||||
<br/>项目地址:https://github.com/comzyh/clash <br/>使用步骤: \
|
||||
<br/>1、在《服务器与策略组管理》页面创建您准备使用的游戏策略组和游戏节点(节点添加时必须选择要加入的策略组),策略组类型建议:FallBack,游戏节点必须支持UDP \
|
||||
<br/>2、在此页面的游戏规则列表下载您要使用的游戏规则 \
|
||||
<br/>3、在此页面上方设置您已下载的游戏规则的对应策略组并保存设置 \
|
||||
<br/>4、替换内核一,下载地址:https://github.com/Dreamacro/clash/releases/tag/TUN \
|
||||
<br/>或替换内核二,下载地址:https://github.com/vernesong/OpenClash/releases/tag/TUN \
|
||||
<br/>5、在《全局设置》-《常规设置》-《运行模式》中选择TUN模式(内核一)或者游戏模式(内核二)并启动")
|
||||
|
||||
|
||||
function IsRuleFile(e)
|
||||
|
||||
@ -48,6 +48,7 @@ o = s:taboption("settings", ListValue, "en_mode", font_red..bold_on..translate("
|
||||
o.description = translate("Select Mode For OpenClash Work, Network Error Try Flush DNS Cache")
|
||||
o:value("redir-host", translate("redir-host"))
|
||||
o:value("fake-ip", translate("fake-ip"))
|
||||
o:value("redir-host-tun", translate("redir-host(tun mode)"))
|
||||
o:value("fake-ip-tun", translate("fake-ip(tun mode)"))
|
||||
o:value("redir-host-vpn", translate("redir-host-vpn(game mode)"))
|
||||
o:value("fake-ip-vpn", translate("fake-ip-vpn(game mode)"))
|
||||
|
||||
@ -55,6 +55,10 @@
|
||||
{
|
||||
mode.innerHTML = status.clash ? "<b><font color=green><%: Redir-Host(兼容)模式 %></font></b>" : '<b><font color=red><%:NOT RUNNING%></font></b>';
|
||||
}
|
||||
else if ( status.mode == "redir-host-tun\n" )
|
||||
{
|
||||
mode.innerHTML = status.clash ? "<b><font color=green><%: Redir-Host(TUN)模式 %></font></b>" : '<b><font color=red><%:NOT RUNNING%></font></b>';
|
||||
}
|
||||
else if ( status.mode == "fake-ip-tun\n" )
|
||||
{
|
||||
mode.innerHTML = status.clash ? "<b><font color=green><%: Fake-IP(TUN)模式 %></font></b>" : '<b><font color=red><%:NOT RUNNING%></font></b>';
|
||||
@ -86,6 +90,10 @@
|
||||
{
|
||||
mode.innerHTML = status.clash ? "<b><font color=green><%: Redir-Host(兼容)模式 %></font></b>" : '<b><font color=red><%:NOT RUNNING%></font></b>';
|
||||
}
|
||||
else if ( status.mode == "redir-host-tun\n" )
|
||||
{
|
||||
mode.innerHTML = status.clash ? "<b><font color=green><%: Redir-Host(TUN)模式 %></font></b>" : '<b><font color=red><%:NOT RUNNING%></font></b>';
|
||||
}
|
||||
else if ( status.mode == "fake-ip-tun\n" )
|
||||
{
|
||||
mode.innerHTML = status.clash ? "<b><font color=green><%: Fake-IP(TUN)模式 %></font></b>" : '<b><font color=red><%:NOT RUNNING%></font></b>';
|
||||
|
||||
@ -95,6 +95,9 @@ msgstr "Redir-Host(兼容)模式"
|
||||
msgid "fake-ip"
|
||||
msgstr "Fake-IP(增强)模式"
|
||||
|
||||
msgid "redir-host(tun mode)"
|
||||
msgstr "Redir-Host(TUN)模式【依赖kmod-tun】"
|
||||
|
||||
msgid "fake-ip(tun mode)"
|
||||
msgstr "Fake-IP(TUN)模式【依赖kmod-tun】"
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user