-
Notifications
You must be signed in to change notification settings - Fork 37.3k
Tunnel: Extend port mapping lookup also for querystring #203908
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.