Skip to content

Commit

Permalink
route windows vnc correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
robwaz committed Oct 1, 2024
1 parent cc99572 commit 407f99a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions dojo_plugin/api/v1/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ def get(self):
"password": password,
}
iframe_src = url_for("pwncollege_workspace.forward_workspace", service=service_param, service_path="vnc.html", **vnc_params)
elif service == "desktop-windows":
service_param = "~".join(("desktop-windows", str(user.id), container_password(container, "desktop-windows")))
vnc_params = {
"autoconnect": 1,
"reconnect": 1,
"reconnect_delay": 200,
"resize": "local",
"path": url_for("pwncollege_workspace.forward_workspace", service=service_param, service_path="websockify"),
"password": "password", # Not really used for auth!
}
iframe_src = url_for("pwncollege_workspace.forward_workspace", service=service_param, service_path="vnc.html", **vnc_params)
else:
iframe_src = f"/workspace/{service}/"

Expand Down

0 comments on commit 407f99a

Please sign in to comment.