bolkedebruin / rdpgw

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

RDP File configuration not actually added to downloaded rdp file #72

Closed christiaangoossens closed 11 months ago

christiaangoossens commented 1 year ago

It seems that https://github.com/bolkedebruin/rdpgw/blob/6b32631434cf918abf6ea8755689e52590535311/cmd/rdpgw/web/web.go#L201-L224 forgets to add the additional config for the rdp download file, such as NetworkAutoDetect, ConnectionType (as demo-ed in the README) or RedirectedVideoCaptureEncodingQuality and UseMultimon.

I am using the following config:

Server:
 # Cut
OpenId:
 # Cut
Caps:
 SmartCardAuth: false
 TokenAuth: true
 # connection timeout in minutes, 0 is limitless
 IdleTimeout: 10
 EnablePrinter: true
 EnablePort: true
 EnablePnp: true
 EnableDrive: true
 EnableClipboard: true
Client:
  UsernameTemplate: "{{ username }}"
  NetworkAutoDetect: true
  BandwidthAutoDetect: true
  ConnectionType: 7
  SplitUserDomain: false
  AudioCaptureMode: true
  RedirectedVideoCaptureEncodingQuality: 2
  CameraStoreRedirect: true
  DeviceStoreRedirect: true
  DriveStoreRedirect: true
  RedirectComPorts: true
  RedirectLocation: true
  RedirectPrinters: true
  RedirectWebAuthn: true
  RedirectSmartcards: true
  UseMultimon: true
  UsbDeviceStoRedirect: true   
Security:
 # Cut

However none of these are ending up in the rdp file, which looks like:

gatewayhostname:s:#GATEWAY
full address:s:#RDPHOST
username:s:#USERNAME
gatewaycredentialssource:i:5
gatewayprofileusagemethod:i:1
gatewayusagemethod:i:1
gatewayaccesstoken:s:#TOKEN

Is this a bug in the latest version, or am I configuring it wrong?

christiaangoossens commented 11 months ago

Solved it based on commit https://github.com/bolkedebruin/rdpgw/commit/6b32631434cf918abf6ea8755689e52590535311#diff-f411a5009131db5a6c7242b49ca78488f2d274ef9e5e5f4de9262a42108a5386, now facing the same issue as https://github.com/bolkedebruin/rdpgw/issues/78

zacek100 commented 2 weeks ago

FYI: As of 2.0.2 the resultant RDP file is still missing the custom entries from the template file.