Tunnel: Extend port mapping lookup also for querystring#203908
Tunnel: Extend port mapping lookup also for querystring#203908alexr00 merged 1 commit intomicrosoft:mainfrom
Conversation
|
cc @yoshigev |
|
I couldn't get the Remote-SSH extension to work with OSS version (I keep getting "Unauthorized client refused." messages), so I have no way to test this. Suggestions? |
685b558 to
ec004d2
Compare
|
Added unit tests. |
alexr00
left a comment
There was a problem hiding this comment.
I couldn't get the Remote-SSH extension to work with OSS version (I keep getting "Unauthorized client refused." messages), so I have no way to test this.
Suggestions?
We have a test resolver which can be used in OSS to test remote changes. You can try it out with OSS by using the "Remote-TestResolver" commands. I think for port forwarding it forwards to remote-port-number + 1.
alexr00
left a comment
There was a problem hiding this comment.
This is a cool idea. Let me discuss with the team and get back to you on it!
alexr00
left a comment
There was a problem hiding this comment.
Looks good, I would merge this once the second argument is added!
|
@orgads I prefer your current approach because it does a |
34726f6 to
5f66af9
Compare
When running az login, the URL has localhost in redirect_uri query param. This should trigger automatic port mapping. Improve localhost port mapping to cover this case as well. Fixes microsoft#203869
5f66af9 to
ae30bfe
Compare
alexr00
left a comment
There was a problem hiding this comment.
Thanks for the feature and for adding tests!
|
@alexr00 I just tested it with insiders build, and I found that it also replaces the host. i.e. instead of opening the browser at https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize?client_id=my-id&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A35429&... it replaces the host with localhost:35429, and opens this url: https://localhost:35429/organizations/oauth2/v2.0/authorize?client_id=my-id&response_type=code&redirect_uri=http://localhost:35429&... I'll try to fix this. If you can give me some hints that could be nice :) |
|
The port is forwarded correctly anyway. If I open the correct links, it works as expected. |
|
Opened a PR for fixing this: |
|
And now reported an issue too: |
)" This reverts commit 08eda83.
When running az login, the URL has localhost in redirect_uri query param. This should trigger automatic port mapping. Improve localhost port mapping to cover this case as well. This is a revised and tested version of microsoft#203908 which was reverted in microsoft#205370. Fixes microsoft#203869
When running az login, the URL has localhost in redirect_uri query param. This should trigger automatic port mapping. Improve localhost port mapping to cover this case as well. This is a revised and tested version of microsoft#203908 which was reverted in microsoft#205370. Fixes microsoft#203869
When running az login, the URL has localhost in redirect_uri query param. This should trigger automatic port mapping.
Improve localhost port mapping to cover this case as well.