Created
August 1, 2014 07:08
-
-
Save PhirePhly/76345fa72ecdb6fb1d37 to your computer and use it in GitHub Desktop.
Sloppy protocol StoreID rules for Steam CDN
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This creates an access control list to match Steam's CDN | |
acl steamcdn dstdomain .cs.steampowered.com | |
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Kenneth Finnegan | |
# Remaps any http://valve###.cs.steampowered.com/... URL | |
# to http://valveX.cs.steampowered.com/... | |
# | |
# 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|' | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment