Skip to content

An example http proxy configuration to test applications against

Notifications You must be signed in to change notification settings

livingdocsIO/squid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

squid as an http proxy

This repo serves as an example about how to set up squid in development to test applications against it.

Example

To start the docker container that listens on port 3128. All requests are logged to stdout. So you can use your regular tools to show them.

$ docker run -d -p 3128:3128 --name squid livingdocs/squid
$ curl -x http://localhost:3128 -i https://api.ipify.org?format=json

$ docker logs squid
2019/03/07 10:40:38| ... some squid startup logs
2019/03/07 10:40:43|    178 172.17.0.1 TCP_TUNNEL/200 4262 CONNECT google.com:443 - HIER_DIRECT/google.com -

To run your application against squid

HTTP_PROXY=http://localhost:3128 HTTPS_PROXY=http://localhost:3128 yourscript

With curl

curl -x http://localhost:3128 -i https://api.ipify.org?format=json

About

An example http proxy configuration to test applications against

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published