{"id":28966668,"url":"https://github.com/pactflow/pact-broker-proxy-demo","last_synced_at":"2026-02-10T22:35:13.817Z","repository":{"id":277455941,"uuid":"632716254","full_name":"pactflow/pact-broker-proxy-demo","owner":"pactflow","description":"This repository is used to demonstrate usage of PactFlow/Pact Broker with an http proxy and to assist in troubleshooting issues","archived":false,"fork":false,"pushed_at":"2025-02-14T01:42:43.000Z","size":4,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-06-24T13:04:12.631Z","etag":null,"topics":["example"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pactflow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-26T01:38:59.000Z","updated_at":"2025-02-21T00:51:13.000Z","dependencies_parsed_at":"2025-02-14T02:40:44.042Z","dependency_job_id":"48bb62e4-1718-4aec-bdd2-c8e01f843af6","html_url":"https://github.com/pactflow/pact-broker-proxy-demo","commit_stats":null,"previous_names":["pactflow/pact-broker-proxy-demo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pactflow/pact-broker-proxy-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pactflow%2Fpact-broker-proxy-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pactflow%2Fpact-broker-proxy-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pactflow%2Fpact-broker-proxy-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pactflow%2Fpact-broker-proxy-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pactflow","download_url":"https://codeload.github.com/pactflow/pact-broker-proxy-demo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pactflow%2Fpact-broker-proxy-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29319692,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T20:44:44.282Z","status":"ssl_error","status_checked_at":"2026-02-10T20:44:43.393Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["example"],"created_at":"2025-06-24T07:40:45.231Z","updated_at":"2026-02-10T22:35:13.809Z","avatar_url":"https://github.com/pactflow.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pact Broker with Proxy\n\nThis repo is for reproducing issues with http proxies and proxy auth. It contains a docker-compose.yml file with a squid proxy container and a Pact Broker container.\nIt uses the OSS Pact Broker instead of PactFlow so that it can be run without requiring a licence file.\n\n## Instructions for use\n\n```\ndocker compose up\n```\n\n\n### Publish with pact-cli Docker container using Ruby 3\n\n```\nexport PACT_BROKER_BASE_URL=http://pact-broker:9292\nexport http_proxy=http://test:test@127.0.0.1:8080\n\ndocker run --rm \\\n--network=\"host\" \\\n -w ${PWD} \\\n -v ${PWD}:${PWD} \\\n -e PACT_BROKER_BASE_URL \\\n -e http_proxy \\\n  pactfoundation/pact-cli:latest \\\n  publish \\\n  ${PWD}/example-pact.json \\\n  --consumer-app-version fake-git-sha-for-demo-$(date +%s) \\\n  --verbose\n```\n\nThis works.\n\n```\nopening connection to 127.0.0.1:8080...\nopened\n\u003c- \"GET http://pact-broker:9292/? HTTP/1.1\\r\\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\\r\\nAccept: application/hal+json\\r\\nUser-Agent: Ruby\\r\\nProxy-Authorization: [redacted]\\r\\n\"\n-\u003e \"HTTP/1.1 200 OK\\r\\n\"\n-\u003e \"Vary: Accept\\r\\n\"\n-\u003e \"Content-Type: application/hal+json;charset=utf-8\\r\\n\"\n-\u003e \"Date: Wed, 26 Apr 2023 01:29:38 GMT\\r\\n\"\n-\u003e \"Server: Webmachine-Ruby/1.6.0 Rack/1.3\\r\\n\"\n-\u003e \"X-Pact-Broker-Version: 2.106.0\\r\\n\"\n-\u003e \"X-Content-Type-Options: nosniff\\r\\n\"\n-\u003e \"Content-Length: 4356\\r\\n\"\n-\u003e \"X-Cache: MISS from 44f92f9a9dc8\\r\\n\"\n-\u003e \"X-Cache-Lookup: MISS from 44f92f9a9dc8:3128\\r\\n\"\n-\u003e \"Via: 1.1 44f92f9a9dc8 (squid/5.7)\\r\\n\"\n-\u003e \"Connection: keep-alive\\r\\n\"\n-\u003e \"\\r\\n\"\n```\n\n\n### Publish with pact-ruby-standalone container using Ruby 2.2\n\n```\ncurl -fsSL https://raw.githubusercontent.com/pact-foundation/pact-ruby-standalone/master/install.sh | bash\n\nexport PACT_BROKER_BASE_URL=http://pact-broker:9292\nexport http_proxy=http://test:test@127.0.0.1:8080\n\npact/bin/pact-broker publish example-pact.json --consumer-app-version fake-git-sha-for-demo-$(date +%s) --verbose\n\n```\n\nThis does not work.\n\n```\nopening connection to 127.0.0.1:8080...\nopened\n\u003c- \"GET http://pact-broker:9292/? HTTP/1.1\\r\\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\\r\\nAccept: application/hal+json\\r\\nUser-Agent: Ruby\\r\\nHost: pact-broker:9292\\r\\n\\r\\n\"\n-\u003e \"HTTP/1.1 407 Proxy Authentication Required\\r\\n\"\n-\u003e \"Server: squid/5.7\\r\\n\"\n-\u003e \"Mime-Version: 1.0\\r\\n\"\n-\u003e \"Date: Wed, 26 Apr 2023 01:35:44 GMT\\r\\n\"\n-\u003e \"Content-Type: text/html;charset=utf-8\\r\\n\"\n-\u003e \"Content-Length: 3595\\r\\n\"\n-\u003e \"X-Squid-Error: ERR_CACHE_ACCESS_DENIED 0\\r\\n\"\n-\u003e \"Vary: Accept-Language\\r\\n\"\n-\u003e \"Content-Language: en\\r\\n\"\n-\u003e \"Proxy-Authenticate: Basic realm=\\\"my-proxy-name\\\"\\r\\n\"\n-\u003e \"X-Cache: MISS from 44f92f9a9dc8\\r\\n\"\n-\u003e \"X-Cache-Lookup: NONE from 44f92f9a9dc8:3128\\r\\n\"\n-\u003e \"Via: 1.1 44f92f9a9dc8 (squid/5.7)\\r\\n\"\n-\u003e \"Connection: keep-alive\\r\\n\"\n-\u003e \"\\r\\n\"\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpactflow%2Fpact-broker-proxy-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpactflow%2Fpact-broker-proxy-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpactflow%2Fpact-broker-proxy-demo/lists"}