mitmproxy 監聽指定端口

安裝

使用python3的安裝方式
https://mitmproxy.org/


監聽指定端口

例子:Presto SQL請求的監聽
Presto地址:http://datacenter4:18080

mitmproxy命令(端口8484)

mitmproxy \
  --mode reverse:http://datacenter4:18080 \
  --listen-host datacenter4 \
  --listen-port 8484 \
  --replacements :~s:\/\/datacenter4/:\/\/datacenter4:18080/

然後JDBC訪問Presto使用:jdbc:presto://datacenter4:8484

效果在這裏插入圖片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章