phpSPO icon indicating copy to clipboard operation
phpSPO copied to clipboard

Support of proxy

Open wihab01 opened this issue 6 years ago • 4 comments

As far as I have seen, the library does not support calls to SPO via proxy. Is it possible to use this library without modification from behind a firewall? Because of an urgent request I have solved it by modifying the library code and can provide a Pull Request if that is wished.

wihab01 avatar Jan 25 '18 15:01 wihab01

It also makes debugging easier because you can use Fiddler to inspect the traffic.

yani avatar Oct 18 '18 11:10 yani

@wihab01 I have an urgent request now too ;) Are you able to provide a pull request or send me your modified code as a whole by email. That would be great! Thanks in advance and have a good time.

crealistiques avatar Dec 29 '18 12:12 crealistiques

@crealistiques If you want to edit the library code you can add the following line to the curl init wrapper function in Requests.php:

curl_setopt($ch, CURLOPT_PROXY, '127.0.0.1:8888');

https://github.com/vgrem/phpSPO/blob/master/src/Runtime/Utilities/Requests.php#L94

yani avatar Dec 29 '18 12:12 yani

@wihab01 Perfect! That's all ;) Thanks alot!

crealistiques avatar Dec 29 '18 12:12 crealistiques