add Mux option support in v2ray

This commit is contained in:
coolsnowwolf 2018-11-11 15:13:55 +08:00
parent 5227fd4edc
commit b9a34151ca
4 changed files with 11 additions and 5 deletions

View File

@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-ssr-plus
PKG_VERSION:=1
PKG_RELEASE:=39
PKG_RELEASE:=41
PO2LMO:=$(BUILD_DIR)/luci-base/po2lmo
@ -57,8 +57,6 @@ define Package/luci-app-ssr-plus/install
cp -pR ./root/* $(1)/
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n
$(PO2LMO) ./po/zh-cn/ssr-plus.po $(1)/usr/lib/lua/luci/i18n/ssr-plus.zh-cn.lmo
find $(1) -name *.lua -exec luac -s -o {} {} \;
endef
define Package/luci-app-ssr-plus/postinst

View File

@ -309,6 +309,11 @@ o = s:option(Flag, "tls", translate("TLS"))
o.rmempty = false
o:depends("type", "v2ray")
-- [[ Mux ]]--
o = s:option(Flag, "mux", translate("Mux"))
o.rmempty = false
o:depends("type", "v2ray")
o = s:option(Flag, "fast_open", translate("TCP Fast Open"))
o.rmempty = false
o.default = "0"

View File

@ -83,7 +83,7 @@ gen_config_file() {
else
config_file=$CONFIG_SOCK5_FILE
fi
if [ $(uci_get_by_name $1 fast_open) = "1" ] ;then
if [ $(uci_get_by_name $1 fast_open 0) = "1" ] ;then
fastopen="true";
else
fastopen="false";

View File

@ -63,7 +63,10 @@ local v2ray = {
path = server.h2_path,
host = server.h2_host,
} or nil
}
},
mux = {
enabled = (server.mux == "1") and true or false
}
},
-- 额外传出连接