Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to replay https traffic via goreplay? #529

Open
jacoblukose opened this issue Nov 2, 2017 · 11 comments
Open

Is it possible to replay https traffic via goreplay? #529

jacoblukose opened this issue Nov 2, 2017 · 11 comments

Comments

@jacoblukose
Copy link

No description provided.

@onestraw
Copy link

Probably not
#85

@jacoblukose
Copy link
Author

yup , not possible @onestraw 👎

@seboss666
Copy link

Hello,
It's not that hard to slightly modify web installation to have intermediary TLS termination and capture/replicate backend trafic. The real question is : is it possible to send captured trafic to an https destination to be sure we are in the same base setup ?

@buger
Copy link
Owner

buger commented Jul 17, 2018

I would say so, it is not possible to capture HTTPS traffic by its nature (without putting proxy behind it which terminate the traffic), but you feel free to replay captured traffic to https endpoint. No special configuration needed.

@baiduguoyun
Copy link

baiduguoyun commented Aug 6, 2018

hello,in latest version v0.16.1,there is a feature "Add support for TLS connections between --input-tcp and --output-tcp.",Could you give me an example to use TLS connections?
and I am confused about why gor support tls,but it can not capture HTTPS traffic? @buger

@buger
Copy link
Owner

buger commented Aug 6, 2018

--input-tcp and --output-tcp is a special plugins used only for GoReplay master-slave setup, e.g. so GoReplay instances can communicate with each other. Its not about intercepting TCP traffic (which yes, can be a bit confusing from its name).

@baiduguoyun
Copy link

baiduguoyun commented Aug 7, 2018

Thanks for your reply,but I'm still confused about this question.
It is my purpose to capture HTTPS traffic. I tried in the following way,which is use GoReplay master-slave setup.
In master side,goreplay --input-tcp localhost:28020 --input-tcp-secure --input-tcp-certificate "/etc/httpd/server.pem" --input-tcp-certificate-key "/etc/httpd/server.key" --output-stdout
In slave side,goreplay --input-raw :443 --output-tcp localhost:28020 --output-tcp-secure
and then ,I got this error prompt
In master side,"Unexpected error in input tcp connection: remote error: tls: bad certificate"
In slave side,"Can't connect to aggregator instance, reconnecting in 1 second. Retries: 1"
I'm so confused. Why I put the right certificate and key in master side,but they can' establish connection between each other.
Is that a wrong way I use TLS connections(-input-tcp-secure --input-tcp-certificate --output-tcp-secure)?Could you give me an example to let me know how to use TLS connections?
@buger

@buger
Copy link
Owner

buger commented Aug 7, 2018

Short: you can't capture https traffic on netwrok interface, maybe if except FBI, since such traffic is encrypted.

Long: The only way to capture TLS protected traffic is to put proxy on top of your app which will terminate traffic for you, and you will intercept non-TLS traffic, behind proxy. Or maybe if proxy can record traffic for you (and GoReplay at the moment can't act as proxy). Maybe smth like nginx mirror module will suite better for your needs http://nginx.org/en/docs/http/ngx_http_mirror_module.html

@baiduguoyun
Copy link

baiduguoyun commented Aug 8, 2018

Firstly thanks a lot.@buger
It is very clear to my original question.But my question has changed into a new one,that is what your new feature(Add support for TLS connections between --input-tcp and --output-tcp) is for?

@buger
Copy link
Owner

buger commented Aug 8, 2018

I think doc can clarify it https://github.com/buger/goreplay/wiki/Distributed-configuration

In some cases, you may want to have GoReplay worker nodes, which redirect intercepted traffic to GoReplay master node on separate machine. --input-tcp and --output-tcp made exactly for this purpose.

@baiduguoyun
Copy link

So I guess this new feature(Add support for TLS connections between --input-tcp and --output-tcp) is used for encrypting http traffic between -input-tcp and --output-tcp. Since I still can not make it work even thouth I followed the example of this doc(https://github.com/buger/goreplay/wiki/Distributed-configuration).I still get error message like my above comment.I gave up trying because I think maybe there is a bug in establishing tls connection.
Anyway,thanks for your great tool,it is very useful.@buger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants