mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-10-31 16:25:13 +08:00
update 2026-09-02 23:49:44
This commit is contained in:
1 parent
86b8972e8e
commit
beae9d285e
1991 files changed
+1523711
-147
No files matched your search
@@ -667,6 +667,19 @@ function gen_outbound(flag, node, tag, proxy_table)
|
||||
}
|
||||
end
|
||||
|
||||
if node.protocol == "snell" then
|
||||
protocol_table = {
|
||||
version = tonumber(node.snell_version),
|
||||
psk = node.snell_psk,
|
||||
userkey = node.password,
|
||||
reuse = node.snell_reuse == "1" and true or false,
|
||||
network = node.snell_network,
|
||||
obfs_mode = node.snell_version == "4" and node.snell_obfs_mode or nil,
|
||||
obfs_host = node.snell_version == "4" and node.snell_obfs_host or nil,
|
||||
mode = node.snell_version == "6" and node.snell_mode or nil,
|
||||
}
|
||||
end
|
||||
|
||||
if protocol_table then
|
||||
for key, value in pairs(protocol_table) do
|
||||
result[key] = value
|
||||
@@ -823,6 +836,10 @@ function gen_config_server(node)
|
||||
u.allowed_ips = user.allowed_ips or {}
|
||||
u.persistent_keepalive_interval = 0
|
||||
end
|
||||
if node.protocol == "snell" then
|
||||
u.name = user.username
|
||||
u.userkey = user.password
|
||||
end
|
||||
users[#users + 1] = u
|
||||
end
|
||||
end
|
||||
@@ -1003,6 +1020,16 @@ function gen_config_server(node)
|
||||
end
|
||||
end
|
||||
|
||||
if node.protocol == "snell" then
|
||||
protocol_table = {
|
||||
users = users,
|
||||
version = tonumber(node.snell_version),
|
||||
psk = node.snell_psk,
|
||||
obfs_mode = node.snell_version == "5" and node.snell_obfs_mode or nil,
|
||||
mode = node.snell_version == "6" and node.snell_mode or nil,
|
||||
}
|
||||
end
|
||||
|
||||
if node.protocol == "direct" then
|
||||
protocol_table = {
|
||||
network = (node.d_protocol ~= "TCP,UDP") and node.d_protocol or nil,
|
||||
|
||||
Reference in new issue
Block a user