使用 ejabberd 进行文件传输



我有一个使用 ejabberd2 的聊天应用程序。现在,我需要通过聊天消息传输文件。我只是在ejabberd.cfg文件中配置mod_proxy65并打开端口7777.但是发送文件失败。

myejabberd.cfg设置

{mod_proxy65,  [
                  {ip, {118,132,178,95}},
                  {name, "SOCKS5 Bytestreams"},
                  {host, "proxy.amadoa.org"}
                 ]},

有人知道我如何在 ejabberd2 中启用mod_proxy65吗?我需要在这里安装任何其他模块吗?

非常感谢帮助。谢谢

大多数人将主机与主机名混淆 ejabberd 配置, hostname 是您应该提供公共 IP 或 www.domain.com 的地方,其中 host 是您提供给 ejabberd 服务器的逻辑名称; 它默认为 proxy.domain.com,

此外,IP地址

是Ejabberd侦听的接口的IP,因此,它应该是本地地址。Llike:192.168.1.10监听一个接口,0.0.0.0监听所有接口,127.0.0.1只允许本地文件传输。

对我有用的配置示例:

{mod_proxy65,  [
                  {host, "proxy.domain.com"}, %% defines the Jabber ID of service. If not specified, Jabber ID will be hostname of  the virtual host with the prefix 'proxy'.
                  %%{ip, {192,168,1,90}}, %% this line works, or use the below line
                  {ip, {0,0,0,0}}, %% 127.0.0.1 by default, make it 0.0.0.0 to listen on all interfaces, or the ip of specific interface
                  {hostname, "www.domain.com"}, % useful service run behind a NAT. default is value of ip option. Ex: "proxy.mydomain.org", "200.150.100.50"
                  {port, 7777}, %% Default, we don't need to add
                  {access, all}, %% Default, we don't need to add
                  {shaper, c2s_shaper}
                 ]},

最新更新