xmpp-php icon indicating copy to clipboard operation
xmpp-php copied to clipboard

Proxy

Open baturox opened this issue 5 years ago • 6 comments

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 ?

baturox avatar Oct 20 '19 19:10 baturox

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

Norgul avatar Oct 20 '19 19:10 Norgul

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

baturox avatar Oct 20 '19 19:10 baturox

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

Norgul avatar Oct 20 '19 20:10 Norgul

Is there any chance to set proxy ?

mucahidkincir avatar Nov 23 '19 00:11 mucahidkincir

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 avatar Nov 23 '19 09:11 Norgul

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

Norgul avatar Nov 24 '19 09:11 Norgul