update 2023-12-04 09:15:53

This commit is contained in:
github-actions[bot] 2023-12-04 09:15:53 +08:00
parent fa06112605
commit 5efefd0bb2
6 changed files with 98 additions and 12 deletions

View File

@ -1,5 +1,5 @@
# #
# Copyright (C) 2012-2018 OpenWrt.org # Copyright (C) 2012-2023 OpenWrt.org
# #
# This is free software, licensed under the GNU General Public License v2. # This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information. # See /LICENSE for more information.
@ -15,6 +15,7 @@ PKG_SOURCE_URL:=https://github.com/aria2/aria2/releases/download/release-$(PKG_V
PKG_HASH:=skip PKG_HASH:=skip
PKG_INSTALL:=1 PKG_INSTALL:=1
PKG_BUILD_PARALLEL:=1 PKG_BUILD_PARALLEL:=1
PKG_BUILD_FLAGS:=gc-sections lto
PKG_MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>, \ PKG_MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>, \
Hsing-Wang Liao <kuoruan@gmail.com> Hsing-Wang Liao <kuoruan@gmail.com>
@ -83,9 +84,6 @@ CONFIGURE_ARGS += \
--without-libuv \ --without-libuv \
--with-libz --with-libz
TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -flto
TARGET_LDFLAGS += -Wl,--gc-sections -flto
define Package/aria2/conffiles define Package/aria2/conffiles
/etc/config/aria2 /etc/config/aria2
endef endef

View File

@ -6,7 +6,7 @@
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-passwall PKG_NAME:=luci-app-passwall
PKG_VERSION:=4.71-2 PKG_VERSION:=4.71-3
PKG_RELEASE:= PKG_RELEASE:=
PKG_CONFIG_DEPENDS:= \ PKG_CONFIG_DEPENDS:= \

View File

@ -438,6 +438,7 @@ o = s:option(ListValue, option_name("transport"), translate("Transport"))
o:value("tcp", "TCP") o:value("tcp", "TCP")
o:value("http", "HTTP") o:value("http", "HTTP")
o:value("ws", "WebSocket") o:value("ws", "WebSocket")
o:value("httpupgrade", "HTTPUpgrade")
if singbox_tags:find("with_quic") then if singbox_tags:find("with_quic") then
o:value("quic", "QUIC") o:value("quic", "QUIC")
end end
@ -509,6 +510,14 @@ o:depends({ [option_name("ws_enableEarlyData")] = true })
o = s:option(Value, option_name("ws_earlyDataHeaderName"), translate("Early data header name"), translate("Recommended value: Sec-WebSocket-Protocol")) o = s:option(Value, option_name("ws_earlyDataHeaderName"), translate("Early data header name"), translate("Recommended value: Sec-WebSocket-Protocol"))
o:depends({ [option_name("ws_enableEarlyData")] = true }) o:depends({ [option_name("ws_enableEarlyData")] = true })
-- [[ HTTPUpgrade部分 ]]--
o = s:option(Value, option_name("httpupgrade_host"), translate("HTTPUpgrade Host"))
o:depends({ [option_name("transport")] = "httpupgrade" })
o = s:option(Value, option_name("httpupgrade_path"), translate("HTTPUpgrade Path"))
o.placeholder = "/"
o:depends({ [option_name("transport")] = "httpupgrade" })
-- [[ gRPC部分 ]]-- -- [[ gRPC部分 ]]--
o = s:option(Value, option_name("grpc_serviceName"), "ServiceName") o = s:option(Value, option_name("grpc_serviceName"), "ServiceName")
o:depends({ [option_name("transport")] = "grpc" }) o:depends({ [option_name("transport")] = "grpc" })
@ -533,8 +542,6 @@ o = s:option(Flag, option_name("mux"), translate("Mux"))
o.rmempty = false o.rmempty = false
o:depends({ [option_name("protocol")] = "vmess" }) o:depends({ [option_name("protocol")] = "vmess" })
o:depends({ [option_name("protocol")] = "vless", [option_name("flow")] = "" }) o:depends({ [option_name("protocol")] = "vless", [option_name("flow")] = "" })
o:depends({ [option_name("protocol")] = "http" })
o:depends({ [option_name("protocol")] = "socks" })
o:depends({ [option_name("protocol")] = "shadowsocks", [option_name("uot")] = "" }) o:depends({ [option_name("protocol")] = "shadowsocks", [option_name("uot")] = "" })
o:depends({ [option_name("protocol")] = "trojan" }) o:depends({ [option_name("protocol")] = "trojan" })
@ -545,13 +552,26 @@ o:value("h2mux")
o:depends({ [option_name("mux")] = true }) o:depends({ [option_name("mux")] = true })
o = s:option(Value, option_name("mux_concurrency"), translate("Mux concurrency")) o = s:option(Value, option_name("mux_concurrency"), translate("Mux concurrency"))
o.default = 8 o.default = 4
o:depends({ [option_name("mux")] = true }) o:depends({ [option_name("mux")] = true, [option_name("tcpbrutal")] = false })
o = s:option(Flag, option_name("mux_padding"), translate("Padding")) o = s:option(Flag, option_name("mux_padding"), translate("Padding"))
o.default = 0 o.default = 0
o:depends({ [option_name("mux")] = true }) o:depends({ [option_name("mux")] = true })
-- [[ TCP Brutal ]]--
o = s:option(Flag, option_name("tcpbrutal"), translate("TCP Brutal"))
o.default = 0
o:depends({ [option_name("mux")] = true })
o = s:option(Value, option_name("tcpbrutal_up_mbps"), translate("Max upload Mbps"))
o.default = "10"
o:depends({ [option_name("tcpbrutal")] = true })
o = s:option(Value, option_name("tcpbrutal_down_mbps"), translate("Max download Mbps"))
o.default = "50"
o:depends({ [option_name("tcpbrutal")] = true })
o = s:option(Flag, option_name("shadowtls"), "ShadowTLS") o = s:option(Flag, option_name("shadowtls"), "ShadowTLS")
o.default = 0 o.default = 0
o:depends({ [option_name("protocol")] = "vmess", [option_name("tls")] = false }) o:depends({ [option_name("protocol")] = "vmess", [option_name("tls")] = false })

View File

@ -310,6 +310,7 @@ o = s:option(ListValue, option_name("transport"), translate("Transport"))
o:value("tcp", "TCP") o:value("tcp", "TCP")
o:value("http", "HTTP") o:value("http", "HTTP")
o:value("ws", "WebSocket") o:value("ws", "WebSocket")
o:value("httpupgrade", "HTTPUpgrade")
o:value("quic", "QUIC") o:value("quic", "QUIC")
o:value("grpc", "gRPC") o:value("grpc", "gRPC")
o:depends({ [option_name("protocol")] = "shadowsocks" }) o:depends({ [option_name("protocol")] = "shadowsocks" })
@ -333,10 +334,39 @@ o:depends({ [option_name("transport")] = "ws" })
o = s:option(Value, option_name("ws_path"), translate("WebSocket Path")) o = s:option(Value, option_name("ws_path"), translate("WebSocket Path"))
o:depends({ [option_name("transport")] = "ws" }) o:depends({ [option_name("transport")] = "ws" })
-- [[ HTTPUpgrade部分 ]]--
o = s:option(Value, option_name("httpupgrade_host"), translate("HTTPUpgrade Host"))
o:depends({ [option_name("transport")] = "httpupgrade" })
o = s:option(Value, option_name("httpupgrade_path"), translate("HTTPUpgrade Path"))
o:depends({ [option_name("transport")] = "httpupgrade" })
-- [[ gRPC部分 ]]-- -- [[ gRPC部分 ]]--
o = s:option(Value, option_name("grpc_serviceName"), "ServiceName") o = s:option(Value, option_name("grpc_serviceName"), "ServiceName")
o:depends({ [option_name("transport")] = "grpc" }) o:depends({ [option_name("transport")] = "grpc" })
-- [[ Mux ]]--
o = s:option(Flag, option_name("mux"), translate("Mux"))
o.rmempty = false
o:depends({ [option_name("protocol")] = "vmess" })
o:depends({ [option_name("protocol")] = "vless", [option_name("flow")] = "" })
o:depends({ [option_name("protocol")] = "shadowsocks" })
o:depends({ [option_name("protocol")] = "trojan" })
-- [[ TCP Brutal ]]--
o = s:option(Flag, option_name("tcpbrutal"), translate("TCP Brutal"))
o.default = 0
o:depends({ [option_name("mux")] = true })
o = s:option(Value, option_name("tcpbrutal_up_mbps"), translate("Max upload Mbps"))
o.default = "10"
o:depends({ [option_name("tcpbrutal")] = true })
o = s:option(Value, option_name("tcpbrutal_down_mbps"), translate("Max download Mbps"))
o.default = "50"
o:depends({ [option_name("tcpbrutal")] = true })
o = s:option(Flag, option_name("bind_local"), translate("Bind Local"), translate("When selected, it can only be accessed locally, It is recommended to turn on when using reverse proxies or be fallback.")) o = s:option(Flag, option_name("bind_local"), translate("Bind Local"), translate("When selected, it can only be accessed locally, It is recommended to turn on when using reverse proxies or be fallback."))
o.default = "0" o.default = "0"

View File

@ -116,10 +116,15 @@ function gen_outbound(flag, node, tag, proxy_table)
mux = { mux = {
enabled = true, enabled = true,
protocol = node.mux_type or "h2mux", protocol = node.mux_type or "h2mux",
max_connections = tonumber(node.mux_concurrency) or 4, max_connections = ( (node.tcpbrutal == "1") and 1 ) or tonumber(node.mux_concurrency) or 4,
padding = (node.mux_padding == "1") and true or false, padding = (node.mux_padding == "1") and true or false,
--min_streams = 4, --min_streams = 4,
--max_streams = 0, --max_streams = 0,
brutal = {
enabled = (node.tcpbrutal == "1") and true or false,
up_mbps = tonumber(node.tcpbrutal_up_mbps) or 10,
down_mbps = tonumber(node.tcpbrutal_down_mbps) or 50,
},
} }
end end
@ -146,6 +151,14 @@ function gen_outbound(flag, node, tag, proxy_table)
} }
end end
if node.transport == "httpupgrade" then
v2ray_transport = {
type = "httpupgrade",
host = node.httpupgrade_host,
path = node.httpupgrade_path or "/",
}
end
if node.transport == "quic" then if node.transport == "quic" then
v2ray_transport = { v2ray_transport = {
type = "quic" type = "quic"
@ -402,6 +415,19 @@ function gen_config_server(node)
} }
end end
local mux = nil
if node.mux == "1" then
mux = {
enabled = true,
padding = (node.mux_padding == "1") and true or false,
brutal = {
enabled = (node.tcpbrutal == "1") and true or false,
up_mbps = tonumber(node.tcpbrutal_up_mbps) or 10,
down_mbps = tonumber(node.tcpbrutal_down_mbps) or 50,
},
}
end
local v2ray_transport = nil local v2ray_transport = nil
if node.transport == "http" then if node.transport == "http" then
@ -421,6 +447,14 @@ function gen_config_server(node)
} }
end end
if node.transport == "httpupgrade" then
v2ray_transport = {
type = "httpupgrade",
host = node.httpupgrade_host,
path = node.httpupgrade_path or "/",
}
end
if node.transport == "quic" then if node.transport == "quic" then
v2ray_transport = { v2ray_transport = {
type = "quic" type = "quic"
@ -483,6 +517,7 @@ function gen_config_server(node)
protocol_table = { protocol_table = {
method = node.method, method = node.method,
password = node.password, password = node.password,
multiplex = mux,
} }
end end
@ -499,6 +534,7 @@ function gen_config_server(node)
protocol_table = { protocol_table = {
users = users, users = users,
tls = (node.tls == "1") and tls or nil, tls = (node.tls == "1") and tls or nil,
multiplex = mux,
transport = v2ray_transport, transport = v2ray_transport,
} }
end end
@ -517,6 +553,7 @@ function gen_config_server(node)
protocol_table = { protocol_table = {
users = users, users = users,
tls = (node.tls == "1") and tls or nil, tls = (node.tls == "1") and tls or nil,
multiplex = mux,
transport = v2ray_transport, transport = v2ray_transport,
} }
end end
@ -536,6 +573,7 @@ function gen_config_server(node)
tls = (node.tls == "1") and tls or nil, tls = (node.tls == "1") and tls or nil,
fallback = nil, fallback = nil,
fallback_for_alpn = nil, fallback_for_alpn = nil,
multiplex = mux,
transport = v2ray_transport, transport = v2ray_transport,
} }
end end

View File

@ -30,13 +30,13 @@ define Download/geosite
HASH:=7a6cfbb0164fc6ad2b772cbccc6b8f3dea5a0743055228392d5da40f2260305d HASH:=7a6cfbb0164fc6ad2b772cbccc6b8f3dea5a0743055228392d5da40f2260305d
endef endef
GEOSITE_IRAN_VER:=202311270026 GEOSITE_IRAN_VER:=202312040026
GEOSITE_IRAN_FILE:=iran.dat.$(GEOSITE_IRAN_VER) GEOSITE_IRAN_FILE:=iran.dat.$(GEOSITE_IRAN_VER)
define Download/geosite-ir define Download/geosite-ir
URL:=https://github.com/bootmortis/iran-hosted-domains/releases/download/$(GEOSITE_IRAN_VER)/ URL:=https://github.com/bootmortis/iran-hosted-domains/releases/download/$(GEOSITE_IRAN_VER)/
URL_FILE:=iran.dat URL_FILE:=iran.dat
FILE:=$(GEOSITE_IRAN_FILE) FILE:=$(GEOSITE_IRAN_FILE)
HASH:=bf36f1ba76f9e9cc49419dcdc107a1f4b5ee2e25911d729fc770f52b071e1b4e HASH:=bc0f82b20609de5750bf60e7709b392e647cde0ceaf24d69265bac700dbc2010
endef endef
define Package/v2ray-geodata/template define Package/v2ray-geodata/template