Comments (4)
Here's a quick demonstration server in NodeJS, if that helps. Sorry for the messy code; threw it together on lunch break.
https://gist.github.com/tdhsmith/8e71aba02c684f549cdec05761e6e87b
You'll need to install ws
first. Run the server with node server.js
then browse to http://localhost:3000/ and the browser and client will each send a variety of frame types.
Here's what I see:
Server
-> TEXT (0x1); MASKED
-> BINARY (0x2); MASKED
<- BINARY (0x2); unmasked
<- PING (0x9); unmasked
<- PONG (0xA); unmasked
<- TEXT (0x1); unmasked
<- CONTINUATION (0x0); unmasked
<- CLOSE (0x8)
-> PONG (0xA); MASKED
-> CLOSE (0x8)
(note that the ordering of the last few is off slightly due to when I'm calling the log commands relative to the actual message queue)
WireShark
Raw capture file is available in the gist above.websocket-monitor
from websocket-monitor.
Actually I'm just realizing the inaccuracies are a bit larger than that:
- all frames are marked as having maskBit=true when they aren't (in my case messages from the server are being sent unmasked)
- disconnect frame is displayed as raw text with the reason code appended to the front. For example
�ëonly text frames are supported
, where the gibberish0x03eb
on the front should be parsed as reason code=1003.
(I don't have the capability right now to modify my stack to send true continuation frames with finBit=0, so I can't verify if the finBit is parsing correctly or not.)
from websocket-monitor.
Yeah, the entire frame, including the metadata like opcode, comes from the Firefox API we're using to read websockets. We pretty much only map that to a string. I can't really give any info on the Firefox API because I haven't been that deep.
Let's try pinging @bakulf, he seems knowledgeable on the matter.
from websocket-monitor.
Can I have a testcase? I would like to test it locally. @esphen, thanks.
from websocket-monitor.
Related Issues (20)
- Add-on signing HOT 1
- side panel not resizable HOT 3
- Incorrect encoding for cyrillic symbols HOT 2
- Falsy JSON values appear as quoted empty strings HOT 3
- Consider support for debugging chrome/web extensions HOT 5
- Log Http also HOT 1
- Option to log all Http/ all network also HOT 1
- e10s support HOT 6
- Save Payload as file HOT 3
- Legacy extension HOT 20
- websocket option doesn't show up in Firebug 2.0.19 Firefox 53.0.2 32bit on windows 7 64 bit HOT 2
- Emptry string as bools HOT 1
- How to use geckofx45 to monitor websocket requests and responses
- non legacy support? HOT 2
- Web Console won't reopen
- "Maximum entries displayed" not being honoured for low traffic connections HOT 1
- Monitor 0.6.5 marked as "legacy extension" in Firefox Quantum HOT 1
- Is it possible to make WS Monitor Quantum Compatible? HOT 2
- Not compatible with Firefox Quantum HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from websocket-monitor.