-
Notifications
You must be signed in to change notification settings - Fork 1
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
[Bug]: PHP not installed behind corporate proxy #888
Comments
I am currently looking into proxy support for Herd but it's a new topic to me and wonder what your typical proxy setup is. When you add information about your proxy, what do you add in other apps? |
Hi @sschlein, A corporate proxy usually consists of a .pac script that indicates which urls go direct and which urls are proxied. Normally in other applications it is configured as an IP and port pair, for example, IP_OF_PROXY:PORT. Composer gets it from system variables called npm from a
git of a
Here is a manual for setting up axios for proxy use: https://brightdata.com/blog/how-tos/axios-proxy |
Also, please be aware, it is not just proxies, many many organisations now use ZScalers, which perform man-in-the-middle decrypting and re-encrypting of HTTPS traffic, and require a custom Root CA certificate to be used. NPM/Node uses the NODE_EXTRA_CA_CERTS environment variable in Windows, however this is not being recognised by the Herd instance of Axios. I have successfully got this working in non javascript places in Herd by updating the php.ini openssl.cafile= key in the default version of PHP used by Herd, and other applications. However, for proxies, many other applications, such as Composer on Windows, use the HTTP_PROXY and HTTPS_PROXY environment variables, so it may be an option to look for those and apply them to standardise the setup for people? |
Actually, it looks like Herd is respecting HTTP_PROXY. When I have an HTTP_PROXY configured Herd is unable to connect the HerdHelper on http://127.0.0.1:5000, but when I remove the HTTP_PROXY environment variable and restart Herd it IS able to connect. |
Further, it does appear that Herd is respecting the NODE_TLS_REJECT_UNAUTHORIZED but not NODE_EXTRA_CA_CERTS. |
I am also interested in a fix for this as this is what is keeping me from switching to Herd from Laragon. My company uses Netskope, which is man-in-the-middle as mentioned above. For me, I have to point to our NS .pem certificate. I had this issue with composer, previously, and I had to add the PEM certificate in the cafile value in php.ini to get it to work. One issue with this that I would run into is that if I added the PEM certificate in the php.ini file, it did work for intercepted traffic, but for traffic that was bypassed (whitelisted), injecting the certificate caused it to fail for those resources. For Herd, I can't use this workaround anyway since the issue that is caused is downloading PHP to begin with. Interesting with Herd or Mac and Windows... I have the NS issue with Windows version and not Mac. I have not done logging at all, but it appears that they might not download PHP from the same location? Same network blocks traffic when downloading PHP on Windows version, but not on Mac version. |
Platform
Windows
Operating system version
Windows 10
System architecture
Windows
Herd Version
1.9.0
PHP Version
No response
Bug description
Being behind a corporate proxy, PHP is not installed on the first run. There is no option to configure one.
Steps to reproduce
No response
Relevant log output
%USERPROFILE%\AppData\Roaming\Herd\logs\main.log
The text was updated successfully, but these errors were encountered: