Installation
proxymock does some pretty heavy duty work all from the command line. Using the cli, you can automate the creation of simulation environments, record new traffic, modify transactions and replay.
Install proxymock via Command Line
To install non interactively (like in CI/CD) set the SPEEDSCALE_API_KEY
environment variable. This is an Enterprise feature.
- MacOS
- Linux
- Windows
proxymock
can be easily installed via Homebrew:
brew install speedscale/tap/proxymock
Or via the install script:
sh -c "$(curl -Lfs https://downloads.speedscale.com/proxymock/install-proxymock)"
You can inspect the install script to see what it does. Root permission is not required to execute this script.
If you need to Install a specific version, you can do so by passing it to the install script:
sh -c "$(curl -Lfs https://downloads.speedscale.com/proxymock/install-proxymock)" -s v2.3.267
Optionally skip the install script and install manually:
# Download proxymock binary on your machine
curl "https://downloads.speedscale.com/proxymock/proxymock-darwin-$(case $(uname -m) in x86_64) echo 'amd64';; arm | arm64 | aarch64) echo 'arm64';; esac)" -o proxymock
# Create speedscale directory and move the binary to the directory
mkdir ~/.speedscale
mv ./proxymock ~/.speedscale
# Give execute permission to the binary
chmod +x ~/.speedscale/proxymock
Don't forget to add proxymock
to your $PATH
variable in your shell's rcfile:
# substitute your shell's rcfile
echo "export PATH=\$PATH:$HOME/.speedscale" >> ~/.zshrc
Linux users should install proxymock
via the install script:
sh -c "$(curl -Lfs https://downloads.speedscale.com/proxymock/install-proxymock)"
You can inspect the install script to see what it does. Root permission is not required to execute this script.
If you need to Install a specific version, you can do so by passing it to the install script:
sh -c "$(curl -Lfs https://downloads.speedscale.com/proxymock/install-proxymock)" -s v2.3.267
Optionally skip the install script and install manually:
# Download proxymock binary on your machine
curl "https://downloads.speedscale.com/proxymock/proxymock-linux-$(case $(uname -m) in x86_64) echo 'amd64';; arm | arm64 | aarch64) echo 'arm64';; esac)" -o proxymock
# Create speedscale directory and move the binary to the directory
mkdir ~/.speedscale
mv ./proxymock ~/.speedscale
# Give execute permission to the binary
chmod +x ~/.speedscale/proxymock
Don't forget to add proxymock
to your $PATH
variable in your shell's rcfile:
# substitute your shell's rcfile
echo "export PATH=\$PATH:$HOME/.speedscale" >> ~/.zshrc
The proxymock
cli is available for and can run on Windows, but does not support native traffic capture. These instructions are included in case you know what you are doing and want to install proxymock
manually.
Open PowerShell and create a Speedscale directory.
mkdir -f $env:userprofile\.speedscale
Download proxymock
into the Speedscale directory.
curl.exe -L "https://downloads.speedscale.com/proxymock/proxymock.exe" -o $env:userprofile\.speedscale\proxymock.exe
If this is your first time using proxymock
you may need to add the Speedscale
directory to your Path environment variable so it is accessible without knowing
the full path.
To add the Speedscale directory to your path, right click on the Windows button and click System.
Click Advanced system settings on the right.
Click Environment Variables.
Under System variables select Path and click Edit.
Create a New entry in the list with the Speedscale directory. If you are unsure of the exact path run this command from PowerShell.
echo $env:userprofile\.speedscale
Click OK and restart PowerShell.
Install proxymock via VSCode (beta)
- Go to the Extensions view (Ctrl+Shift+X on Windows or Command+Shift+X on MacOS/Linux) in Visual Studio Code
- Search for
proxymock
- Click install
The extension will install an additional command line tool called proxymock
which is used to create and manage your mock
servers. You don't need to manually install this, but you can learn more about it by checking out the manual instructions below.
The proxymock extension will re-use the existing Speedscale Enterprise installation if present.