Skip to content

Commit

Permalink
Update OpenWrt-Packages 2024.09.28-16:39
Browse files Browse the repository at this point in the history
  • Loading branch information
yfdoor committed Sep 28, 2024
1 parent f736d24 commit 154b4c3
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ if has_xray then
o.default = "10-20"
o:depends("fragment", true)

o = s_xray:option(Flag, "noise", translate("Noise"), translate("UDP noise, Under some circumstances it can bypass some UDP based protocol restrictions."))
o.default = 0

o = s_xray:option(Flag, "sniffing_override_dest", translate("Override the connection destination address"), translate("Override the connection destination address with the sniffed domain."))
o.default = 0

Expand All @@ -187,6 +190,41 @@ if has_xray then

o = s_xray:option(Value, "buffer_size", translate("Buffer Size"), translate("Buffer size for every connection (kB)"))
o.datatype = "uinteger"

s_xray_noise = m:section(TypedSection, "xray_noise_packets", translate("Xray Noise Packets"),"<font color='red'>" .. translate("To send noise packets, select \"Noise\" in Xray Settings.") .. "</font>")
s_xray_noise.template = "cbi/tblsection"
s_xray_noise.sortable = true
s_xray_noise.anonymous = true
s_xray_noise.addremove = true

s_xray_noise.create = function(e, t)
TypedSection.create(e, api.gen_short_uuid())
end

s_xray_noise.remove = function(self, section)
for k, v in pairs(self.children) do
v.rmempty = true
v.validate = nil
end
TypedSection.remove(self, section)
end

o = s_xray_noise:option(Flag, "enabled", translate("Enable"))
o.default = 1
o.rmempty = false

o = s_xray_noise:option(ListValue, "type", translate("Type"))
o:value("rand", "rand")
o:value("str", "str")
o:value("base64", "base64")

o = s_xray_noise:option(Value, "packet", translate("Packet"))
o.datatype = "minlength(1)"
o.rmempty = false

o = s_xray_noise:option(Value, "delay", translate("Delay (ms)"))
o.datatype = "or(uinteger,portrange)"
o.rmempty = false
end

if has_singbox then
Expand Down
36 changes: 28 additions & 8 deletions dependency/luci-app-passwall/luasrc/passwall/util_xray.lua
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@ local function get_new_port()
return new_port
end

local function get_noise_packets()
local noises = {}
uci:foreach(appname, "xray_noise_packets", function(n)
local noise = (n.enabled == "1") and {
type = n.type,
packet = n.packet,
delay = string.find(n.delay, "-") and n.delay or tonumber(n.delay)
} or nil
table.insert(noises, noise)
end)
if #noises == 0 then noises = nil end
return noises
end

local function get_domain_excluded()
local path = string.format("/usr/share/%s/rules/domains_excluded", appname)
local content = fs.readfile(path)
Expand All @@ -43,10 +57,12 @@ function gen_outbound(flag, node, tag, proxy_table)
local proxy = 0
local proxy_tag = "nil"
local fragment = nil
local noise = nil
if proxy_table ~= nil and type(proxy_table) == "table" then
proxy = proxy_table.proxy or 0
proxy_tag = proxy_table.tag or "nil"
fragment = proxy_table.fragment or nil
noise = proxy_table.noise or nil
end

if node.type == "Xray" then
Expand Down Expand Up @@ -135,7 +151,7 @@ function gen_outbound(flag, node, tag, proxy_table)
mark = 255,
tcpMptcp = (node.tcpMptcp == "1") and true or nil,
tcpNoDelay = (node.tcpNoDelay == "1") and true or nil,
dialerProxy = fragment and "fragment" or nil
dialerProxy = (fragment or noise) and "dialerproxy" or nil
},
network = node.transport,
security = node.stream_security,
Expand Down Expand Up @@ -690,7 +706,7 @@ function gen_config(var)
end
if is_new_blc_node then
local blc_node = uci:get_all(appname, blc_node_id)
local outbound = gen_outbound(flag, blc_node, blc_node_tag, { fragment = xray_settings.fragment == "1" or nil })
local outbound = gen_outbound(flag, blc_node, blc_node_tag, { fragment = xray_settings.fragment == "1" or nil, noise = xray_settings.noise == "1" or nil })
if outbound then
table.insert(outbounds, outbound)
valid_nodes[#valid_nodes + 1] = blc_node_tag
Expand All @@ -713,7 +729,7 @@ function gen_config(var)
if is_new_node then
local fallback_node = uci:get_all(appname, fallback_node_id)
if fallback_node.protocol ~= "_balancing" then
local outbound = gen_outbound(flag, fallback_node, fallback_node_id, { fragment = xray_settings.fragment == "1" or nil })
local outbound = gen_outbound(flag, fallback_node, fallback_node_id, { fragment = xray_settings.fragment == "1" or nil, noise = xray_settings.noise == "1" or nil })
if outbound then
table.insert(outbounds, outbound)
else
Expand Down Expand Up @@ -862,6 +878,9 @@ function gen_config(var)
if xray_settings.fragment == "1" and not proxy_table.tag then
proxy_table.fragment = true
end
if xray_settings.noise == "1" and not proxy_table.tag then
proxy_table.noise = true
end
local outbound = gen_outbound(flag, _node, rule_name, proxy_table)
local outbound_tag
if outbound then
Expand Down Expand Up @@ -1047,7 +1066,7 @@ function gen_config(var)
sys.call("touch /tmp/etc/passwall/iface/" .. node.iface)
end
else
local outbound = gen_outbound(flag, node, nil, { fragment = xray_settings.fragment == "1" or nil })
local outbound = gen_outbound(flag, node, nil, { fragment = xray_settings.fragment == "1" or nil, noise = xray_settings.fragment == "1" or nil })
if outbound then
set_outbound_detour(node, outbound, outbounds)
table.insert(outbounds, outbound)
Expand Down Expand Up @@ -1290,17 +1309,18 @@ function gen_config(var)
}
}

if xray_settings.fragment == "1" then
if xray_settings.fragment == "1" or xray_settings.noise == "1" then
table.insert(outbounds, {
protocol = "freedom",
tag = "fragment",
tag = "dialerproxy",
settings = {
domainStrategy = (direct_dns_query_strategy and direct_dns_query_strategy ~= "") and direct_dns_query_strategy or "UseIP",
fragment = {
fragment = (xray_settings.fragment == "1") and {
packets = (xray_settings.fragment_packets and xray_settings.fragment_packets ~= "") and xray_settings.fragment_packets,
length = (xray_settings.fragment_length and xray_settings.fragment_length ~= "") and xray_settings.fragment_length,
interval = (xray_settings.fragment_interval and xray_settings.fragment_interval ~= "") and xray_settings.fragment_interval
}
} or nil,
noises = (xray_settings.noise == "1") and get_noise_packets() or nil
},
streamSettings = {
sockopt = {
Expand Down
18 changes: 18 additions & 0 deletions dependency/luci-app-passwall/po/zh-cn/passwall.po
Original file line number Diff line number Diff line change
Expand Up @@ -1657,6 +1657,24 @@ msgstr "分片间隔"
msgid "Fragmentation interval (ms)"
msgstr "分片间隔(ms)"

msgid "Noise"
msgstr "噪声"

msgid "UDP noise, Under some circumstances it can bypass some UDP based protocol restrictions."
msgstr "UDP 噪声,在某些情况下可以绕过一些针对 UDP 协议的限制。"

msgid "To send noise packets, select \"Noise\" in Xray Settings."
msgstr "在 Xray 设置中勾选 “噪声” 以发送噪声包。"

msgid "Xray Noise Packets"
msgstr "Xray 噪声数据包"

msgid "Packet"
msgstr "数据包"

msgid "Delay (ms)"
msgstr "延迟(ms)"

msgid "If is domain name, The requested domain name will be resolved to IP before connect."
msgstr "如果是域名,域名将在请求发出之前解析为 IP。"

Expand Down
8 changes: 4 additions & 4 deletions dependency/mihomo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ PKG_RELEASE:=1

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/MetaCubeX/mihomo.git
PKG_SOURCE_DATE:=2024-09-24
PKG_SOURCE_VERSION:=af732112310b28a97f04d59ee77f0ebd6c85e724
PKG_MIRROR_HASH:=37779149d3f3aa11a8949215b4a8c343019c86be6f99bf11abd6ded1b26ae9e8
PKG_SOURCE_DATE:=2024-09-26
PKG_SOURCE_VERSION:=43cb48231ac5adc5404868ff61d044aeb34e0608
PKG_MIRROR_HASH:=338beb15b7c641b3a09990c28e54749b75c34a0bb895d37007bde4445c9fd353

PKG_LICENSE:=MIT
PKG_MAINTAINER:=Joseph Mory <morytyann@gmail.com>
Expand All @@ -16,7 +16,7 @@ PKG_BUILD_DEPENDS:=golang/host
PKG_BUILD_PARALLEL:=1
PKG_BUILD_FLAGS:=no-mips16

PKG_BUILD_VERSION:=alpha-af73211
PKG_BUILD_VERSION:=alpha-43cb482
PKG_BUILD_TIME:=$(shell date -u -Iseconds)

GO_PKG:=github.com/metacubex/mihomo
Expand Down
4 changes: 2 additions & 2 deletions dependency/v2ray-geodata/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>

include $(INCLUDE_DIR)/package.mk

GEOIP_VER:=202409190051
GEOIP_VER:=202409260052
GEOIP_FILE:=geoip.dat.$(GEOIP_VER)
define Download/geoip
URL:=https://github.com/v2fly/geoip/releases/download/$(GEOIP_VER)/
URL_FILE:=geoip.dat
FILE:=$(GEOIP_FILE)
HASH:=b9d2ae86f70922be6426d734464e395ae00f537af40eb69d74ee41d65b29fdf0
HASH:=334bd38a791c41a6b95f3afec7350c8a86ac9b2a9dde1e63c80d183edcb81af4
endef

GEOSITE_VER:=20240920063125
Expand Down

0 comments on commit 154b4c3

Please sign in to comment.