Web Based RDP Client

蹲街弑〆低调 提交于 2019-12-13 21:00:29

问题


Can I permit RDP based connections from a website using PHP/JS/etc? I've read that RDP session files can be placed on the web server but would prefer to implement it via code. I am looking for the best way to offer a centralized management of windows machines and allow direct RDP connections.

http://msdn.microsoft.com/en-us/library/windows/desktop/aa383019%28v=vs.85%29.aspx

This looks like it could potentially work, although it requires IIS as the web-server and requires a role to be installed on all remote machines. If possible, I would like to find a solution permitting this to work under a Nix based web-server and without any need for modifications on the remote servers.


回答1:


This problem was resolved by creating an .rdp session file with PHP. Not to cleanest approach as a embedded solution would be better, but is the most viable I have found.

<?

$file = 'screen mode id:i:2
desktopwidth:i:1436
desktopheight:i:925
session bpp:i:16
auto connect:i:1
full address:s:<SERVERIP>:<SERVERPORT>
compression:i:1
keyboardhook:i:2
audiomode:i:2
redirectdrives:i:0
redirectprinters:i:0
redirectcomports:i:0
redirectsmartcards:i:0
displayconnectionbar:i:1
alternate shell:s:
shell working directory:s:
disable wallpaper:i:1
disable full window drag:i:1
disable menu anims:i:1
disable themes:i:1
bitmapcachepersistenable:i:1
winposstr:s:0,3,0,0,800,600
redirectclipboard:i:1
redirectposdevices:i:0
drivestoredirect:s:
autoreconnection enabled:i:1
authentication level:i:0
prompt for credentials:i:0
negotiate security layer:i:1
remoteapplicationmode:i:0
allow desktop composition:i:0
allow font smoothing:i:0
disable cursor setting:i:0
gatewayhostname:s:
gatewayusagemethod:i:0
gatewaycredentialssource:i:4
gatewayprofileusagemethod:i:0';

header("Content-Disposition: attachment; filename=filename.rdp");
header("Content-Type: application/rdp");
print $file;
exit();

?>


来源:https://stackoverflow.com/questions/17465891/web-based-rdp-client

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!