Disabling direct s2s for alpha.4

This commit is contained in:
John Livingston 2023-05-25 18:22:55 +02:00
parent 3b8042ebe2
commit fddf68a0cc
No known key found for this signature in database
GPG Key ID: B17B5640CE66CDBC
2 changed files with 8 additions and 6 deletions

View File

@ -17,6 +17,7 @@ TODO: it seems that in some case A->B can be Websocket, and B->A direct S2S. Che
TODO?: always generate self-signed certificates. Could be used for outgoing s2s?
TODO: check in the diagnostic tool that Prosody is >=0.12
TODO?: allow directs2s on one side and websocket on the other? (currently disallowed by compatibleRemoteAuthenticatedConnectionEnabled)
TODO: alpha.4 version force Websocket S2S when available, even if s2s is possible. Revert this before releasing.
### Minor changes and fixes

View File

@ -10,12 +10,13 @@ function discover_websocket_s2s(event)
local to_host = event.to_host;
module:log("debug", "Searching websocket s2s for remote host %s", to_host);
local f_s2s = io.open(path.join(server_infos_dir, to_host, 's2s'), "r");
if f_s2s ~= nil then
io.close(f_s2s);
module:log("debug", "Remote host is a known Peertube %s that has s2s activated, we will let legacy s2s module handle the connection", to_host);
return;
end
-- FIXME: this was commented for the 6.4.0-alpha4, to test ws s2s. Revert before releasing.
-- local f_s2s = io.open(path.join(server_infos_dir, to_host, 's2s'), "r");
-- if f_s2s ~= nil then
-- io.close(f_s2s);
-- module:log("debug", "Remote host is a known Peertube %s that has s2s activated, we will let legacy s2s module handle the connection", to_host);
-- return;
-- end
local f_ws_proxy = io.open(path.join(server_infos_dir, to_host, 'ws-s2s'), "r");
if f_ws_proxy == nil then