mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-02 15:03:56 +08:00
🍕 Sync 2026-08-16 23:43:42
This commit is contained in:
1 parent
cea9097c34
commit
4bf1fb0640
40 files changed
+2889
-144
No files matched your search
@@ -515,6 +515,12 @@ function gen_config_server(node)
|
||||
u.email = user.username
|
||||
u.auth = user.password
|
||||
end
|
||||
if node.protocol == "wireguard" then
|
||||
u.publicKey = user.wireguard_public_key
|
||||
u.preSharedKey = user.wireguard_pre_shared_key
|
||||
u.keepAlive = 0
|
||||
u.allowedIPs = user.allowed_ips
|
||||
end
|
||||
users[#users + 1] = u
|
||||
end
|
||||
end
|
||||
@@ -567,6 +573,14 @@ function gen_config_server(node)
|
||||
address = node.d_address,
|
||||
port = tonumber(node.d_port)
|
||||
}
|
||||
elseif node.protocol == "wireguard" then
|
||||
settings = {
|
||||
secretKey = node.wireguard_private_key,
|
||||
--address = node.wireguard_local_address,
|
||||
--noKernelTun = node.wireguard_system_interface ~= "1" and true or false,
|
||||
mtu = tonumber(node.wireguard_mtu or 1420),
|
||||
peers = users
|
||||
}
|
||||
end
|
||||
|
||||
if node.fallback and node.fallback == "1" then
|
||||
|
||||
Reference in new issue
Block a user