repositorypackage
0.0.0-20241223043229-29af9ac64097
Repository: https://github.com/superwhys/remotex.git
Documentation: pkg.go.dev
# README
RemoteX
TODO
- Basic node connection by TCP
- Get OS info
- List remote node dir
- Adapt to UDP, Quic
- Add file sync(upload, download)
- Tunnel Forward
- Tunnel Reverse
- Screenshot
- Run Command
Message Body
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Message Length |
| (32 bits) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
/ /
\ Message \
/ /
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
message read-write utils: pkg/protoutils/reader.go
, pkg/protoutils/writer.go
Process
- Listen local port
- Dial remote node or Accept remote connection
- Exchange node info
- Start heartbeat send
- Wait for command
Usage
Develop
该项目许多结构都使用的protobuf,你可以自定义修改它们(./internal/proto
)
修改了之后需要运行下面的指令生成对应的文件:
go generate internal/proto/generate.go
项目使用了 DDD
架构进行开发, 分为了四个领域: Auth
, Command
, Connection
, Node
具体各目录如下:
.
├── api // 接口层
├── config // 配置文件
├── domain // 领域层
│ ├── auth
│ ├── command
│ ├── connection
│ └── node
├── internal
│ ├── connection
│ ├── filesync
│ ├── filesystem
│ └── proto
├── main.go
├── pkg // 基础设施层
├── server // 应用层
│ ├── auth
│ ├── command
│ ├── command.go
│ ├── connection
│ ├── connection.go
│ ├── handshake.go
│ ├── heartbeat.go
│ ├── node
│ ├── option.go
│ └── server.go
└── tools.go