mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-23 06:54:13 +08:00
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:
18
action.yml
18
action.yml
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user