Relay / Forward Websocket Traffic in Chrome - google-chrome

I'm looking for a way to forward websocket traffic that is received by a standard Chrome instance on Windows.
Eg. On a website that establishes a WS session. As the frames come in from the server, I want to relay / forward them to a service on my local network. I'd also want the browser to receive as normal.
Is there a way to do this within Chrome or via an extension? If not, I am assuming best option to to set up a proxy server?
Any other ideas /suggestions appreciated
Thanks

Related

Opening A Single Chrome Tab Causes Multiple Remote Connections

While working on a project, I've observed that, if a open a single Chrome tab, there are multiple socket connections being made. Ideally I assumed, there should be only one connection, that is from my local machine to the google server.
Here is the netstat results of multiple remote connections made:
Why are there many connections made instead of one? Please clear this doubt for me, thanks.
Because when you open a Chrome tab, it will load not only one resources from the internet(maybe not just from Google). You can use some HTTP/S request capture tools like fiddler or HTTP Analyzer to see those requests.

Allow Chrome app through windows firewall

I am learning to make chrome app which will receive UDP packets from remote device. All works perfectly fine, however, in order to receive packets from remote device I need to turn off windows firewall.
Now the problem is that I do not see a way to add this app to pass firewall exception. Because I only see option to allow Chrome through firewall, not any of its apps.
What is the solution / workaround to this problem?
Thanks
Since I didn't get any answer, the best possible solution I could find so far is to add the port on which my chrome app will listen to firewall inbound rules. I didn't know this was possible until i read this article https://www.thewindowsclub.com/block-open-port-windows-8-firewall
However I still don't consider it the right solution because lets say I publish my app online for other people, it will not be convenient for them to be adding rules to their firewalls.
I am sure there must be a better solution.

Is it possible to use Google Chrome as a proxy server?

In my particular network environment the Google chrome executable can access via an authenticated outgoing proxy server external web sites. Other executables however (when pointing to that outgoing proxy) are not able to do so.
I now have the idea to use Chrome itself as a local proxy for other executables like git or pip. - Is this possible, say, with a Chrome extension or with a tool that uses Chrome in a headless mode to connect to the Internet?
To clarify, I am not asking how to configure the proxy settings inside Chrome - I have successfully done this. I am asking how I can set up Chrome to receive HTTP(S) requests from other local programs and pass the requests on as an intermediate proxy (to the outgoing proxy specified in Chrome's settings).
On its own, no: Chrome will not open a port that other software can connect to. Even WebRTC requires an intermediate server to begin a peer to peer connection between browsers.
However Chrome supports Native Messaging, which means it will execute a specific native application that already exists on the system.
With this set up you can have:
a native application that accepts incoming connections and forwards data to the extension.
the extension listens to messages from the application and sends them via Chrome elsewhere on the internet.

Decrypt SCTP-DTLS Traffic in WebRTC in Chrome

I'm trying to inspect the pakets sent over the sctp connection of webrtc datachannels in chrome on my local machine. There isnt really much information which I found about decrypting DTLS-Traffic (e.g. through wireshark). Is there a way to access the certificate generated for the peerconnection? If not, how would one decrypt the traffic by other means? (e.g. some mitm proxy, mostly those are for TLS only though).
the certificate alone won't help, Chrome typically uses DTLS with perfect forward secrecy.
The --disable-webrtc-encryption (see http://peter.sh/experiments/chromium-command-line-switches/) might work in canary.

How to downgrade from websocket to http?

I've been reading abit about html5, websockets and http. I made some simple tests but let's say I want to do this:
Browser makes an http connection to a web server
Browser then negotiates a web socket connection to the same web server
At some point browser wants to talk http again with the web server in the same session
Points 1 and 2 are straightforward. Coming to point 3, is there a standard solution available? I'm guessing that closing a web socket by either side terminates the existing connection right? Can there be a way to perform a "downgrade" from websockets back to http?
I guess what I'm looking for is a standards-based solution but if one doesnt exist, do any frameworks exist that can do the job?
Thanks :o)
Nina