Giter Site home page Giter Site logo

scjtqs2 / p2p_rdp Goto Github PK

View Code? Open in Web Editor NEW
28.0 1.0 7.0 67 KB

golang编写的 点对点 的rdp远控转发方案。利用udp的p2p打洞,再用udp的kcp来转发tcp的数据。两侧客户端都不需要公网和设置防火墙,不过一些复杂网络无法p2p打洞成功。

Go 100.00%
p2p rdp golang

p2p_rdp's Introduction

使用说明

已初步可以使用。

1.需要用到一个具有公网ip的机器S 作为 发现服务器 eg 111.231.198.54:30124

2.client侧分两端,一个被控侧(rdp服务端内网运行)。一个控制侧(想要远控的电脑运行)

3.分别运行两侧的client端。

ps: 使用上面的公共server发现端的话,只需要下载client的包就行了。

配置文件说明

  1. 发现服务端 (运行名为server的包)
host: ""  #目前没有使用,直接写死了0.0.0.0。后面再优化
port: 30124 #暴露出去的端口
  1. 控制侧客户端 (运行名为client的包)
serverhost: 111.231.198.54           #发现服务端的ip地址 支持域名
serverport: 30124             #发现服务端的暴露udp端口
type: client_client_type      #这个类型代表client侧
clientportfrosvc: 30124       #一个用来和发现服务端 通信的udp端口
clientportforp2ptrance: 30123 #用来p2p打洞的udp端口
rdpp2pport: 30122             #转发rdp的端口 eg:用远程桌面客户端 请求 127.0.0.1:30122
appname: rdp-p2p              #p2p打洞分组。需要和server侧客户端一致。可以当做一个简单的密码
remoterdpaddr: ""             #client侧不用管
  1. 被控侧客户端 (运行名为client的包)
serverhost: 111.231.198.54           #发现服务端的ip地址 支持域名
serverport: 30124              #发现服务端的暴露udp端口
type: client_server_type       #这个类型代表server侧
clientportfrosvc: 30124        #一个用来和发现服务端 通信的udp端口
clientportforp2ptrance: 30123  #用来p2p打洞的udp端口
rdpp2pport: 30122              #server侧不用理会
appname: rdp-p2p               #p2p打洞分组。需要和client侧客户端一致。可以当做一个简单的密码
remoterdpaddr: 192.168.50.80:3389 #需要控制的rdp服务端的地址

编译说明

  1. 发现服务端
go build -o server ./server/cmd
#windows下
go build -o server.exe ./server/cmd
  1. client侧/server侧客户端
go build -o client ./client/cmd
#windows下
go build -o client.exe ./client/cmd

后面有空再做优化

p2p_rdp's People

Stargazers

dddjy avatar  avatar JQJoe avatar seekos avatar Tangren Xiao avatar Wei Tingjiang avatar  avatar  avatar kanako avatar  avatar  avatar  avatar luxx avatar  avatar  avatar  avatar Conkay Yan avatar 怀素真 avatar  avatar  avatar  avatar Dan Morris avatar  avatar 陈伊默 avatar  avatar  avatar H.hm avatar  avatar

Watchers

scjtqs avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.