0

我正在为 xmpp 服务器使用一个 android 客户端。我已经为服务器使用了韵律,并购买了一个域来引导 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";
 }
4

1 回答 1

0

Prosody 0.10+ 使用 http_files 模块,它涵盖了所有的 http 废话。因此,通过删除该 http_upload 模块,我能够解决这个问题。

对于韵律文档... https://prosody.im/doc

韵律文档http://modules.prosody.im/ https://modules.prosody.im/mod_http_upload.html

于 2019-04-29T07:02:50.853 回答