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

How to inspect traffic for a running tunnel? #326

Open
andrewconnell opened this issue Oct 4, 2023 · 7 comments
Open

How to inspect traffic for a running tunnel? #326

andrewconnell opened this issue Oct 4, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@andrewconnell
Copy link

This tool is positioned as a replacement for ngrok. One very useful feature of ngrok is the ability to view the request/response on a currently running tunnel.

I can't figure out how to do this with this tool, either through the browser (like ngrok) or via the CLI.

I can see an active tunnel...

devtunnel show <tunnel-id>

But when I connect to it, it just outputs a stream of "opened" ports and never shows any data on them...

devtunnel connect <tunnel-id>

Is it possible to get a debug view of the traffic without using another tool?

@curib
Copy link

curib commented Oct 4, 2023

Hi @andrewconnell, thanks for reaching out to us! If you run the host command, you should see the inspection URL in the output. Here's an example inspection URL: https:/<tunnel_id>-8080-inspect.usw2.devtunnels.ms/. Let me know if that works for you!

@andrewconnell
Copy link
Author

@curib Cool... not sure why that didn't occur to me... thanks... got it working now.

However, when see the traffic show up on the inspection page, I only see requests. I don't see the response side of the payload. Every entry's payload is empty. Is it possible to see the payload?

With ngrok, you can see the both sides of the request, so I'm seeing about half that. Am I missing something?

@jfullerton44
Copy link
Collaborator

Hi @andrewconnell, yes you should be able to see the request and response payload through inspection. Can I get the tunnelId you were using when the responses weren't showing up with inspection so I can take a look. Also, what application type were you testing when sending requests through the tunnel?

@andrewconnell
Copy link
Author

andrewconnell commented Oct 5, 2023

Sure... the ID was: d3nqz99s.use2

So far, I've never seen the responses come through (admittedly I've only used this about 10-15 times in the last 24h (since @curib replied).

These are all requests kicked off using the Teams Toolkit extension for VSCode & used for bots (so traffic is init'd from the Azure Bot Framework).

@jfullerton44
Copy link
Collaborator

@andrewconnell Can you see if this issue still exists, and if so, can you send the tunnel id that it is happening on if it is different. We have added additional logging that should help diagnose the issue.

@andrewconnell
Copy link
Author

@jfullerton44 I'm not sure what changed on my side or with the service, but it's been working for the last week. Sorry for not following up. I'll go ahead and close this issue since it's not an open issue for me.

@andrewconnell
Copy link
Author

@jfullerton44 scratch that... it seems like it's inconsistent. Here's one where I'm not seeing a response: ttcbst87.use

These screenshots show I'm getting the request, it's responding with an HTTP 200, & the host app is behaving like it's getting the expected response, but the inspector isn't showing any response.

Screenshot 2023-10-20 at 6 43 22 AM
Screenshot 2023-10-20 at 6 43 43 AM
Screenshot 2023-10-20 at 6 43 59 AM

@curib curib added the bug Something isn't working label Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants