Ad Widget

Collapse

Send messages via proxy

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • watto
    Member
    • Jun 2008
    • 47

    #1

    Send messages via proxy

    Hi.
    How can i use ZABBIX to send jabber messages via http proxy?
    Thanks.
  • watto
    Member
    • Jun 2008
    • 47

    #2
    I'm test this, but its not works:

    prtunnel -H 192.168.191.52 5222 jabber.ru 5222
    echo "test" | sendxmpp -j 127.0.0.1:5222 -u user -p pass [email protected]

    Result:
    Waiting for connection to port 5222...
    Connection from 127.0.0.1 (port 56577) accepted
    Connected to HTTP proxy 192.168.191.52:8080
    HTTP Error: HTTP/1.1 502
    Error: Unable to connect to remote host jabber.ru (port 5222)

    Use of uninitialized value in string eq at /usr/local/bin/sendxmpp line 368.
    Error 'Connect': [HASH(0x8659410)]

    Any ideas?
    FreeBSD 7.0, ZABBIX 1.6.

    Comment

    • BDiE8VNy
      Senior Member
      • Apr 2010
      • 680

      #3
      For me it works after a slight modification of sendxmpp:

      Code:
      *** sendxmpp.orig     2012-10-28 13:48:19.000000000 +0100
      --- sendxmpp    2012-12-05 18:56:16.780347154 +0100
      ***************
      *** 26,29 ****
      --- 26,31 ----
        use open ':std';
        
      + $ENV{'https_proxy'} = 'http://example.com:8080';
      + 
        # subroutines decls
        sub xmpp_login($$$$$$$$$$$);
      ***************
      *** 329,333 ****
                      ssl_ca_path             => $tls_ca_path,
                      ssl             => $ssl,
      !               connectiontype  => 'tcpip',
                      componentname   => $comp
              };
      --- 331,335 ----
                      ssl_ca_path             => $tls_ca_path,
                      ssl             => $ssl,
      !               connectiontype  => 'http',
                      componentname   => $comp
              };
      Beside this there is a feature request (ZBXNEXT-1415) for implementing native HTTP-Proxy support into ZABBIX.

      Comment

      Working...