Quickstart Guide
2
3
Docker Compose Deployment
services:
llm_icap_shield:
image: public.ecr.aws/n5w6j7z8/aiceberg/aiceberg_llm_shield:latest
container_name: llm_icap_shield
restart: always
ports:
- "${LLM_SHIELD_ICAP_PORT:-1344}:1344"
environment:
- AICEBERG_PROFILE_ID=${AICEBERG_PROFILE_ID:?AICEBERG_PROFILE_ID must be set in .env}
- AICEBERG_API_KEY=${AICEBERG_API_KEY:?AICEBERG_API_KEY must be set in .env}
- AICEBERG_ENVIRONMENT=prod
# Ports (optional overrides)
# - LLM_SHIELD_ICAP_PORT=1344
- AICEBERG_LLM_SHIELD_LOG_LEVEL=INFO
- HTTP_BODY_READ_ONLY_FOR_TARGET=true
# Optional tuning
- ICAP_HTTP_TRANSFER_ENCODING=chunked
- ICAP_ENCAPSULATED_MODE=identity
- ICAP_CONNECTION_KEEP_ALIVE=trueSetup Credentials
cp .env.example .env
# Edit .env and set AICEBERG_PROFILE_ID and AICEBERG_API_KEYdocker compose up -d4
Configuring Your Proxy (Squid Example)
Example squid.conf Snippet
squid.conf Snippeticap_enable on
icap_service_failure_limit -1
icap_preview_enable off
icap_persistent_connections on
# Define the service
icap_service llm_req reqmod_precache icap://llm_icap_shield:1344/reqmod bypass=0 version=1.0
# Define Access Control (send only LLM traffic)
acl llm_domains dstdomain chatgpt.com
adaption_access llm_req allow llm_domains
adaption_access llm_req deny allLast updated