Advertisement
ujiajah1

++haarpcachesquid.conf/dedicated efdika doang

Jan 4th, 2016
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. acl haarp_lst url_regex -i "/etc/haarp/haarp.lst"
  2.  
  3. cache_peer 192.168.1.11 parent 8080 0 no-tproxy
  4. cache_peer_access 192.168.1.11 allow haarp_lst
  5. cache_peer_access 192.168.1.11 deny all
  6. dead_peer_timeout 2 seconds
  7. always_direct deny haarp_lst
  8.  
  9. acl google url_regex -i (googlevideo.com|youtube.com)
  10. request_header_access User-Agent deny google
  11. request_header_replace User-Agent Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)
  12. reply_header_access Alternate-Protocol deny all
  13.  
  14.  
  15.  
  16. } elsif ($u=~ m/^https?\:\/\/.*\.(youtube|googlevideo).*videoplayback\?(.*)/){
  17.     @watchid = m/[&?]watchid\=([^\&\s]*)/;
  18.     @itag = m/[&?](itag\=[0-9]*)/;
  19.     @range = m/[&?](range\=[^\&\s]*)/;
  20.     @cpn = m/[&?]cpn\=([^\&\s]*)/;
  21.     @mime = m/[&?](mime\=[^\&\s]*)/;
  22.     @id = m/[&?]id\=([^\&\s]*)/;
  23.  
  24.     if (defined(@cpn[0])){
  25.     if (-e "/tmp/@cpn"){
  26.     open FILE, "/tmp/@cpn";
  27.     @id = <FILE>;
  28.     close FILE;}
  29.     }
  30.     $out="OK store-id=http://video-srv.squid.internal/watchid=@watchid@mime@range";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement