這里寫問題具體描述
'http' => array(
'proxy' => 'tcp://192.168.0.2:3128', //這里設(shè)置你要使用的代理ip及端口號
'request_fulluri' => true,
'header' => "Proxy-Authorization: Basic $auth",
),
想這樣使用代理ip
$client = new AsyncTcpConnection('ws://0.0.0.0:2566');
$client->headers = [
'http' => [
'request_fulluri' => true,
'proxy' => 'ip:port',
'header' => [
'Proxy-Switch-Ip' => 'yes',
'Proxy-Authorization' => 'Basic ' . base64_encode('user:pass')
],
]
];
這樣使用代理ip無效,請教下怎樣設(shè)置