Is it possible to route all traffic through shadowsocks? #482
-
Hi So I am developing a php application and need to access some blocked APIs/scrape some pages from the php local server, on my pc. In the browser, I can use shadowsocks to access these pages/endpoints, however, php seems to be just using my standard connection, rather than the shadowsocks connection. Here is an example of my config.json
So my questions are:
stream_context_set_default([
'http'=>[
'proxy'=>'proxy-host:proxy-port',
'header'=>'Proxy-Authorization: Basic '.base64_encode('your-username:your-password')
]
]); For example, in the Ubuntu settings, I use the local address & port and that works...but here, should I put the server address:port or the local ones? I tried both, but neither worked (I didn't expect it would work that easily anyway...). Anyway, I don't want to write too much. I have also looked up PHP/Apache/Ubuntu proxy settings to try and get things working, but I guess I don't know if Shadowsocks works like a regular proxy...so don't know whether these approaches would work anyway If someone has any advice for how I could get this working, I'd really appreciate it. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
With your configuration, |
Beta Was this translation helpful? Give feedback.
With your configuration,
sslocal
serves SOCKS5 on127.0.0.2:54321
. You could just set it as SOCKS5 proxy in your PHP environment.