mirror of
https://github.com/amitbet/vncproxy.git
synced 2025-10-26 14:42:16 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
02dde77daa | ||
|
|
b46f708726 | ||
|
|
f298567976 |
@@ -16,13 +16,17 @@ An RFB proxy, written in go that can save and replay FBS files
|
|||||||
- VineVnc(server)
|
- VineVnc(server)
|
||||||
- TigerVnc(client)
|
- TigerVnc(client)
|
||||||
|
|
||||||
## Usage:
|
|
||||||
|
|
||||||
### Executables (see releases)
|
### Executables (see releases)
|
||||||
* proxy - the actual recording proxy, supports listening to tcp & ws ports and recording traffic to fbs files
|
* proxy - the actual recording proxy, supports listening to tcp & ws ports and recording traffic to fbs files
|
||||||
* recorder - connects to a vnc server as a client and records the screen
|
* recorder - connects to a vnc server as a client and records the screen
|
||||||
* player - a toy player that will replay a given fbs file to all incoming connections
|
* player - a toy player that will replay a given fbs file to all incoming connections
|
||||||
|
|
||||||
|
## Usage:
|
||||||
|
recorder -recDir=./recording.rbs -targHost=192.168.0.100 -targPort=5903 -targPass=@@@@@
|
||||||
|
player -fbsFile=./myrec.fbs -tcpPort=5905
|
||||||
|
proxy -recDir=./recordings/ -targHost=192.168.0.100 -targPort=5903 -targPass=@@@@@ -tcpPort=5903 -vncPass=@!@!@!
|
||||||
|
|
||||||
### Code usage examples
|
### Code usage examples
|
||||||
* player/main.go (fbs recording vnc client)
|
* player/main.go (fbs recording vnc client)
|
||||||
* Connects as client, records to FBS file
|
* Connects as client, records to FBS file
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package logger
|
|||||||
|
|
||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
||||||
var simpleLogger = SimpleLogger{LogLevelDebug}
|
var simpleLogger = SimpleLogger{LogLevelWarn}
|
||||||
|
|
||||||
type Logger interface {
|
type Logger interface {
|
||||||
Debug(v ...interface{})
|
Debug(v ...interface{})
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ func main() {
|
|||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
url := "http://localhost:" + *wsPort + "/"
|
url := "http://0.0.0.0:" + *wsPort + "/"
|
||||||
|
|
||||||
if *tcpPort != "" && *wsPort != "" {
|
if *tcpPort != "" && *wsPort != "" {
|
||||||
logger.Infof("running two listeners: tcp port: %s, ws url: %s", *tcpPort, url)
|
logger.Infof("running two listeners: tcp port: %s, ws url: %s", *tcpPort, url)
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
proxy := &proxy.VncProxy{
|
proxy := &proxy.VncProxy{
|
||||||
WsListeningUrl: "http://localhost:" + string(*wsPort) + "/", // empty = not listening on ws
|
WsListeningUrl: "http://0.0.0.0:" + string(*wsPort) + "/", // empty = not listening on ws
|
||||||
RecordingDir: *recordDir, //"/Users/amitbet/vncRec", // empty = no recording
|
RecordingDir: *recordDir, //"/Users/amitbet/vncRec", // empty = no recording
|
||||||
TcpListeningUrl: tcpUrl,
|
TcpListeningUrl: tcpUrl,
|
||||||
ProxyVncPassword: *vncPass, //empty = no auth
|
ProxyVncPassword: *vncPass, //empty = no auth
|
||||||
|
|||||||
@@ -6,15 +6,15 @@ func TestProxy(t *testing.T) {
|
|||||||
//create default session if required
|
//create default session if required
|
||||||
|
|
||||||
proxy := &VncProxy{
|
proxy := &VncProxy{
|
||||||
WsListeningUrl: "http://localhost:7777/", // empty = not listening on ws
|
WsListeningUrl: "http://0.0.0.0:7778/", // empty = not listening on ws
|
||||||
RecordingDir: "/Users/amitbet/vncRec", // empty = no recording
|
RecordingDir: "d:\\", // empty = no recording
|
||||||
TcpListeningUrl: ":5904",
|
TcpListeningUrl: ":5904",
|
||||||
//recordingDir: "C:\\vncRec", // empty = no recording
|
//RecordingDir: "C:\\vncRec", // empty = no recording
|
||||||
ProxyVncPassword: "1234", //empty = no auth
|
ProxyVncPassword: "1234", //empty = no auth
|
||||||
SingleSession: &VncSession{
|
SingleSession: &VncSession{
|
||||||
TargetHostname: "localhost",
|
TargetHostname: "192.168.1.101",
|
||||||
TargetPort: "5903",
|
TargetPort: "5901",
|
||||||
TargetPassword: "Ch_#!T@8",
|
TargetPassword: "123456",
|
||||||
ID: "dummySession",
|
ID: "dummySession",
|
||||||
Status: SessionStatusInit,
|
Status: SessionStatusInit,
|
||||||
Type: SessionTypeRecordingProxy,
|
Type: SessionTypeRecordingProxy,
|
||||||
|
|||||||
Reference in New Issue
Block a user