bolkedebruin / rdpgw

Remote Desktop Gateway in Go for deploying on Linux/BSD/Kubernetes
Apache License 2.0
732 stars 117 forks source link

Use Host in Query Parameter if allowed #13

Closed pfzetto closed 2 years ago

pfzetto commented 3 years ago

This Commit allows Admins to add a Host to the connect URL (https://example.com?host=127.0.0.1:3389). This way Admins can link to Remote Desktop Sessions on a specific Host in Links.

Only works, if the host query Parameter is in the Host List in the Config. Otherwise, the Server picks a random Host.

pfzetto commented 3 years ago

Build check failed because of go.sum at that time. Works on my PC and my Gitlab Pipeline.

pfzetto commented 3 years ago

@bolkedebruin is it possible to restart the Pipeline? I'm pretty sure it's a missing dependency (that I've not introduced) and not my code.

bolkedebruin commented 3 years ago

If you rebase and push again the pipeline will start itself. Please address the comments above

pfzetto commented 3 years ago

@bolkedebruin The changes you requested are implemented. Go Lint shows no suggestion in the area I edited.

bolkedebruin commented 3 years ago

@pfz4 I am not seeing any test against the code that you have written. Please add a testcase.

pfzetto commented 2 years ago

@bolkedebruin Sorry for taking so long. I'm new to Go Testcases. I'm a little bit confused how to write the Testcase for this case.

Should I create a new Request and then call HandleDownload with it and check what is in the returned file? Should I move my code to a new class or function with the Url Parameters and Hosts as a Parameterr?

bolkedebruin commented 2 years ago

This has been solved in master now, albeit a bit different. See code/docs.