buger/goreplay

–http-original-host parameter does not take effect

Flyraty opened this issue · 2 comments

I want to use the –http-original-host parameter to retain the host of the original request, but I encountered the following problem when using this parameter。the gor version is 1.3.0。

  1. use –http-original-host before --input-raw。
    [root@xx-xx-236-100 ~]# /usr/bin/gor –http-original-host --input-raw :8099 --output-http http://test_lb:80 2023/11/23 16:23:26 [PPID 30560 and PID 13170] Version:1.3.0 2023/11/23 16:23:26 Required at least 1 input and 1 output
  2. use –http-original-host after --output-http。It starts normally, but it doesn't take effect。the host is the output test_lb。
    /usr/bin/gor --input-raw :8099 --output-http http://test_lb:80 –http-original-host
  3. use –-http-original-host
    [root@xx-xx-236-100 ~]# /usr/bin/gor -–http-original-host --input-raw :8099 --output-http http://test_lb:80 flag provided but not defined: -–http-original-host

use -–http-original-host true

use -–http-original-host true