Skip to content

Commit 9fa1257

Browse files
committed
proxy listens on all ip addresses
1 parent aa36ba8 commit 9fa1257

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

go-version/vmix-snapshot-proxy.exe

5 KB
Binary file not shown.

go-version/vmix-snapshot-proxy.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ func main() {
165165
conn, telnetError = net.Dial("tcp", address)
166166
if telnetError != nil {
167167
fmt.Printf("No connection to vMix Telent API: (%s)\r\n", address)
168+
time.Sleep(time.Second * 2)
168169
continue
169170
}
170171
conn.Write([]byte("SUBSCRIBE TALLY\r\n"))
@@ -200,7 +201,7 @@ func main() {
200201
PrintStatus()
201202

202203
// start the server
203-
app.Listen(fmt.Sprintf("%s:%d", myIp, proxyPort))
204+
app.Listen(fmt.Sprintf("%s:%d", "0.0.0.0", proxyPort))
204205

205206
if conn != nil {
206207
conn.Close()
@@ -215,6 +216,9 @@ func PrintStatus() {
215216
fmt.Printf("| vMix Web API URL: %s\n", vmixUrl)
216217
fmt.Println("|- AVAILABLE COMMANDS -----------------------------------------------------------------")
217218
fmt.Printf("| Running vMix Snapshot Proxy at port %d\n", proxyPort)
219+
fmt.Println("| NOTE: If this computer has multiple IP addresses, one of them will be displayed below")
220+
fmt.Println("| but this program will listen for connections on all available interfaces")
221+
fmt.Println("|")
218222
fmt.Printf("| Get a list of all inputs: http://%s:%d/\n", myIp, proxyPort)
219223
fmt.Printf("| Force regen one input (0 means program): http://%s:%d/regen/#\n", myIp, proxyPort)
220224
fmt.Printf("| Force regen all inputs: http://%s:%d/regen\n", myIp, proxyPort)
@@ -246,7 +250,7 @@ func GetInputs() {
246250
fmt.Println(url)
247251
bodyBytes := DoRequest(url)
248252
if bodyBytes == nil {
249-
fmt.Println("ERROR: vMix failed to retriev inputs... Is vMix running?")
253+
fmt.Println("\nERROR: vMix failed to retrieve inputs... Is vMix running?")
250254
return
251255
}
252256
fmt.Println(string(bodyBytes))

go-version/vmix-snapshot-proxy.zip

1.82 KB
Binary file not shown.

0 commit comments

Comments
 (0)