mirror of
https://github.com/kenzok8/small-package
synced 2025-01-09 08:59:26 +08:00
update 2023-02-22 16:12:00
This commit is contained in:
parent
c62c4d4463
commit
93147a4d86
@ -5,15 +5,15 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=luci-app-homeproxy
|
PKG_NAME:=luci-app-homeproxy
|
||||||
PKG_VERSION:=1.0-dev-testing1
|
PKG_VERSION:=1.0-usertesting-0222
|
||||||
|
|
||||||
LUCI_TITLE:=The modern ImmortalWrt proxy platform for ARM64/AMD64
|
LUCI_TITLE:=The modern ImmortalWrt proxy platform for ARM64/AMD64
|
||||||
LUCI_PKGARCH:=all
|
LUCI_PKGARCH:=all
|
||||||
LUCI_DEPENDS:= \
|
LUCI_DEPENDS:= \
|
||||||
+sing-box \
|
+sing-box \
|
||||||
+@SING_BOX_BUILD_GVISOR \
|
|
||||||
+curl \
|
+curl \
|
||||||
+firewall4
|
+firewall4 \
|
||||||
|
+kmod-nft-tproxy
|
||||||
|
|
||||||
define Package/luci-app-homeproxy/conffiles
|
define Package/luci-app-homeproxy/conffiles
|
||||||
/etc/config/homeproxy
|
/etc/config/homeproxy
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
TODO:
|
TODO:
|
||||||
- Move ACL settings to a dedicated page
|
|
||||||
- Check bugs in ACL, config generator etc.
|
- Check bugs in ACL, config generator etc.
|
||||||
- Subscription page slow response with a large number of nodes
|
- Subscription page slow response with a large number of nodes
|
||||||
- Refactor nft rules
|
- Refactor nft rules
|
||||||
|
- Move ACL settings to a dedicated page
|
||||||
- Any other improvements
|
- Any other improvements
|
||||||
|
@ -6,7 +6,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=luci-app-passwall2
|
PKG_NAME:=luci-app-passwall2
|
||||||
PKG_VERSION:=1.9
|
PKG_VERSION:=1.9
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
|
|
||||||
PKG_CONFIG_DEPENDS:= \
|
PKG_CONFIG_DEPENDS:= \
|
||||||
CONFIG_PACKAGE_$(PKG_NAME)_Transparent_Proxy \
|
CONFIG_PACKAGE_$(PKG_NAME)_Transparent_Proxy \
|
||||||
|
@ -847,7 +847,7 @@ function gen_config(var)
|
|||||||
disableFallback = true,
|
disableFallback = true,
|
||||||
disableFallbackIfMatch = true,
|
disableFallbackIfMatch = true,
|
||||||
servers = {},
|
servers = {},
|
||||||
queryStrategy = (dns_query_strategy and dns_query_strategy ~= "") and dns_query_strategy or "UseIPv4"
|
queryStrategy = (dns_query_strategy and dns_query_strategy ~= "") and dns_query_strategy or "UseIP"
|
||||||
}
|
}
|
||||||
|
|
||||||
local dns_host = ""
|
local dns_host = ""
|
||||||
@ -956,17 +956,22 @@ function gen_config(var)
|
|||||||
network = "tcp,udp"
|
network = "tcp,udp"
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
local direct_type_dns = {
|
||||||
|
address = direct_dns_udp_server,
|
||||||
|
port = tonumber(direct_dns_port) or 53,
|
||||||
|
network = "udp",
|
||||||
|
}
|
||||||
|
local remote_type_dns = {
|
||||||
|
address = remote_dns_udp_server,
|
||||||
|
port = tonumber(remote_dns_port) or 53,
|
||||||
|
network = _remote_dns_proto or "tcp",
|
||||||
|
}
|
||||||
|
local type_dns = remote_type_dns
|
||||||
table.insert(outbounds, {
|
table.insert(outbounds, {
|
||||||
tag = "dns-out",
|
tag = "dns-out",
|
||||||
protocol = "dns",
|
protocol = "dns",
|
||||||
settings = {
|
settings = type_dns
|
||||||
address = "1.1.1.1",
|
|
||||||
port = tonumber(remote_dns_port) or 53,
|
|
||||||
network = _remote_dns_proto or "tcp",
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
table.insert(routing.rules, 1, {
|
table.insert(routing.rules, 1, {
|
||||||
type = "field",
|
type = "field",
|
||||||
inboundTag = {
|
inboundTag = {
|
||||||
@ -1232,34 +1237,13 @@ function gen_dns_config(var)
|
|||||||
queryStrategy = (dns_query_strategy and dns_query_strategy ~= "") and dns_query_strategy or "UseIPv4"
|
queryStrategy = (dns_query_strategy and dns_query_strategy ~= "") and dns_query_strategy or "UseIPv4"
|
||||||
}
|
}
|
||||||
|
|
||||||
local tmp_dns_server, tmp_dns_port, tmp_dns_proto
|
local other_type_dns_proto, other_type_dns_server, other_type_dns_port
|
||||||
|
|
||||||
if dns_out_tag == "remote" then
|
if dns_out_tag == "remote" then
|
||||||
local _remote_dns = {
|
local _remote_dns = {
|
||||||
_flag = "remote"
|
_flag = "remote"
|
||||||
}
|
}
|
||||||
|
|
||||||
if remote_dns_udp_server then
|
|
||||||
_remote_dns.address = remote_dns_udp_server
|
|
||||||
_remote_dns.port = tonumber(remote_dns_port) or 53
|
|
||||||
tmp_dns_proto = "udp"
|
|
||||||
end
|
|
||||||
|
|
||||||
if remote_dns_tcp_server then
|
|
||||||
_remote_dns.address = remote_dns_tcp_server
|
|
||||||
_remote_dns.port = tonumber(remote_dns_port) or 53
|
|
||||||
tmp_dns_proto = "tcp"
|
|
||||||
end
|
|
||||||
|
|
||||||
if remote_dns_doh_url and remote_dns_doh_host then
|
|
||||||
if remote_dns_server and remote_dns_doh_host ~= remote_dns_server and not api.is_ip(remote_dns_doh_host) then
|
|
||||||
dns.hosts[remote_dns_doh_host] = remote_dns_server
|
|
||||||
end
|
|
||||||
_remote_dns.address = remote_dns_doh_url
|
|
||||||
_remote_dns.port = tonumber(remote_dns_port) or 443
|
|
||||||
tmp_dns_proto = "tcp"
|
|
||||||
end
|
|
||||||
|
|
||||||
if remote_dns_fake then
|
if remote_dns_fake then
|
||||||
remote_dns_server = "1.1.1.1"
|
remote_dns_server = "1.1.1.1"
|
||||||
fakedns = {}
|
fakedns = {}
|
||||||
@ -1275,10 +1259,31 @@ function gen_dns_config(var)
|
|||||||
end
|
end
|
||||||
_remote_dns.address = "fakedns"
|
_remote_dns.address = "fakedns"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
other_type_dns_port = tonumber(remote_dns_port) or 53
|
||||||
|
other_type_dns_server = remote_dns_server
|
||||||
|
|
||||||
tmp_dns_server = remote_dns_server
|
if remote_dns_udp_server then
|
||||||
|
_remote_dns.address = remote_dns_udp_server
|
||||||
|
_remote_dns.port = tonumber(remote_dns_port) or 53
|
||||||
|
other_type_dns_proto = "udp"
|
||||||
|
end
|
||||||
|
|
||||||
tmp_dns_port = remote_dns_port
|
if remote_dns_tcp_server then
|
||||||
|
_remote_dns.address = remote_dns_tcp_server
|
||||||
|
_remote_dns.port = tonumber(remote_dns_port) or 53
|
||||||
|
other_type_dns_proto = "tcp"
|
||||||
|
end
|
||||||
|
|
||||||
|
if remote_dns_doh_url and remote_dns_doh_host then
|
||||||
|
if remote_dns_server and remote_dns_doh_host ~= remote_dns_server and not api.is_ip(remote_dns_doh_host) then
|
||||||
|
dns.hosts[remote_dns_doh_host] = remote_dns_server
|
||||||
|
end
|
||||||
|
_remote_dns.address = remote_dns_doh_url
|
||||||
|
_remote_dns.port = tonumber(remote_dns_port) or 443
|
||||||
|
other_type_dns_proto = "tcp"
|
||||||
|
other_type_dns_port = 53
|
||||||
|
end
|
||||||
|
|
||||||
table.insert(dns.servers, _remote_dns)
|
table.insert(dns.servers, _remote_dns)
|
||||||
table.insert(outbounds, 1, {
|
table.insert(outbounds, 1, {
|
||||||
@ -1301,6 +1306,9 @@ function gen_dns_config(var)
|
|||||||
local _direct_dns = {
|
local _direct_dns = {
|
||||||
_flag = "direct"
|
_flag = "direct"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
other_type_dns_proto = tonumber(direct_dns_port) or 53
|
||||||
|
other_type_dns_server = direct_dns_server
|
||||||
|
|
||||||
if direct_dns_udp_server then
|
if direct_dns_udp_server then
|
||||||
_direct_dns.address = direct_dns_udp_server
|
_direct_dns.address = direct_dns_udp_server
|
||||||
@ -1315,10 +1323,17 @@ function gen_dns_config(var)
|
|||||||
outboundTag = "direct"
|
outboundTag = "direct"
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if direct_dns_udp_server then
|
||||||
|
_direct_dns.address = direct_dns_udp_server
|
||||||
|
_direct_dns.port = tonumber(direct_dns_port) or 53
|
||||||
|
other_type_dns_proto = "udp"
|
||||||
|
end
|
||||||
|
|
||||||
if direct_dns_tcp_server then
|
if direct_dns_tcp_server then
|
||||||
_direct_dns.address = direct_dns_tcp_server:gsub("tcp://", "tcp+local://")
|
_direct_dns.address = direct_dns_tcp_server:gsub("tcp://", "tcp+local://")
|
||||||
_direct_dns.port = tonumber(direct_dns_port) or 53
|
_direct_dns.port = tonumber(direct_dns_port) or 53
|
||||||
|
other_type_dns_proto = "tcp"
|
||||||
end
|
end
|
||||||
|
|
||||||
if direct_dns_doh_url and direct_dns_doh_host then
|
if direct_dns_doh_url and direct_dns_doh_host then
|
||||||
@ -1327,12 +1342,10 @@ function gen_dns_config(var)
|
|||||||
end
|
end
|
||||||
_direct_dns.address = direct_dns_doh_url:gsub("https://", "https+local://")
|
_direct_dns.address = direct_dns_doh_url:gsub("https://", "https+local://")
|
||||||
_direct_dns.port = tonumber(direct_dns_port) or 443
|
_direct_dns.port = tonumber(direct_dns_port) or 443
|
||||||
|
other_type_dns_proto = "tcp"
|
||||||
|
other_type_dns_port = 53
|
||||||
end
|
end
|
||||||
|
|
||||||
tmp_dns_server = direct_dns_server
|
|
||||||
|
|
||||||
tmp_dns_port = direct_dns_port
|
|
||||||
|
|
||||||
table.insert(dns.servers, _direct_dns)
|
table.insert(dns.servers, _direct_dns)
|
||||||
|
|
||||||
table.insert(outbounds, 1, {
|
table.insert(outbounds, 1, {
|
||||||
@ -1364,7 +1377,7 @@ function gen_dns_config(var)
|
|||||||
protocol = "dokodemo-door",
|
protocol = "dokodemo-door",
|
||||||
tag = "dns-in",
|
tag = "dns-in",
|
||||||
settings = {
|
settings = {
|
||||||
address = tmp_dns_server or "1.1.1.1",
|
address = other_type_dns_server or "1.1.1.1",
|
||||||
port = 53,
|
port = 53,
|
||||||
network = "tcp,udp"
|
network = "tcp,udp"
|
||||||
}
|
}
|
||||||
@ -1374,9 +1387,9 @@ function gen_dns_config(var)
|
|||||||
tag = "dns-out",
|
tag = "dns-out",
|
||||||
protocol = "dns",
|
protocol = "dns",
|
||||||
settings = {
|
settings = {
|
||||||
address = tmp_dns_server or "1.1.1.1",
|
address = other_type_dns_server or "1.1.1.1",
|
||||||
port = tonumber(tmp_dns_port) or 53,
|
port = other_type_dns_port or 53,
|
||||||
network = tmp_dns_proto or "tcp",
|
network = other_type_dns_proto or "tcp",
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user