tarekziade/tinap

Tinap on Windows requires `-v` option to function

Closed this issue · 1 comments

This is a funny one, but I've tested it multiple times and this is definitely what I'm seeing:

Start both tinap processes:
e.g.
tinap --host 192.168.86.180 --port 80 --upstream-host 192.168.86.180 --upstream-port 8080 --rtt 100
tinap --host 192.168.86.180 --port 443 --upstream-host 192.168.86.180 --upstream-port 8081 --rtt 100

Start WebPageReplay:
go run src/wpr.go replay --http_port=8080 --https_port=8081 --host 192.168.86.180 C:\Users\Andrew\tools\wpr\recordings\facebook.wpr

Start Firefox, pointing to the host machine:
--firefox.preference network.dns.forceResolve:192.168.86.180 --firefox.acceptInsecureCerts true

Results:
No requests are delivered through tinap.

And if you add -v to the tinap commands, all the requests are correctly handled.

Something stalling the event loop?

Fixed in 9fda076

the rtt value needs to be divided by 2000. and that division was only done when -v was passed.
so --rtt 100 was sleeping 200 seconds... :D