// 同步转发并且比对响应结果
cd /production/www/go_replay/
ulimit -n 65000
/usr/local/bin/gor –input-raw :80 –input-raw-track-response –input-raw-bpf-filter “host ! 167.xxx.xxx.xx” –input-raw-override-snaplen –prettify-http –output-http http://192.168.3.110:80 –output-http-timeout 10s –output-http-workers 1000 –output-http-workers-min 100 –http-allow-header “Aww-Csid: xxxxx” –output-http-track-response –http-allow-method POST –middleware “/production/www/go_replay/client/middleware/sync –project {project_name}” –output-http-compatibility-mode –http-allow-url /article/detail
// 流量收集到文件
/usr/local/bin/gor –input-raw :80 –input-raw-track-response –input-raw-override-snaplen –prettify-http –input-raw-expire 5s –output-stdout –http-disallow-header “Aci: xxxxx” –output-file-size-limit 5m
// 请求重写
/usr/local/bin/gor –input-raw :80 –output-http https://xxxx.com –output-http-timeout 10s –input-raw-override-snaplen –prettify-http –http-set-header “Host:” –http-allow-url /article/add
Original: https://www.cnblogs.com/mafeng/p/15179576.html
Author: ma_fighting
Title: goreplay 流量重放命令
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/546002/
转载文章受原作者版权保护。转载请注明原作者出处!