mirror of
https://github.com/luthermonson/go-proxmox.git
synced 2026-04-26 09:25:53 +03:00
[GH-ISSUE #34] VNC Ticket #11
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/go-proxmox#11
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @alebeta90 on GitHub (May 10, 2022).
Original GitHub issue: https://github.com/luthermonson/go-proxmox/issues/34
Hi Luther,
I had been moving forward using the library :) thanks a lot for it
I have a question regarding the VNC ticket. I can see here
https://github.com/luthermonson/go-proxmox/blob/main/proxmox.go#L196
the function VNCWebSocket receive a vnc argument, which seems to be a struct containing the vnc.Ticket and vnc.User.
Where are the VNC calls in the code? I had been searching but it seems am little bit blind.
I want to use it in order to access noVNC console from a reactjs app.
thanks in advance,
@alebeta90 commented on GitHub (May 10, 2022):
Hi Luther,
I had a look at this
https://github.com/luthermonson/go-proxmox/blob/main/virtual_machines.go#L29
TermProxy seems to fetch some info, and some of the values is the ticket
https://pve.proxmox.com/pve-docs/api-viewer/#/nodes/{node}/qemu/{vmid}/termproxy
so I think I could use it, to set my VNC session. I will test it and update the issue, so it can be documented for the future
regards
@luthermonson commented on GitHub (May 11, 2022):
https://luth.io/blog/2022/02/recreating-proxmox-ve-xtermjs-in-go/
this explains the logic to get to where i did on the term proxy code. the test here: https://github.com/luthermonson/go-proxmox/blob/main/virtual_machines_test.go#L87-L114 will help you figure out how to use it.
if youre in js on the browser you can recreate exactly what the proxmox UI does and you can talk directly to proxmox api instead of going through go-proxmox. i am going to use this termproxy rig in tools built in go to provision nodes etc from a terminal UI or a docker-machine driver.
@alebeta90 commented on GitHub (May 11, 2022):
I had an amazing time reading that blog post couple of days ago. Thinking that I could use it in the future! it looks like an amazing solution.
I got the VNC console going properly. using the TermProxy function to receive a vnc ticket and then Ticket func to get the session ticket.
Everything within this module provides everything, happy to find it.