tstream
tstream copied to clipboard
Unable to specify Server with tstream.
First I started tserver
$ ./tserver
TStream server v1.3.2
Serving at: localhost:3000
When another terminal is opened and TStream is launched with the same option as an example, streaming starts with https://tstream.club/
$ ./tstream -server http://localhost:3000
TStream v1.3.2
✔ Username: █atoken
✔ Stream title: hoge█
Press Enter to continue!
🔥 Streaming at: https://tstream.club/matoken
If you change the server from http://localhost:3000
to http://localhost:3000/
, it has become an error
$ ./tstream -server http://localhost:3000/
TStream v1.3.2
✔ Username: █atoken
Stream title: hoge
Press Enter to continue!
Failed to connect to server
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x6575a2]
goroutine 1 [running]:
golang.org/x/term.restore(0x0, 0x0, 0x0, 0x1c)
/go/pkg/mod/golang.org/x/[email protected]/term_unix.go:57 +0x22
golang.org/x/term.Restore(...)
/go/pkg/mod/golang.org/x/[email protected]/term.go:43
golang.org/x/crypto/ssh/terminal.Restore(...)
/go/pkg/mod/golang.org/x/[email protected]/ssh/terminal/terminal.go:64
github.com/qnkhuat/tstream/pkg/ptyMaster.(*PtyMaster).Restore(...)
/go/src/github.com/qnkhuat/tstream/tstream/pkg/ptyMaster/ptyMaster.go:90
github.com/qnkhuat/tstream/pkg/streamer.(*Streamer).Stop(0xc0000c5220, 0xc00002a4e0, 0x1b)
/go/src/github.com/qnkhuat/tstream/tstream/pkg/streamer/streamer.go:272 +0x10f
github.com/qnkhuat/tstream/pkg/streamer.(*Streamer).Start(0xc0000c5220, 0x1b, 0xba69d9)
/go/src/github.com/qnkhuat/tstream/tstream/pkg/streamer/streamer.go:90 +0x3f8
main.main()
/go/src/github.com/qnkhuat/tstream/tstream/cmd/tstream.go:165 +0xb25
Debian sid amd64 environment tserver_1.3.2_linux_x86_64.tar.gz
And TStream_1.3.2_linux_x86_64.tar.gz
was used.
hi @matoken
In order to display the message correctly, you need to pass another param -client https://your-frontend-domain
.
It just defaults to https://stream.club that why you saw the message.
But under the hood tstream should be streaming to your server now. You can confirm it by calling curl http://localhost:3000/api/rooms
. it should return a list of rooms that contain your room.
If you change the server from http://localhost:3000 to http://localhost:3000/, it has become an error
I'll add a better join url function to fix this :)