Skip to content

Commit 46e93f6

Browse files
committed
Rename WebRTTY > WebTTY
1 parent 5c1b6b8 commit 46e93f6

11 files changed

Lines changed: 37 additions & 38 deletions

File tree

‎.circleci/config.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ version: 2
22
jobs:
33
build:
44
docker:
5-
- image: maxmcd/webrtty-node-go:latest
6-
working_directory: /go/src/github.com/maxmcd/webrtty
5+
- image: maxmcd/webtty-node-go:latest
6+
working_directory: /go/src/github.com/maxmcd/webtty
77
steps:
88
- restore_cache:
99
keys:

‎.gitignore‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
.DS_Store
2-
/webrtty
2+
/webtty
33
coverage.out
44

‎client.go‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"syscall"
1010

1111
"github.com/kr/pty"
12-
"github.com/maxmcd/webrtty/pkg/sd"
12+
"github.com/maxmcd/webtty/pkg/sd"
1313
"github.com/mitchellh/colorstring"
1414
"github.com/pions/webrtc"
1515
"github.com/pions/webrtc/pkg/datachannel"
@@ -156,7 +156,6 @@ func (cs *clientSession) run() (err error) {
156156

157157
encodedAnswer := sd.Encode(answerSd)
158158
if cs.offer.TenKbSiteLoc == "" {
159-
// Get the LocalDescription and take it to base64 so we can paste in browser
160159
fmt.Printf("Answer created. Send the following answer to the host:\n\n")
161160
fmt.Println(encodedAnswer)
162161
} else {

‎docker-compose.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ version: '3.3'
22
services:
33
app:
44
build: .
5-
image: maxmcd/webrtty-node-go
5+
image: maxmcd/webtty-node-go

‎host.go‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
"time"
1313

1414
"github.com/kr/pty"
15-
"github.com/maxmcd/webrtty/pkg/sd"
15+
"github.com/maxmcd/webtty/pkg/sd"
1616
"github.com/mitchellh/colorstring"
1717
"github.com/pions/webrtc"
1818
"github.com/pions/webrtc/pkg/datachannel"
@@ -92,7 +92,6 @@ func (hs *hostSession) dataChannelOnOpen() func() {
9292
}
9393
}
9494

95-
9695
func (hs *hostSession) dataChannelOnMessage() func(payload datachannel.Payload) {
9796
return func(payload datachannel.Payload) {
9897

@@ -152,7 +151,7 @@ func (hs *hostSession) dataChannelOnMessage() func(payload datachannel.Payload)
152151
return
153152
}
154153
hs.errChan <- fmt.Errorf(
155-
`Unmatched string message: "%s"`,
154+
`Unmatched string message: "%s"`,
156155
string(p.Data),
157156
)
158157
case *datachannel.PayloadBinary:
@@ -163,7 +162,7 @@ func (hs *hostSession) dataChannelOnMessage() func(payload datachannel.Payload)
163162
}
164163
default:
165164
hs.errChan <- fmt.Errorf(
166-
"Message with type %s from DataChannel has no payload",
165+
"Message with type %s from DataChannel has no payload",
167166
p.PayloadType().String())
168167
}
169168
}
@@ -210,11 +209,11 @@ func (hs *hostSession) run() (err error) {
210209
if err = hs.init(); err != nil {
211210
return
212211
}
213-
colorstring.Printf("[bold]Setting up a WebRTTY connection.\n\n")
212+
colorstring.Printf("[bold]Setting up a WebTTY connection.\n\n")
214213
if hs.oneWay {
215214
colorstring.Printf(
216215
"Warning: One-way connections rely on a third party to connect. " +
217-
"More info here: https://github.com/maxmcd/webrtty#one-way-connections\n\n")
216+
"More info here: https://github.com/maxmcd/webtty#one-way-connections\n\n")
218217
}
219218

220219
if err = hs.createOffer(); err != nil {
@@ -224,8 +223,8 @@ func (hs *hostSession) run() (err error) {
224223
// Output the offer in base64 so we can paste it in browser
225224
colorstring.Printf("[bold]Connection ready. Here is your connection data:\n\n")
226225
fmt.Printf("%s\n\n", sd.Encode(hs.offer))
227-
colorstring.Printf(`[bold]Paste it in the terminal after the webrtty command` +
228-
"\n[bold]Or in a browser: [reset]https://maxmcd.github.io/webrtty/\n\n")
226+
colorstring.Printf(`[bold]Paste it in the terminal after the webtty command` +
227+
"\n[bold]Or in a browser: [reset]https://maxmcd.github.io/webtty/\n\n")
229228

230229
if hs.oneWay == false {
231230
colorstring.Println("[bold]When you have the answer, paste it below and hit enter:")

‎main.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func main() {
1616
_ = flag.Bool("cmd", false, "The command to run. Default is \"bash -l\"\n"+
1717
"Because this flag consumes the remainder of the command line,\n"+
1818
"all other args (if present) must appear before this flag.\n"+
19-
"eg: webrtty -o -v -ni -cmd docker run -it --rm alpine:latest sh")
19+
"eg: webtty -o -v -ni -cmd docker run -it --rm alpine:latest sh")
2020
stunServer := flag.String("s", "stun:stun.l.google.com:19302", "The stun server to use")
2121

2222
cmd := []string{"bash", "-l"}

‎readme.md‎

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
1-
![](https://maxmcd.github.io/webrtty/out.gif)
1+
![](https://maxmcd.github.io/webtty/out.gif)
22

3-
# WebRTTY
3+
# WebTTY
44

5-
WebRTTY allows you to share a terminal session from your machine using WebRTC. You can pair with a friend without setting up a proxy server, debug servers behind NATs, and more. WebRTTY also works in-browser. You can connect to a WebRTTY session from this static page: https://maxmcd.github.io/webrtty/
5+
WebTTY allows you to share a terminal session from your machine using WebRTC. You can pair with a friend without setting up a proxy server, debug servers behind NATs, and more. WebTTY also works in-browser. You can connect to a WebTTY session from this static page: https://maxmcd.github.io/webtty/
66

77
### Status
88

99
There are a handful of bugs to fix, but everything works pretty well at the moment. Please open an issue if you find a bug.
1010

1111
### Installation
1212
```bash
13-
go get -u github.com/maxmcd/webrtty
13+
go get -u github.com/maxmcd/webtty
1414
```
15-
WebRTTY uses the wonderful [pions/webrtc](https://github.com/pions/webrtc) for WebRTC communication. It currently requires OpenSSL to build. More here: https://github.com/pions/webrtc#install
15+
WebTTY uses the wonderful [pions/webrtc](https://github.com/pions/webrtc) for WebRTC communication. It currently requires OpenSSL to build. More here: https://github.com/pions/webrtc#install
1616

1717
### Running
1818

1919
```shell
20-
> webrtty -h
21-
Usage of webrtty:
20+
> webtty -h
21+
Usage of webtty:
2222
-cmd
2323
The command to run. Default is "bash -l"
2424
Because this flag consumes the remainder of the command line,
2525
all other args (if present) must appear before this flag.
26-
eg: webrtty -o -v -ni -cmd docker run -it --rm alpine:latest sh
26+
eg: webtty -o -v -ni -cmd docker run -it --rm alpine:latest sh
2727
-ni
2828
Set host to non-interactive
2929
-non-interactive
@@ -34,39 +34,39 @@ Usage of webrtty:
3434

3535
```shell
3636
# On the host computer
37-
> webrtty
38-
Setting up a WebRTTY connection.
37+
> webtty
38+
Setting up a WebTTY connection.
3939

4040
Connection ready. Here is your connection data:
4141

4242
25FrtDEjh7yuGdWMk7R9PhzPmphst7FdsotL11iXa4r9xyTM4koAauQYivKViWYBskf8habEc5vHf3DZge5VivuAT79uSCvzc6aL2M11kcUn9rzb4DX4...
4343

44-
Paste it in the terminal after the webrtty command
45-
Or in a browser: https://maxmcd.github.io/webrtty/
44+
Paste it in the terminal after the webtty command
45+
Or in a browser: https://maxmcd.github.io/webtty/
4646

4747
When you have the answer, paste it below and hit enter:
4848
# On the client computer
49-
webrtty 25FrtDEjh7yuGdWMk7R9PhzPmphst7FdsotL11iXa4r9xyTM4koAauQYivKViWYBskf8habEc5vHf3DZge5VivuAT79uSCvzc6aL2M11kcUn9rzb4DX4...
49+
webtty 25FrtDEjh7yuGdWMk7R9PhzPmphst7FdsotL11iXa4r9xyTM4koAauQYivKViWYBskf8habEc5vHf3DZge5VivuAT79uSCvzc6aL2M11kcUn9rzb4DX4...
5050

5151

5252
```
5353

5454
### Terminal Size
5555

56-
By default WebRTTY forces the size of the client terminal. This means the host size can frequently render incorrectly. One way you can fix this is by using tmux:
56+
By default WebTTY forces the size of the client terminal. This means the host size can frequently render incorrectly. One way you can fix this is by using tmux:
5757

5858
```bash
5959
tmux new-session -s shared
6060
# in another terminal
61-
webrtty -ni -cmd tmux attach-session -t shared
61+
webtty -ni -cmd tmux attach-session -t shared
6262
```
6363
Tmux will now resize the session to the smallest terminal viewport.
6464

6565
### One-way Connections
6666

67-
One-way connections can be enabled with the `-o` flag. A typical webrtc connection requires an SDP exchange between both parties. By default, WebRTTY will create an SDP offer and wait for you to enter the SDP answer. With the `-o` flag the initial offer is sent along with a public url that the receiver is expected to post their response to. This uses my service [10kb.site](https://www.10kb.site). The host then polls the url continually until it gets an answer.
67+
One-way connections can be enabled with the `-o` flag. A typical webrtc connection requires an SDP exchange between both parties. By default, WebTTY will create an SDP offer and wait for you to enter the SDP answer. With the `-o` flag the initial offer is sent along with a public url that the receiver is expected to post their response to. This uses my service [10kb.site](https://www.10kb.site). The host then polls the url continually until it gets an answer.
6868

69-
I think this somewhat violates the spirit of this tool because it relies on a third party service. However, one-way connections allow you to do very cool things. Eg: I can have a build server output a WebRTTY connection string on error and allow anyone to attach to the session.
69+
I think this somewhat violates the spirit of this tool because it relies on a third party service. However, one-way connections allow you to do very cool things. Eg: I can have a build server output a WebTTY connection string on error and allow anyone to attach to the session.
7070

7171
SDP descriptions are encrypted when uploaded and encryption keys are shared with the connection data to decrypt. So presumably the service being compromised is not problematic.
7272

‎session.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"log"
55
"os"
66

7-
"github.com/maxmcd/webrtty/pkg/sd"
7+
"github.com/maxmcd/webtty/pkg/sd"
88
"github.com/pions/webrtc"
99
"github.com/pions/webrtc/pkg/datachannel"
1010
"github.com/pions/webrtc/pkg/ice"

‎web-client/package.json‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
2-
"name": "webrtty",
2+
"name": "webtty",
33
"version": "0.0.1",
44
"description": "",
55
"main": "app.js",
66
"scripts": {
77
"build": "npm run go-build && parcel build src/index.html --public-url .",
8-
"go-build": "mkdir -p ./dist/ && touch ./dist/foo && rm ./dist/* && GOOS=js GOARCH=wasm go build -o ./dist/main.wasm ./src",
8+
"go-build":
9+
"mkdir -p ./dist/ && touch ./dist/foo && rm ./dist/* && GOOS=js GOARCH=wasm go build -o ./dist/main.wasm ./src",
910
"serve": "parcel serve src/index.html",
1011
"test": "echo notests",
1112
"deploy": "npm run build && gh-pages -d dist"

‎web-client/src/app.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ term.fit();
6262
window.onresize = () => {
6363
term.fit();
6464
};
65-
term.write("Welcome to the WebRTTY web client.\n\r");
65+
term.write("Welcome to the WebTTY web client.\n\r");
6666

6767
let pc = new RTCPeerConnection({
6868
iceServers: [
@@ -136,7 +136,7 @@ if (urlData != "") {
136136
}
137137

138138
if (firstInput == false) {
139-
term.write("Run webrtty and paste the offer message below:\n\r");
139+
term.write("Run webtty and paste the offer message below:\n\r");
140140
}
141141

142142
term.on("data", data => {

0 commit comments

Comments
 (0)
⌂ 换网址