Æ»¹ûmitmproxy½Ì³Ì
ÔÚÆ»¹û×°±¸ÉÏ×°ÖúÍʹÓà mitmproxy£ºÊ¹Óà homebrew ×°Öà mitmproxy¡£Ê¹Óà –mode transparent ºÍ –host ±ê¼ÇÆô¶¯ mitmproxy¡£»á¼û http://localhost:8080 ÉèÖÃÊðÀí¡£ÔÚ¡°×èµ²¡±Ñ¡ÏÖÐ×èµ²ÇëÇóºÍÏìÓ¦¡£Ê¹ÓùýÂËÆ÷Óï·¨¹ýÂËÁ÷Á¿¡£Ì½Ë÷¸ß¼¶¹¦Ð§£¬Èç¾ç±¾±àд¡¢Á÷Á¿Â¼ÖƺÍÒƶ¯×°±¸Ö§³Ö¡£
Æ»¹û×°±¸Ê¹Óà mitmproxy ½Ì³Ì
¼ò½é
mitmproxy ÊÇÒ»¿îÇ¿Ê¢µÄ HTTP ÊðÀí¹¤¾ß£¬¿ÉÓÃÓÚ×èµ²¡¢Ð޸ĺÍÆÊÎöÍøÂçÁ÷Á¿¡£Ëü¿ÉÒÔÓÃÓÚÖÖÖÖÄ¿µÄ£¬°üÀ¨µ÷ÊÔ¡¢Éø͸²âÊÔºÍ Web ¿ª·¢¡£±¾ÎĽ«Ö¸µ¼ÄúÔÚÆ»¹û×°±¸ÉÏ×°ÖúÍʹÓà mitmproxy¡£
×°ÖÃ
ÔÚÆ»¹û×°±¸ÉÏ×°Öà mitmproxy µÄ×î¼òÆÓÒªÁìÊÇʹÓà Homebrew¡£Ê×ÏÈ£¬ÔÚÖÕ¶ËÖÐÊäÈëÒÔÏÂÏÂÁî×°Öà Homebrew£º
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
µÇ¼ºó¸´ÖÆ
È»ºó£¬Ê¹ÓÃÒÔÏÂÏÂÁî×°Öà mitmproxy£º
brew install mitmproxy
µÇ¼ºó¸´ÖÆ
ÔËÐÐ
×°ÖÃÍê³Éºó£¬Äú¿ÉÒÔͨ¹ýÔÚÖÕ¶ËÖÐÊäÈëÒÔÏÂÏÂÁîÆô¶¯ mitmproxy£º
mitmproxy --mode transparent --host
µÇ¼ºó¸´ÖÆ
ÆäÖÐ –mode transparent ±ê¼Ç½« mitmproxy ÉèÖÃΪ͸Ã÷ÊðÀí£¬ÕâÒâζ×ÅËùÓÐ×°±¸Á÷Á¿¶¼»á×Ô¶¯Í¨¹ýËü·ÓÉ¡£–host ±ê¼ÇÖ¸¶¨ÄúµÄÆ»¹û×°±¸µÄ IP µØµã¡£
ÉèÖÃ
Æô¶¯ mitmproxy ºó£¬Äú¿ÉÒÔͨ¹ýÔÚä¯ÀÀÆ÷Öлá¼û http://localhost:8080 À´»á¼ûÆä Web ½çÃæ¡£´Ë½çÃæÔÊÐíÄúÉèÖÃÊðÀí¡¢×èµ²ÇëÇóºÍÏìÓ¦ÒÔ¼°Éó²éÍøÂçÁ÷Á¿ÆÊÎö¡£
×èµ²ÇëÇóºÍÏìÓ¦
Òª×èµ²ÇëÇóºÍÏìÓ¦£¬ÇëÔÚ mitmproxy Web ½çÃæÖе¥»÷¡°×èµ²¡±Ñ¡Ï¡£Õ⽫ÏÔʾËùÓÐÄ¿½ñÁ÷Á¿¡£Äú¿ÉÒÔµ¥»÷ÈκÎÇëÇó»òÏìÓ¦ÒÔÉó²éÆäÏêϸÐÅÏ¢£¬²¢Ê¹Óñà¼Æ÷¶ÔÆä¾ÙÐÐÐ޸ġ£
¹ýÂËÁ÷Á¿
Äú¿ÉÒÔʹÓà mitmproxy Ç¿Ê¢µÄ¹ýÂËÆ÷Óï·¨À´¹ýÂËÍøÂçÁ÷Á¿¡£ÕâÔÊÐíÄú½öÉó²éÄú¸ÐÐËȤµÄÁ÷Á¿¡£ÓйعýÂËÓï·¨µÄÐÅÏ¢£¬Çë²ÎÔÄ mitmproxy Îĵµ¡£
¸ß¼¶Ó÷¨
mitmproxy ÌṩÁ˶àÖָ߼¶¹¦Ð§£¬°üÀ¨£º
- ¾ç±¾±àд£ºÄú¿ÉÒÔʹÓà Python ±àд½ÅÔÀ´×Ô¶¯»¯Ê¹Ãü£¬ÀýÈçÐÞ¸ÄÏìÓ¦»òÖ´ÐÐÇå¾²¼ì²é¡£
- Á÷Á¿Â¼ÖƺͻطţºÄú¿ÉÒÔʹÓà mitmproxy ¼ÖÆÍøÂçÁ÷Á¿»á»°£¬È»ºó½«Æä»Ø·ÅÒÔ¾ÙÐе÷ÊÔ»ò²âÊÔ¡£
- Òƶ¯×°±¸Ö§³Ö£ºmitmproxy ¿ÉÒÔÓÃ×÷Òƶ¯×°±¸ÊðÀí£¬ÔÊÐíÄú×èµ²ºÍÆÊÎöÀ´×Ô iOS »ò Android ×°±¸µÄÁ÷Á¿¡£
ÒÔÉϾÍÊÇÆ»¹ûmitmproxy½Ì³ÌµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡