最近在學習HTTP,網上推薦了幾個工具,以爲Fiddler有其優點以及免費,因而網上找資料學習!html
安裝包到官網可下載,選擇Linux版本,壓縮包爲fiddler-linux.zip,解壓到一個目錄linux
1.須要安裝mono環境,源內就有瀏覽器
sudo apt-get install mono-complete
2.而後進入到解壓目錄運行bash
mono Fiddler.exe
Chrome瀏覽器不用進行任何設置,全部請求都會經過Fiddler自動代理,原理就是:當Fiddler啓動時會執行以下腳本:工具
gsettings set org.gnome.system.proxy.https port 8888 gsettings set org.gnome.system.proxy.http port 8888 gsettings set org.gnome.system.proxy.http host '127.0.0.1' gsettings set org.gnome.system.proxy.https host '127.0.0.1' gsettings set org.gnome.system.proxy mode 'manual'
就是用gsettings
命令修改系統的http和https代理參數值,同時用model 'manual'
打開系統級代理開關。當關閉Fiddler程序時,會把model
參數值恢復爲none
,即不開啓代理學習
在命令行裏運行mono Fiddler.exe
後,而後直接kill 9掉該進程,或者直接在窗口crtl+D結束,可能使Fiddler不能正常設置model參數,致使瀏覽器打開什麼網頁都是沒法訪問this
而Firefox瀏覽器沒有默認使用系統代理設置,因此手動設置下就行了:
Click Edit > Preferences > Advanced > Network > Settings and choose "Manual Proxy Configuration", Proxy 127.0.0.1, Port 8888, and tick the "Use this proxy server for all protocols" box.
spa
內容比較多引用,由於人家寫的很詳細!若有冒犯,懇請告知!命令行
reference:代理