Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Sloppy protocol StoreID rules for Steam CDN
# This creates an access control list to match Steam's CDN
acl steamcdn dstdomain
# Specify what program to pipe URL through
store_id_program /usr/local/bin/steamrewrite
# How many of them to spawn at once. No documentation on this
store_id_children 10 startup=3 idle=1 concurrency=0
# Specify the ACL for URLs to be mangled
store_id_access allow steamcdn
store_id_access deny all
# Kenneth Finnegan
# Remaps any URL
# to
# DON't USE THIS! Bash is a terrible language to do this in.
# Spawning two new processes per HTTP request is utterly stupid.
# TODO: Reimplement in Python
# It also doesn't do any error checking for non-chunk URLs and return the
# appropriate "ERR" instead of "OK store-id=..."
while read LINE; do
echo $LINE |
sed 's|http://valve[0-9]*\.cs\.steampowered\.com|OK store-id=http://valveX\.cs\.steampowered\.com|'
You can’t perform that action at this time.