mirror of
https://github.com/amitbet/vncproxy.git
synced 2025-08-07 08:43:35 +00:00
fixed: listning only to local server connections
This commit is contained in:
parent
b46f708726
commit
02dde77daa
@ -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)
|
||||||
|
@ -35,15 +35,15 @@ func main() {
|
|||||||
if *recordDir == "" {
|
if *recordDir == "" {
|
||||||
logger.Warn("FBS recording is turned off")
|
logger.Warn("FBS recording is turned off")
|
||||||
}
|
}
|
||||||
|
|
||||||
tcpUrl := ""
|
tcpUrl := ""
|
||||||
if *tcpPort != "" {
|
if *tcpPort != "" {
|
||||||
tcpUrl = ":" + string(*tcpPort)
|
tcpUrl = ":" + string(*tcpPort)
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
||||||
SingleSession: &proxy.VncSession{
|
SingleSession: &proxy.VncSession{
|
||||||
|
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user