Remove unnecessary network restrictions test and update readme + action.yml with no default domains and respective instructions in the readme

This commit is contained in:
km-anthropic
2025-07-14 14:47:07 -07:00
parent c61f7b0167
commit 2877ea975e
3 changed files with 29 additions and 68 deletions

View File

@@ -153,26 +153,12 @@ runs:
# Install and configure Squid proxy
sudo apt-get update && sudo apt-get install -y squid
echo "${{ inputs.allowed_domains }}" > /tmp/whitelist.txt
if [[ -n "${{ inputs.anthropic_api_key }}" ]]; then
echo ".anthropic.com" >> /tmp/whitelist.txt
fi
if [[ "${{ inputs.use_bedrock }}" == "true" ]]; then
echo "bedrock.*.amazonaws.com" >> /tmp/whitelist.txt
echo "bedrock-runtime.*.amazonaws.com" >> /tmp/whitelist.txt
fi
if [[ "${{ inputs.use_vertex }}" == "true" ]]; then
echo "*.googleapis.com" >> /tmp/whitelist.txt
echo "vertexai.googleapis.com" >> /tmp/whitelist.txt
fi
echo "${{ inputs.allowed_domains }}" > $RUNNER_TEMP/whitelist.txt
# Configure Squid
sudo tee /etc/squid/squid.conf << 'EOF'
http_port 127.0.0.1:3128
acl whitelist dstdomain "/tmp/whitelist.txt"
acl whitelist dstdomain "$RUNNER_TEMP/whitelist.txt"
acl localhost src 127.0.0.1/32
http_access allow localhost whitelist
http_access deny all