Here's how to configure Astra Proxy Service to capture the HTTP traffic for Postman/Burp/Curl. It also covers troubleshooting common issues encountered during configuration.

Astra Proxy integration

Quick Installation

  1. SSH into the VM or developer box where proxy should be hosted.

  2. Pre-requisite

  1. ** Download astra-cli from repository**

  1. Create an environment file called as proxyEnv.env and fill below contents

SENSOR_ID=
ALLOWED_HOSTS=
ASTRA_TRAFFIC_COLLECTOR_ENDPOINT=
  1. ** Run the following to start astra-proxy-service**

chmod +x astra-cli
./astra-cli proxy quickstart --listen-port 8181 --env-file proxyEnv.env
./astra-cli.exe proxy quickstart --listen-port 8181 --env-file proxyEnv.env
./astra-cli proxy quickstart --listen-port 8181 --env-file proxyEnv.env
  1. To check the status of astra-proxy-service, exec below command

./astra-cli proxy status
./astra-cli.exe proxy status
./astra-cli proxy status
  1. Set the http proxy address of astra-proxy-service (http://:) as upstream proxy in your application like postman, burp or curl and then start using your application

Upgrade

Docker container upgrade

This process updates the docker container to a new version of the astra-proxy-service.

  1. ** Change directory to the place where astra-cli executable is downloaded**

  2. Run below command

./astra-cli proxy upgrade
  1. Upon successfull image pull, run this to stop the current container and subsequently remove it

./astra-cli proxy stop
./astra-cli proxy remove
  1. Restart the container with newly pulled image

./astra-cli proxy quickstart --listen-port 8181 --env-file proxyEnv

Troubleshooting

  1. Unable to pull the image. Error shows something like this: "no matching manifest for linux/arm64/v8". This is a common issue for Mac users.

Solution: use this command to pull the image: docker pull --platform linux/x86_64 getastra/proxy

Please refer here for detailed troubleshooting