安裝
使用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