mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-29 12:45:13 +08:00
🛸 Sync 2026-08-19 20:38:21
This commit is contained in:
1 parent
7549efdb5e
commit
7cb3d8fcff
55 files changed
+403
-252
No files matched your search
@@ -567,11 +567,11 @@ function gen_config_server(node)
|
||||
version = 2,
|
||||
users = users
|
||||
}
|
||||
elseif node.protocol == "dokodemo-door" then
|
||||
elseif node.protocol == "tunnel" then
|
||||
settings = {
|
||||
network = node.d_protocol,
|
||||
address = node.d_address,
|
||||
port = tonumber(node.d_port)
|
||||
allowedNetwork = node.d_protocol,
|
||||
rewriteAddress = node.d_address,
|
||||
rewritePort = tonumber(node.d_port)
|
||||
}
|
||||
elseif node.protocol == "wireguard" then
|
||||
settings = {
|
||||
@@ -1231,8 +1231,8 @@ function gen_config(var)
|
||||
tag = in_tag,
|
||||
listen = "127.0.0.1",
|
||||
port = new_port,
|
||||
protocol = "dokodemo-door",
|
||||
settings = {network = "tcp,udp", address = to_node.address, port = tonumber(to_node.port)}
|
||||
protocol = "tunnel",
|
||||
settings = {allowedNetwork = "tcp,udp", rewriteAddress = to_node.address, rewritePort = tonumber(to_node.port)}
|
||||
})
|
||||
if to_node.tls_serverName == nil then
|
||||
to_node.tls_serverName = to_node.address
|
||||
@@ -1587,8 +1587,8 @@ function gen_config(var)
|
||||
|
||||
if tcp_redir_port or udp_redir_port then
|
||||
local inbound = {
|
||||
protocol = "dokodemo-door",
|
||||
settings = {network = "tcp,udp", followRedirect = true},
|
||||
protocol = "tunnel",
|
||||
settings = {allowedNetwork = "tcp,udp", followRedirect = true},
|
||||
streamSettings = {sockopt = {tproxy = "tproxy"}},
|
||||
sniffing = {
|
||||
enabled = (xray_settings.sniffing_override_dest == "1") or (node and node.protocol == "_shunt") or false
|
||||
@@ -1614,7 +1614,7 @@ function gen_config(var)
|
||||
if tcp_redir_port then
|
||||
local tcp_inbound = api.clone(inbound)
|
||||
tcp_inbound.tag = "tcp_redir"
|
||||
tcp_inbound.settings.network = "tcp"
|
||||
tcp_inbound.settings.allowedNetwork = "tcp"
|
||||
tcp_inbound.port = tonumber(tcp_redir_port)
|
||||
tcp_inbound.streamSettings.sockopt.tproxy = tcp_proxy_way
|
||||
table.insert(inbounds, tcp_inbound)
|
||||
@@ -1623,7 +1623,7 @@ function gen_config(var)
|
||||
if udp_redir_port then
|
||||
local udp_inbound = api.clone(inbound)
|
||||
udp_inbound.tag = "udp_redir"
|
||||
udp_inbound.settings.network = "udp"
|
||||
udp_inbound.settings.allowedNetwork = "udp"
|
||||
udp_inbound.port = tonumber(udp_redir_port)
|
||||
table.insert(inbounds, udp_inbound)
|
||||
end
|
||||
@@ -1790,11 +1790,10 @@ function gen_config(var)
|
||||
table.insert(inbounds, {
|
||||
listen = "127.0.0.1",
|
||||
port = tonumber(dns_listen_port),
|
||||
protocol = "dokodemo-door",
|
||||
protocol = "tunnel",
|
||||
tag = "dns-in",
|
||||
settings = {
|
||||
address = "0.0.0.0",
|
||||
network = "tcp,udp"
|
||||
allowedNetwork = "tcp,udp"
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user