buger / goreplay

GoReplay is an open-source tool for capturing and replaying live HTTP traffic into a test environment in order to continuously test your system with real data. It can be used to increase confidence in code deployments, configuration changes and infrastructure changes.
https://goreplay.org
Other
18.66k stars 29 forks source link

WebSocket Support #2

Open coreywagehoft opened 11 years ago

coreywagehoft commented 11 years ago

I see you currently support HTTP, are there any plans in the future to support WebSockets? We currently use them for our backend service supporting an iOS application and we would love to replay traffic from our users for testing

buger commented 11 years ago

This is good idea, and definitly worth researching. I'll update issue when have more info.

wangbin579 commented 11 years ago

tcpcopy may help you replay traffic for you applications

wk8 commented 8 years ago

Would be indeed great to have :) any ideas if this is something you could get around to soon-ish?

Thanks for the awesome work!

buger commented 8 years ago

I think it already may work with binary protocol support in PRO version, but currently, miss features like request rewriting.

goofansu commented 7 years ago

Has anyone tried gor with websocket yet?

wk8 commented 7 years ago

@buger : does the PRO version have a notion of long-lived connection for binary protocols? i.e. do they have an output that can maintain long-lived connections, and replay incoming packets from a same input connection to the same output connection? That would be needed for WS to work correctly, but I don't see that notion anywhere in your current protocol (https://github.com/buger/goreplay/blob/master/protocol.go) ?

If it does, then we could very well be interested in buying the PRO version :) please let me know.

buger commented 7 years ago

@wk8 yes, this is the feature of PRO version https://github.com/buger/goreplay/wiki/%5BPRO%5D-Recording-and-replaying-keep-alive-TCP-sessions

It support keep-alive connection. Worth noticing that I did not tested web sockets yet (mostly because lack of time/motivation), but in theory, it should work out of the box. Even if it is not, it should be easy to fix. Having a PRO customer who are willing to work closely with me on this feature will definitely help :) If you will not be happy, refund guaranteed.

wk8 commented 7 years ago

@buger : and does it also support using middleware? If yes, I think we're quite interested :)

buger commented 7 years ago

Yes, you can use middleware. But you must we aware, that since websocket protocol depend on session, you will be receiving all the messages asynchronously and must keep track state of the session inside middleware by yourself (you will have access to SessionID variable). I can help with that as well. Worth noticing that with new NodeJS middleware framework, it should be much easier https://github.com/ buger/goreplay/tree/master/middleware

On Thu, Mar 23, 2017 at 5:05 PM, Jean Rougé notifications@github.com wrote:

@buger https://github.com/buger : and does it also support using middleware? If yes, I think we're quite interested :)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/buger/goreplay/issues/2#issuecomment-288769582, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA2uVFvlZIQE-WGrqVqLCnVPAa38v7Jks5rophggaJpZM4AtcVu .

-- Sincerely yours, Leonid Bugaev https://goreplay.org - test your system with real data @buger https://twitter.com/buger - me on twitter

gabdu commented 7 years ago

Does websocket traffic capture and replay work without middleware?

imgalli commented 3 years ago

Hi, has any progress been made on this?

RichardWright commented 3 years ago

Would also love to use this feature, any update on this?