added missing target host to cmdline params

This commit is contained in:
amit bezalel
2017-10-12 01:21:59 +03:00
parent 7852f11ceb
commit 47fefaacb6
3 changed files with 20 additions and 6 deletions

View File

@@ -12,6 +12,7 @@ func main() {
var vncPass = flag.String("vncPass", "", "password on incoming vnc connections to the proxy, defaults to no password")
var recordDir = flag.String("recDir", "", "path to save FBS recordings WILL NOT RECORD if not defined.")
var targetVncPort = flag.String("targPort", "", "target vnc server port")
var targetVncHost = flag.String("targHost", "", "target vnc server host")
var targetVncPass = flag.String("targPass", "", "target vnc password")
flag.Parse()
@@ -34,14 +35,19 @@ func main() {
if *recordDir == "" {
logger.Warn("FBS recording is turned off")
}
tcpUrl := ""
if *tcpPort != "" {
tcpUrl = ":" + string(*tcpPort)
}
proxy := &proxy.VncProxy{
WsListeningUrl: "http://localhost:" + string(*wsPort) + "/", // empty = not listening on ws
RecordingDir: *recordDir, //"/Users/amitbet/vncRec", // empty = no recording
TcpListeningUrl: ":" + string(*tcpPort),
TcpListeningUrl: tcpUrl,
ProxyVncPassword: *vncPass, //empty = no auth
SingleSession: &proxy.VncSession{
TargetHostname: "localhost",
TargetHostname: *targetVncHost,
TargetPort: *targetVncPort,
TargetPassword: *targetVncPass, //"vncPass",
ID: "dummySession",