mirror of
https://github.com/roacn/openwrt-packages.git
synced 2025-01-07 03:16:45 +08:00
⛄ Sync 2024-12-01 00:29
This commit is contained in:
parent
bd8368835f
commit
574bbb8ade
@ -495,6 +495,10 @@ o = s:option(Value, option_name("ws_path"), translate("WebSocket Path"))
|
||||
o.placeholder = "/"
|
||||
o:depends({ [option_name("transport")] = "ws" })
|
||||
|
||||
o = s:option(Value, option_name("ws_heartbeatPeriod"), translate("HeartbeatPeriod(second)"))
|
||||
o.datatype = "integer"
|
||||
o:depends({ [option_name("transport")] = "ws" })
|
||||
|
||||
-- [[ HTTP/2部分 ]]--
|
||||
o = s:option(Value, option_name("h2_host"), translate("HTTP/2 Host"))
|
||||
o:depends({ [option_name("transport")] = "h2" })
|
||||
@ -575,6 +579,7 @@ o.default = "auto"
|
||||
o:value("auto")
|
||||
o:value("packet-up")
|
||||
o:value("stream-up")
|
||||
o:value("stream-one")
|
||||
|
||||
o = s:option(Value, option_name("xhttp_host"), translate("XHTTP Host"))
|
||||
o:depends({ [option_name("transport")] = "xhttp" })
|
||||
@ -588,12 +593,18 @@ o:depends({ [option_name("transport")] = "xhttp" })
|
||||
o.rows = 15
|
||||
o.wrap = "off"
|
||||
o.custom_write = function(self, section, value)
|
||||
|
||||
m:set(section, self.option:sub(1 + #option_prefix), value)
|
||||
local data = value and value ~= "" and jsonc.parse(value)
|
||||
local address = (data and data.extra and data.extra.downloadSettings and data.extra.downloadSettings.address)
|
||||
or (data and data.downloadSettings and data.downloadSettings.address)
|
||||
if address and address ~= "" then
|
||||
m:set(section, "download_address", address)
|
||||
|
||||
local success, data = pcall(jsonc.parse, value)
|
||||
if success and data then
|
||||
local address = (data.extra and data.extra.downloadSettings and data.extra.downloadSettings.address)
|
||||
or (data.downloadSettings and data.downloadSettings.address)
|
||||
if address and address ~= "" then
|
||||
m:set(section, "download_address", address)
|
||||
else
|
||||
m:del(section, "download_address")
|
||||
end
|
||||
else
|
||||
m:del(section, "download_address")
|
||||
end
|
||||
|
@ -189,7 +189,8 @@ function gen_outbound(flag, node, tag, proxy_table)
|
||||
headers = (node.ws_host ~= nil) and
|
||||
{Host = node.ws_host} or nil,
|
||||
maxEarlyData = tonumber(node.ws_maxEarlyData) or nil,
|
||||
earlyDataHeaderName = (node.ws_earlyDataHeaderName) and node.ws_earlyDataHeaderName or nil
|
||||
earlyDataHeaderName = (node.ws_earlyDataHeaderName) and node.ws_earlyDataHeaderName or nil,
|
||||
heartbeatPeriod = tonumber(node.ws_heartbeatPeriod) or nil
|
||||
} or nil,
|
||||
httpSettings = (node.transport == "h2") and {
|
||||
path = node.h2_path or "/",
|
||||
@ -221,7 +222,14 @@ function gen_outbound(flag, node, tag, proxy_table)
|
||||
path = node.xhttp_path or node.splithttp_path or "/",
|
||||
host = node.xhttp_host or node.splithttp_host,
|
||||
-- 如果包含 "extra" 节,取 "extra" 内的内容,否则直接赋值给 extra
|
||||
extra = node.xhttp_extra and (jsonc.parse(node.xhttp_extra).extra or jsonc.parse(node.xhttp_extra)) or nil
|
||||
extra = node.xhttp_extra and (function()
|
||||
local success, parsed = pcall(jsonc.parse, node.xhttp_extra)
|
||||
if success then
|
||||
return parsed.extra or parsed
|
||||
else
|
||||
return nil
|
||||
end
|
||||
end)() or nil
|
||||
} or nil,
|
||||
} or nil,
|
||||
settings = {
|
||||
|
@ -1609,6 +1609,9 @@ msgstr "端口跳跃时间 "
|
||||
msgid "Additional ports for hysteria hop"
|
||||
msgstr "端口跳跃额外端口"
|
||||
|
||||
msgid "HeartbeatPeriod(second)"
|
||||
msgstr "心跳周期(单位:秒)"
|
||||
|
||||
msgid "Custom geoip Path"
|
||||
msgstr "自定义 geoip 文件路径"
|
||||
|
||||
|
@ -1000,10 +1000,14 @@ local function processData(szType, content, add_mode, add_from)
|
||||
result.xhttp_path = params.path
|
||||
result.xhttp_mode = params.mode or "auto"
|
||||
result.xhttp_extra = params.extra
|
||||
local Data = params.extra and params.extra ~= "" and jsonParse(params.extra)
|
||||
local address = (Data and Data.extra and Data.extra.downloadSettings and Data.extra.downloadSettings.address)
|
||||
or (Data and Data.downloadSettings and Data.downloadSettings.address)
|
||||
result.download_address = address and address ~= "" and address or nil
|
||||
local success, Data = pcall(jsonParse, params.extra)
|
||||
if success and Data then
|
||||
local address = (Data.extra and Data.extra.downloadSettings and Data.extra.downloadSettings.address)
|
||||
or (Data.downloadSettings and Data.downloadSettings.address)
|
||||
result.download_address = address and address ~= "" and address or nil
|
||||
else
|
||||
result.download_address = nil
|
||||
end
|
||||
end
|
||||
if params.type == 'httpupgrade' then
|
||||
result.httpupgrade_host = params.host
|
||||
|
@ -1,12 +1,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=Xray-core
|
||||
PKG_VERSION:=24.11.21
|
||||
PKG_VERSION:=24.11.30
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/XTLS/Xray-core/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=e45ad1fa11457101776d2c0d7ed8ed7c669b714e7687a85830e44a6e4a52fe05
|
||||
PKG_HASH:=1ed728cf32cf9227c73e1b3651465eb089c6d2f42367cf40df62c4ba0edfc765
|
||||
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
PKG_LICENSE:=MPL-2.0
|
||||
|
Loading…
Reference in New Issue
Block a user