#Http Request Set Proxy Which Portforwarded

5 messages · Page 1 of 1 (latest)

red hedge
#

Hello , I want to use proxy for sending request
I use ssh for portfowarding that server in my port 8080
And When i use


Http::withOptions(['proxy' => 'http://localhost:8080'])->get('...')

Response :
Failed to connect to 127.0.0.1 port 8080 after 0 ms: Connection refused

pulsar zealot
#

You say you use SSH portforwarding, which is something different than using a proxy with the HTTP client iirc.
What is the actual setup, what are you trying to achieve?

red hedge
#

i use ssh for portforward in my own local , localhost:8080
use socks5 to move request on server
its already worked in my os

#

i think i can use that way on laravel

#

socks5://localhost:8080 worked already in my ubuntu , but i want now actually only use proxy when i request that api thats why i want to use proxy on http withoptions