Brook v20240404: Speed limit, IP count limit, Traffic statistics, Configure file

Updated at: 2024-03-01

https://github.com/txthinking/brook

CLI

--serverLog format

{"bytes":"2190","dst":"8.8.8.8:53","from":"34.105.110.232:49514","network":"tcp","time":"2024-02-26T09:56:12Z"}
{"bytes":"2237","dst":"8.8.8.8:53","from":"34.105.110.232:49331","network":"udp","time":"2024-02-26T09:57:12Z"}

You can tally traffic from --serverLog, for example by using a jb script to sum up the traffic from the /tmp/brook.log log file.

jb 'var s=0; read_file("/tmp/brook.log").trim().split("\n").map(v=>JSON.parse(v)).forEach(v=> s+= v.bytes ? parseInt(v.bytes) : 0); echo(s)'

We known this:

brook server -l :9999 -p hello

Then, create a file /root/any_name:

server -l :9999 -p hello

We can run it like this:

brook /root/any_name

GUI:

Other


Comment