Advertisement
ujiajah1

squid_282

Jun 16th, 2017
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 2.41 KB | None | 0 0
  1. **** squid.conf ***
  2. refresh_all_ims on
  3. reload_into_ims on
  4.  
  5. acl tostoreid url_regex -i ^http.*mp4upload\.com:282\/.*\/video\.mp4
  6. acl patchpartial url_regex -i ^http.*patch.*garena
  7. acl patchpartial url_regex -i ^http.*garena.*patch
  8. acl patchpartial url_regex -i ^http:\/\/.*google\.com\/.*chrome.*\/(.*.(exe))
  9.  
  10. range_offset_limit none range206 patchpartial
  11. range_offset_limit 128 KB range206 !patchpartial
  12. quick_abort_min 1 KB
  13. quick_abort_max 1 KB
  14. quick_abort_pct 95
  15.  
  16. refresh_pattern -i ^https?\:\/\/squid\/(mp4upload|google\/video) 0 90% 432000 override-expire override-lastmod ignore-no-store ignore-must-revalidate ignore-private ignore-auth
  17. refresh_pattern -i .* 0 1% 1 override-expire override-lastmod ignore-no-store ignore-must-revalidate ignore-private ignore-auth
  18.  
  19. store_id_bypass off
  20. store_id_extras "%{Referer}>h"
  21. store_id_program /etc/squid/storeid.pl
  22. store_id_children 2000 startup=30 idle=1
  23. store_id_access allow tostoreid
  24. store_id_access deny all
  25.  
  26. **** storeid.pl ****
  27. #mp4upload
  28. } elsif ($url =~ m/^https?\:\/\/.*mp4upload\.com:282\/(.*\/video\.mp4)/) {
  29. @id = $1;
  30. if ($referer =~ m/^https?\:\/\/.*mp4upload\.com\/(embed-.*)/) {@id = $1;}
  31. $out="OK store-id=http://squid/mp4upload/@id";
  32.  
  33. *** iptables ***
  34. #tproxy
  35. iptables -t mangle -N DIVERT
  36. iptables -t mangle -A DIVERT -j MARK --set-mark 1
  37. iptables -t mangle -A DIVERT -j ACCEPT
  38. iptables -t mangle -A PREROUTING -p tcp -m socket -j DIVERT
  39. iptables -t mangle -A PREROUTING -p tcp --dport 80 -j TPROXY --tproxy-mark 0x1/0x1 --on-port 3129
  40. iptables -t mangle -A PREROUTING -p tcp --dport 8080 -j TPROXY --tproxy-mark 0x1/0x1 --on-port 3129
  41. iptables -t mangle -A PREROUTING -p tcp --dport 8777 -j TPROXY --tproxy-mark 0x1/0x1 --on-port 3129
  42. iptables -t mangle -A PREROUTING -p tcp --dport 5050 -j TPROXY --tproxy-mark 0x1/0x1 --on-port 3129
  43. iptables -t mangle -A PREROUTING -p tcp --dport 182 -j TPROXY --tproxy-mark 0x1/0x1 --on-port 3129
  44. iptables -t mangle -A PREROUTING -p tcp --dport 282 -j TPROXY --tproxy-mark 0x1/0x1 --on-port 3127
  45. iptables -t mangle -A PREROUTING -p tcp --dport 443 -j TPROXY --tproxy-mark 0x1/0x1 --on-port 3127
  46. ip rule add fwmark 1 lookup 212
  47. ip route add local 0.0.0.0/0 dev lo table 212
  48. // 282 satu port dengan 443 //
  49.  
  50. #intercept
  51. #iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3129
  52. #iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 3127
  53.  
  54. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement