mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-01 03:05:13 +08:00
🍓 Sync 2026-06-05 21:57:56
This commit is contained in:
1 parent
7489d524d6
commit
6a212a9bb2
19 files changed
+133
-122
No files matched your search
@@ -261,21 +261,22 @@ function gen_outbound(flag, node, tag, proxy_table)
|
||||
local finalmask = {}
|
||||
local TP = node.transport
|
||||
if TP == "mkcp" then
|
||||
local map = {none = "none", srtp = "header-srtp", utp = "header-utp", ["wechat-video"] = "header-wechat",
|
||||
dtls = "header-dtls", wireguard = "header-wireguard", dns = "header-dns"}
|
||||
local map = {none = "none", srtp = "srtp", utp = "utp", ["wechat-video"] = "wechat",
|
||||
dtls = "dtls", wireguard = "wireguard", dns = "dns"}
|
||||
local udp = {}
|
||||
if node.mkcp_guise and node.mkcp_guise ~= "none" then
|
||||
local g = { type = map[node.mkcp_guise] }
|
||||
local g = { type = "mkcp-legacy" }
|
||||
g.settings = { header = map[node.mkcp_guise] }
|
||||
if node.mkcp_guise == "dns" and node.mkcp_domain and node.mkcp_domain ~= "" then
|
||||
g.settings = { domain = node.mkcp_domain }
|
||||
g.settings.value = node.mkcp_domain
|
||||
end
|
||||
udp[#udp+1] = g
|
||||
end
|
||||
local c = { type = (node.mkcp_seed and node.mkcp_seed ~= "") and "mkcp-aes128gcm" or "mkcp-original" }
|
||||
local s = { type = "mkcp-legacy" }
|
||||
if node.mkcp_seed and node.mkcp_seed ~= "" then
|
||||
c.settings = { password = node.mkcp_seed }
|
||||
s.settings = { value = node.mkcp_seed }
|
||||
end
|
||||
udp[#udp+1] = c
|
||||
udp[#udp+1] = s
|
||||
finalmask.udp = udp
|
||||
elseif TP == "hysteria" then
|
||||
local udp = {}
|
||||
@@ -720,21 +721,22 @@ function gen_config_server(node)
|
||||
finalmask = (function()
|
||||
local finalmask = {}
|
||||
if node.transport == "mkcp" then
|
||||
local map = {none = "none", srtp = "header-srtp", utp = "header-utp", ["wechat-video"] = "header-wechat",
|
||||
dtls = "header-dtls", wireguard = "header-wireguard", dns = "header-dns"}
|
||||
local map = {none = "none", srtp = "srtp", utp = "utp", ["wechat-video"] = "wechat",
|
||||
dtls = "dtls", wireguard = "wireguard", dns = "dns"}
|
||||
local udp = {}
|
||||
if node.mkcp_guise and node.mkcp_guise ~= "none" then
|
||||
local g = { type = map[node.mkcp_guise] }
|
||||
local g = { type = "mkcp-legacy" }
|
||||
g.settings = { header = map[node.mkcp_guise] }
|
||||
if node.mkcp_guise == "dns" and node.mkcp_domain and node.mkcp_domain ~= "" then
|
||||
g.settings = { domain = node.mkcp_domain }
|
||||
g.settings.value = node.mkcp_domain
|
||||
end
|
||||
udp[#udp+1] = g
|
||||
end
|
||||
local c = { type = (node.mkcp_seed and node.mkcp_seed ~= "") and "mkcp-aes128gcm" or "mkcp-original" }
|
||||
local s = { type = "mkcp-legacy" }
|
||||
if node.mkcp_seed and node.mkcp_seed ~= "" then
|
||||
c.settings = { password = node.mkcp_seed }
|
||||
s.settings = { value = node.mkcp_seed }
|
||||
end
|
||||
udp[#udp+1] = c
|
||||
udp[#udp+1] = s
|
||||
finalmask.udp = udp
|
||||
elseif node.transport == "hysteria" then
|
||||
local udp = {}
|
||||
|
||||
Reference in new issue
Block a user