xmppo / xmpp-php

PHP client library for XMPP (Jabber) protocol
https://github.com/xmppo/xmpp-php
MIT License
45 stars 23 forks source link

Proxy #10

Open baturox opened 4 years ago

baturox commented 4 years ago

I can't set proxy on this function stream_socket_client; My Code (Socket.php):

$context = stream_context_create(array(
            'http' => array(
                'timeout' => 5,
                'proxy' => 127.0.0.1:8080,
                'request_fulluri' => true
            ),
            'ssl' => array(
                'SNI_enabled' => false
            )
        ));

$this->connection = stream_socket_client($options->fullSocketAddress(), $errno, $errstr, 5, STREAM_CLIENT_CONNECT, $context);

Is there any chance to set proxy ?

Norgul commented 4 years ago

Hello @baturox

what exactly are you trying to accomplish? What errors are you getting? It would help me if I could know the wider picture.

Thanks

baturox commented 4 years ago

Is there any way to set a proxy on connection ? I can't set $context in stream_socket_client, I don't know why but it's not work

Norgul commented 4 years ago

I have never tried it so far. Let me test it out. I'll get back at you if I manage

mucahidkincir commented 4 years ago

Is there any chance to set proxy ?

Norgul commented 4 years ago

Sorry guys, I've had no time to deal with it. Can you give me a test environment, proxy and credentials so I have somewhere to test it out?

Norgul commented 4 years ago

When I test it out with your options everything still works, but I guess it doesn't get through the proxy. I get no error though. If you can provide me with more info I could resolve it.

Thanks