Как настроить ошибку http_upload для просодии

#port #prosody-im #http-upload

#порт #prosody-im #http-загрузка

Вопрос:

Я использую conversation в качестве клиента Android для сервера xmpp. Я использовал prosody для сервера и купил домен для прямого ip. Приложение отлично работает с текстовыми сообщениями, но выдает ошибку «не удается подключиться к серверу».

я попробовал отдельный компонент для http_upload, хотя я использую версию 0.10, которая почти выполняет работу по умолчанию, но по-прежнему безуспешно

 admins = {  }

plugin_paths = {"/usr/lib/prosody/modules/","/opt/prosody-modules"}

modules_enabled = {

-- Generally required
"roster"; -- Allow users to have a roster. Recommended ;)
"saslauth"; -- Authentication for clients and servers. Recommended if you 
 want to log in.
"tls"; -- Add support for secure TLS on c2s/s2s connections
"dialback"; -- s2s dialback support
"disco"; -- Service discovery
"http_upload";
"http_avatar";

-- Not essential, but recommended
"carbons"; -- Keep multiple clients in sync
"pep"; -- Enables users to publish their avatar, mood, activity, playing music and more
"private"; -- Private XML storage (for room bookmarks, etc.)
"blocklist"; -- Allow users to block communications with other users
"vcard4"; -- User profiles (stored in PEP)
"vcard_legacy"; -- Conversion between legacy vCard and PEP Avatar, vcard

-- Nice to have
"version"; -- Replies to server version requests
"uptime"; -- Report how long server has been running
"time"; -- Let others know the time here on this server
"ping"; -- Replies to XMPP pings with pongs
"register"; -- Allow users to register on this server using a client and change passwords
"mam"; -- Store messages in an archive and allow users to access it

"csi"; -- XEP-0352: Client State Indication (community module)
--"csi_simple"; -- Simple Mobile optimizations


-- HTTP modules
"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"
--"websocket"; -- XMPP over WebSockets
"http_files"; -- Serve static files from a directory over HTTP

-- Other specific functionality
--"limits"; -- Enable bandwidth limiting for XMPP connections
--"groups"; -- Shared roster support
--"server_contact_info"; -- Publish contact information for this service
--"announce"; -- Send announcement to all online users
--"welcome"; -- Welcome users who register accounts
--"watchregistrations"; -- Alert admins of registrations
--"motd"; -- Send a message to users when they log in
--"legacyauth"; -- Legacy authentication. Only used by some old clients and bots.
 "smacks"; -- XEP-0198: Stream Management to survive small network outages (community module)
"smacks_offline"; -- XEP-0198: Stream Management to survive small network outages (community module)
"carbons"; -- XEP-0280: Message Carbons syncs between desktop and mobile client (community module)
"cloud_notify"; -- XEP-0357: Push Notifications for Play Store version (community module)
"proxy65"; -- Enables a file transfer proxy service which clients behind NAT can use
}

 modules_disabled = {
 -- "offline"; -- Store offline messages
 -- "c2s"; -- Handle client connections
 "s2s"; -- Handle server-to-server connections
 -- "posix"; -- POSIX functionality, sends server to background, enables 
 syslog, etc.
 }

 allow_registration = true

 s2s_require_encryption = true

 s2s_secure_auth = true

 -- Required for init scripts and prosodyctl
 pidfile = "/var/run/prosody/prosody.pid"

 authentication = "internal_hashed"

ssl = {
key = "/var/lib/prosody/instacom.com.key";
certificate = "/var/lib/prosody/instacom.com.crt";
 }


 archive_expires_after = "1w" -- Remove archived messages after 1 week

log = {
info = "/var/log/prosody/prosody.log"; -- Change 'info' to 'debug' for 
verbose logging
error = "/var/log/prosody/prosody.err";
}
certificates = "/var/lib/prosody/instacom.com.crt"



----------- Virtual hosts -----------


VirtualHost "instacom.com"

ssl = {
        key = "/var/lib/prosody/instacom.com.key";
        certificate = "/var/lib/prosody/instacom.com.crt";
 }
  

Ответ №1:

Prosody 0.10 использует модуль http_files, который покрывает всю http-чушь. Поэтому, удалив эти модули http_upload, я смог справиться с этим.

для документации по prosody… https://prosody.im/doc

документация для prosody Http modhttps://modules.prosody.im /
https://modules.prosody.im/mod_http_upload.html