update 2022-09-01 08:57:22
This commit is contained in:
parent
5a98f7eeed
commit
a04ac28a24
|
@ -708,8 +708,8 @@ gen_dns(){
|
||||||
log-level fatal
|
log-level fatal
|
||||||
log-file $LOG
|
log-file $LOG
|
||||||
EOF
|
EOF
|
||||||
echo "bind :5335 -group a" >>$DNS_T
|
echo "bind :5335 -group a -no-cache" >>$DNS_T
|
||||||
echo "bind :5336 -group e -no-rule-soa" >>$DNS_T
|
echo "bind :5336 -group e -no-rule-soa -no-cache" >>$DNS_T
|
||||||
if [ $dns_mode_o = "doh" ];then
|
if [ $dns_mode_o = "doh" ];then
|
||||||
if [ "$dns_a" = 1 ];then
|
if [ "$dns_a" = 1 ];then
|
||||||
echo "server-https $doh_o_a -group a -exclude-default-group" >>$DNS_T
|
echo "server-https $doh_o_a -group a -exclude-default-group" >>$DNS_T
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +1,7 @@
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=luci-app-xray
|
PKG_NAME:=luci-app-xray
|
||||||
PKG_VERSION:=1.15.4
|
PKG_VERSION:=1.16.1
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_LICENSE:=MPLv2
|
PKG_LICENSE:=MPLv2
|
||||||
|
|
|
@ -43,6 +43,7 @@ Focus on making the most of Xray (HTTP/HTTPS/Socks/TProxy inbounds, multiple pro
|
||||||
* 2022-08-07 fix: avoid duplicated items in generated nftables ruleset
|
* 2022-08-07 fix: avoid duplicated items in generated nftables ruleset
|
||||||
* 2022-08-08 fix: make sure forwarded IPs are always forwarded to Xray even for reserved addresses. Xray may not forward those requests so that manner may be changed later.
|
* 2022-08-08 fix: make sure forwarded IPs are always forwarded to Xray even for reserved addresses. Xray may not forward those requests so that manner may be changed later.
|
||||||
* 2022-08-13 fix: apply 2022-08-08 fix to iptables as well
|
* 2022-08-13 fix: apply 2022-08-08 fix to iptables as well
|
||||||
|
* 2022-09-01 feat: specify outbound for manual transparent proxy
|
||||||
|
|
||||||
## Changelog 2021
|
## Changelog 2021
|
||||||
|
|
||||||
|
|
|
@ -58,37 +58,6 @@ local function blackhole_outbound()
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
local function manual_tproxy_outbounds()
|
|
||||||
local result = {}
|
|
||||||
local i = 0
|
|
||||||
ucursor:foreach("xray", "manual_tproxy", function(v)
|
|
||||||
i = i + 1
|
|
||||||
table.insert(result, {
|
|
||||||
protocol = "freedom",
|
|
||||||
tag = string.format("manual_tproxy_outbound_tcp_%d", i),
|
|
||||||
settings = {
|
|
||||||
redirect = string.format("%s:%d", v.dest_addr, v.dest_port),
|
|
||||||
domainStrategy = v.domain_strategy or "UseIP"
|
|
||||||
},
|
|
||||||
proxySettings = v.force_forward == "1" and {
|
|
||||||
tag = "tcp_outbound"
|
|
||||||
} or nil
|
|
||||||
})
|
|
||||||
table.insert(result, {
|
|
||||||
protocol = "freedom",
|
|
||||||
tag = string.format("manual_tproxy_outbound_udp_%d", i),
|
|
||||||
settings = {
|
|
||||||
redirect = string.format("%s:%d", v.dest_addr, v.dest_port),
|
|
||||||
domainStrategy = v.domain_strategy or "UseIP"
|
|
||||||
},
|
|
||||||
proxySettings = v.force_forward == "1" and {
|
|
||||||
tag = "udp_outbound"
|
|
||||||
} or nil
|
|
||||||
})
|
|
||||||
end)
|
|
||||||
return result
|
|
||||||
end
|
|
||||||
|
|
||||||
local function stream_tcp_fake_http_request(server)
|
local function stream_tcp_fake_http_request(server)
|
||||||
if server.tcp_guise == "http" then
|
if server.tcp_guise == "http" then
|
||||||
return {
|
return {
|
||||||
|
@ -761,6 +730,64 @@ local function inbounds()
|
||||||
return i
|
return i
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local function manual_tproxy_outbounds()
|
||||||
|
local result = {}
|
||||||
|
local i = 0
|
||||||
|
ucursor:foreach("xray", "manual_tproxy", function(v)
|
||||||
|
i = i + 1
|
||||||
|
local tcp_tag = "direct"
|
||||||
|
local udp_tag = "direct"
|
||||||
|
if v.force_forward == "1" then
|
||||||
|
if v.force_forward_server_tcp ~= nil then
|
||||||
|
if v.force_forward_server_tcp == proxy.main_server then
|
||||||
|
tcp_tag = "tcp_outbound"
|
||||||
|
else
|
||||||
|
tcp_tag = string.format("manual_tproxy_force_forward_tcp_outbound_%d", i)
|
||||||
|
local force_forward_server_tcp = ucursor:get_all("xray", v.force_forward_server_tcp)
|
||||||
|
table.insert(result, server_outbound(force_forward_server_tcp, tcp_tag))
|
||||||
|
end
|
||||||
|
else
|
||||||
|
tcp_tag = "tcp_outbound"
|
||||||
|
end
|
||||||
|
if v.force_forward_server_udp ~= nil then
|
||||||
|
if v.force_forward_server_udp == proxy.tproxy_udp_server then
|
||||||
|
udp_tag = "udp_outbound"
|
||||||
|
else
|
||||||
|
udp_tag = string.format("manual_tproxy_force_forward_udp_outbound_%d", i)
|
||||||
|
local force_forward_server_udp = ucursor:get_all("xray", v.force_forward_server_udp)
|
||||||
|
table.insert(result, server_outbound(force_forward_server_udp, udp_tag))
|
||||||
|
end
|
||||||
|
else
|
||||||
|
udp_tag = "udp_outbound"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
table.insert(result, {
|
||||||
|
protocol = "freedom",
|
||||||
|
tag = string.format("manual_tproxy_outbound_tcp_%d", i),
|
||||||
|
settings = {
|
||||||
|
redirect = string.format("%s:%d", v.dest_addr, v.dest_port),
|
||||||
|
domainStrategy = v.domain_strategy or "UseIP"
|
||||||
|
},
|
||||||
|
proxySettings = {
|
||||||
|
tag = tcp_tag
|
||||||
|
}
|
||||||
|
})
|
||||||
|
table.insert(result, {
|
||||||
|
protocol = "freedom",
|
||||||
|
tag = string.format("manual_tproxy_outbound_udp_%d", i),
|
||||||
|
settings = {
|
||||||
|
redirect = string.format("%s:%d", v.dest_addr, v.dest_port),
|
||||||
|
domainStrategy = v.domain_strategy or "UseIP"
|
||||||
|
},
|
||||||
|
proxySettings = {
|
||||||
|
tag = udp_tag
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end)
|
||||||
|
return result
|
||||||
|
end
|
||||||
|
|
||||||
local function manual_tproxy_rules()
|
local function manual_tproxy_rules()
|
||||||
local result = {}
|
local result = {}
|
||||||
local i = 0
|
local i = 0
|
||||||
|
|
|
@ -606,7 +606,23 @@ return view.extend({
|
||||||
o.default = "UseIP"
|
o.default = "UseIP"
|
||||||
o.modalonly = true
|
o.modalonly = true
|
||||||
|
|
||||||
o = ss.option(form.Flag, 'force_forward', _('Force Forward'), _('This destination must be forwarded through Xray. (This option might be removed later.)'))
|
o = ss.option(form.Flag, 'force_forward', _('Force Forward'), _('This destination must be forwarded through an outbound server.'))
|
||||||
|
o.modalonly = true
|
||||||
|
|
||||||
|
o = ss.option(form.ListValue, 'force_forward_server_tcp', _('Force Forward server (TCP)'))
|
||||||
|
o.depends("force_forward", "1")
|
||||||
|
o.datatype = "uciname"
|
||||||
|
for (var v of uci.sections(config_data, "servers")) {
|
||||||
|
o.value(v[".name"], v.alias || v.server + ":" + v.server_port)
|
||||||
|
}
|
||||||
|
o.modalonly = true
|
||||||
|
|
||||||
|
o = ss.option(form.ListValue, 'force_forward_server_udp', _('Force Forward server (UDP)'))
|
||||||
|
o.depends("force_forward", "1")
|
||||||
|
o.datatype = "uciname"
|
||||||
|
for (var v of uci.sections(config_data, "servers")) {
|
||||||
|
o.value(v[".name"], v.alias || v.server + ":" + v.server_port)
|
||||||
|
}
|
||||||
o.modalonly = true
|
o.modalonly = true
|
||||||
|
|
||||||
s.tab('xray_server', _('HTTPS Server'));
|
s.tab('xray_server', _('HTTPS Server'));
|
||||||
|
|
Loading…
Reference in New Issue