How to use

Looking for guidance on how to use Could someone provide step-by-step instructions or tips for utilizing this script effectively?

While troubleshooting, you may want to analyze the connection status right from the beginning, when the connection began, profiles and web category added, headers received/sent by the proxy server, error or warning for the connection, etc.
But getting complete connection details just by navigating native logs is not possible, because the logs are written in real time as the connections are made.

For example, if you are requesting and then log will be not written on the basis of connection, but on the basis of how the endpoint server response, which means you’ll need to hunt for complete connection details.

Getting complete connection log in a corporate network where they have hundreds of users is an impossible task and can lead to incomplete analysis for the problem. can be used to get complete connection details.
Using the client id from logs will provide complete connection details.
Below are steps on how to use

To use you are first required to get your connection’s client id.
Client id can be extracted from the response headers section in browsers network tab.
(Note: we are assuming that you know how to open developer tools in a browser)

Also, client id can be extracted from SafeSquid’s native logs

Now using the client id, you can get complete connection details.
In your proxy server execute below command <client id of the connection> | less

In the above command is a bash script which gets complete connection details, client id of your connection and | less the output of the is piped to less which is a paging utility for better command output, search facility and overall controls.

By default, uses the log file safesquid.log from /var/log/safesquid/native folder.
safesquid.log is symbolic or soft link to the latest log file generated in native folder.

In case you need to get the output for from an old log files, use below syntax. <client id of the connection> <log file to use> | less

Below is an example to get for the log file from July 14 20220712205401-safesquid.log.


Output of can be saved and shared when sending support emails, for support technicians have better understanding of your problems.
To save the output of to a file, use redirection. <client id of the connection> > find_client_id_<client_id>_output.txt

or <client id of the connection> <log file to use> > find_client_id_<client_id>_output.txt

Output of above command will not be visible on terminal but will be saved to find_client_id_<client_id>_output.txt