xmpp-php
xmpp-php copied to clipboard
Proxy
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 ?
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
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
I have never tried it so far. Let me test it out. I'll get back at you if I manage
Is there any chance to set proxy ?
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?
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