Skip to content

Instantly share code, notes, and snippets.

@blackstuend
Last active December 24, 2018 03:08
Show Gist options
  • Save blackstuend/17b9246266fe09157ac3b2a35ddd31ed to your computer and use it in GitHub Desktop.
Save blackstuend/17b9246266fe09157ac3b2a35ddd31ed to your computer and use it in GitHub Desktop.

安裝siege進行網站測試

# yum install -y siege
# siege -c 100 -r www.google.com // -c為進入幾次 -r 為進行幾次

參考資料: https://blog.pmail.idv.tw/?p=13663

安裝 proxy

# yum install -y squid
  • 更改 squid
# cd /etc/squid
gedit squid.conf
cache_dir ufs /var/spool/squid 100 16 256  //把這行的#拿掉
systemctl restart squid
  • 讓瀏覽器加入proxy >先開firefox>edit>preference>advanced>network>settings 加入127.0.0.1 port = 3128

  • 創建檔案來拒絕某些url的存取

  • 先進入/etc/squid/squid.conf

acl denyurl dstdomain "/etc/squid/urldeny.txt"
http_access denyurl
  • urldeny.txt 加入拒絕的url
.www.yahoo.com
.nqu.edu.tw
  • 重啟
systemctl restart squid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment