監控v2-ray所在服務器HTTP請求
工具 | 版本 |
---|---|
linux的版本: | Debian 9 x86_64 |
Python版本: | 3.6 |
httpry | 0.1.8-1.el7 |
在linux上下載http監控工具httpry
yum install httpry
在linux上安裝subprocess模塊
pip3 install subprocess
subprocess官網
Python代碼
import subprocess
order='httpry'
pi= subprocess.Popen(order,shell=True,stdout=subprocess.PIPE)
while(1==1):
for i in iter(pi.stdout.readline,'b'):
print(i.decode('utf-8'))
說明:在jupyter中運行此代碼,連接v2-ray去訪問幾個頁面,然后多刷新幾次,過一會jupyter會出現httpry的命令的輸出。
輸出的字符沒有弄的很好看。下一步考慮將數據可視化。准備采用Django。可以關注我的github https://github.com/realwuxiong/httpry