{"id":13826013,"url":"https://github.com/v-e-o/rdp2tcp","last_synced_at":"2025-07-08T22:33:08.631Z","repository":{"id":14236203,"uuid":"16943328","full_name":"V-E-O/rdp2tcp","owner":"V-E-O","description":"rdp2tcp: open tcp tunnel through remote desktop connection.","archived":false,"fork":false,"pushed_at":"2024-06-30T06:46:36.000Z","size":97,"stargazers_count":326,"open_issues_count":5,"forks_count":99,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-03-13T13:39:33.795Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/V-E-O.png","metadata":{"files":{"readme":"README","changelog":"ChangeLog","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-02-18T09:20:56.000Z","updated_at":"2025-03-06T02:07:33.000Z","dependencies_parsed_at":"2024-08-04T09:14:48.176Z","dependency_job_id":null,"html_url":"https://github.com/V-E-O/rdp2tcp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/V-E-O/rdp2tcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/V-E-O%2Frdp2tcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/V-E-O%2Frdp2tcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/V-E-O%2Frdp2tcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/V-E-O%2Frdp2tcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/V-E-O","download_url":"https://codeload.github.com/V-E-O/rdp2tcp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/V-E-O%2Frdp2tcp/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264360319,"owners_count":23596105,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T09:01:30.772Z","updated_at":"2025-07-08T22:33:08.387Z","avatar_url":"https://github.com/V-E-O.png","language":"C","funding_links":[],"categories":["\u003ca id=\"01e6651181d405ecdcd92a452989e7e0\"\u003e\u003c/a\u003e工具"],"sub_categories":["\u003ca id=\"9d6789f22a280f5bb6491d1353b02384\"\u003e\u003c/a\u003e隧道\u0026\u0026穿透"],"readme":"\n\n        rdp2tcp 0.1 \n\nrdp2tcp is a tunneling tool on top of remote desktop protocol (RDP).\nIt uses RDP virtual channel capabilities to multiplex several ports\nforwarding over an already established rdesktop session.\n\nAvailable features:\n - tcp port forwarding\n - reverse tcp port forwarding\n - process stdin/out forwarding\n - SOCKS5 minimal support\n\nThe code is splitted into 2 parts:\n - the client running on the rdesktop client side\n - the server running on the Terminal Server side\n\nOnce both rdp2tcp client and server are running, tunnels management is\nperformed by the controller (on client side). The controller typically\nlisten on localhost (port 8477) waiting for new tunnel registrations.\n\n\n-[ client (rdesktop side) ]--------------------\n\nFirst of all, rdesktop must be compiled with OOP patch (see INSTALL).\nThe OOP patch comes with a additional rdesktop command line option.\n\n  -r addin:NAME:HANDLER[:OPT1[:OPTN]]\n\n  NAME:    the name of the RDP virtual channel\n  HANDLER: the path of the executable which handle\n           the virtual channel.\n  OPT:     argument passed to HANDLER executable\n\nThe rdp2tcp client must be initialized when the rdesktop client starts.\n\n  rdesktop -r addin:rdp2tcp:/path/to/rdp2tcp \u003cip\u003e\n\nrdp2tcp client usage:\n\n  rdp2tcp [[HOST] PORT]\n\n  HOST: rdp2tcp controller hostname or IP address (default is 127.0.0.1).\n  PORT: rdp2tcp controller port (default is 8477).\n\nSeveral instances of rdp2tcp client can be run on a single rdesktop session:\n\n  rdesktop -r addin:rdp2tcp-1:/path/to/rdp2tcp:8477 \\\n           -r addin:rdp2tcp-2:/path/to/rdp2tcp:8478 \u003cip\u003e\n\nAfter rdesktop is started with rdp2tcp channel configured, port forwarding\ncan be configured by connecting to the controller and sending commands.\nAll commands are ASCII and ends with a CR \"\\n\".\n\n  * List rdp2tcp managed sockets:\n      \"l\\n\"\n\n  * Remove tunnel  \n      \"- LHOST LPORT\\n\"\n\n      LHOST: tunnel local host\n      LPORT: tunnel local port\n\n  * Start SOCKS5 proxy\n      \"s LHOST LPORT\\n\"\n\n      LHOST: proxy local host\n      LPORT: proxy local port\n\n  * stdin/stdout forwarding tunnel (bind on rdesktop)\n      \"x LHOST LPORT CMD\\n\"\n\n      LHOST: local listener host\n      LPORT: local listener port\n      CMD:   command line to execute on Terminal Server host\n\n  * TCP forwarding tunnel (bind on rdesktop)\n      \"t LHOST LPORT RHOST RPORT\\n\"\n\n      LHOST: local listener host\n      LPORT: local listener port\n      RHOST: remote target host\n      RPORT: remote target port\n\n  * TCP reverse-connect tunnel (bind on Terminal Server)\n      \"r LHOST LPORT RHOST RPORT\\n\"\n\n      LHOST: local target host\n      LPORT: local target port\n      RHOST: remote listener host\n      RPORT: remote listener port\n\nrdp2tcp.py (located in \"tools\" folder) can be used to manage tunnels with\nsimple command lines.\nex: \"rdp2tcp.py add forward LHOST LPORT RHOST RPORT\"\n\n\n-[ server (Terminal Server side) ]-------------\n\nBefore starting the rdp2tcp server, you must be logged on the Terminal Server\nwith one or more rdp2tcp clients attached to rdesktop.\n\nThe rdp2tcp server won't magically appear on the Terminal Server. So the\nrdp2tcp.exe executable must be first uploaded.\n\nrdp2tcp.exe doesn't require to be run with a privileged Windows account.\n\nTerminal Server policy may block file sharing through the RDP session.\nThus you may have to find a way to upload the .exe binary on the remote\nsystem. The binary can be uploaded by scripting the TS input.\n\nUploading binary data to the server can be automated by encoding data to\nkey stroke sequences that will be given to rdesktop as keyboard input.\n\nThe rdpupload script (located in \"tools\" folder) generates a X11 script.\nxte (http://hoopajoo.net/projects/xautomation.html) run the X11 script.\n\n  1) start rdesktop with rdp2tcp client\n  2) tools/rdpupload -x -f vb server/rdp2tcp.exe | xte\"\n  3) focus on the rdesktop window within 5 seconds\n  4) xte will feed rdesktop with keyboard input. focused window must\n     not change or you may get some trouble :)\n  5) run the Visual Basic script uploaded by xte.\n  6) run rdp2tcp server by using the executable generated by the\n     Visual Basic script.\n\n\n-[ dev ]---------------------------------------\n\n - edit Makefile / enable -DDEBUG\n - use client/memcheck.sh to use valgrind as a RDP channel wrapper\n - doxygen can be used to generate the project documentation\n     \"doxygen Doxyfile-client\" --\u003e docs/client/html\n     \"doxygen Doxyfile-server\" --\u003e docs/server/html\n - export DEBUG (-1 to 2) environment variable to print debug statements\n - export TRACE (00 to ff) environment variable to print function traces\n\n\tbit 0: I/O buffer management\n       1: network socket  \n       2: RDP virtual channel\n       3: events loop\n       4: process \n       5: rdp2tcp controller\n       6: tunnel management\n       7: SOCKS5 protocol\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fv-e-o%2Frdp2tcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fv-e-o%2Frdp2tcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fv-e-o%2Frdp2tcp/lists"}