Start the Squid proxy and use the curl command-line tool to test a connection through the proxy.
To test the proxy connection:
-
Start Squid in the foreground:
sudo squid -N -d 1
-
Verify Squid is listening on port 3128:
sudo lsof -iTCP:3128 -sTCP:LISTEN
You should see the following output:squid <pid> nobody TCP 127.0.0.1:3128 (LISTEN)
-
Enter the following command:
curl -v -x http://127.0.0.1:3128 <server-address>
-
Replace http://127.0.0.1:3128 with your proxy URL if it
differs.
Note: Remember to replace other instances of the proxy URL if it differs from the example provided, such as in Setting up a Proxy for Desktop Sync and Configuring a Squid Proxy on Mac.
- Replace <server-address> with the URL for the server where you access Alfresco content, for example, https://alfresco.mycompany.com.
-
Check for a successful output:
* Connected to 127.0.0.1:3128 * Establish HTTP proxy tunnel to <server-name>:<server-port> HTTP/1.1 200 Connection established
-
Enter the following command to monitor requests through the proxy:
sudo tail -f /opt/homebrew/var/logs/squid/access.log
-
Make sure that you have a successful connection that confirms your server, for
example:
TCP_TUNNEL/200 CONNECT <server-name>:<server-port>
where <server-address> is the URL for the server where you access Alfresco content, and <server-port> is the port number for the same server.
The proxy is working correctly. -
If the proxy is not working correctly, you may see one of the following example
log entries:
TCP_MISS/200 GET http://example.com/ TCP_DENIED/403 GET http://blocked.com/
Check the configuration steps again and re-test the connection.