Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proxy #10

Open
baturox opened this issue Oct 20, 2019 · 6 comments
Open

Proxy #10

baturox opened this issue Oct 20, 2019 · 6 comments

Comments

@baturox
Copy link

baturox commented Oct 20, 2019

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
Copy link
Collaborator

Norgul commented Oct 20, 2019

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
Copy link
Author

baturox commented Oct 20, 2019

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
Copy link
Collaborator

Norgul commented Oct 20, 2019

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

@mucahidkincir
Copy link

Is there any chance to set proxy ?

@Norgul
Copy link
Collaborator

Norgul commented Nov 23, 2019

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
Copy link
Collaborator

Norgul commented Nov 24, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants