Wez Furlong
8ff9340d2f
wezterm: implement scrollback search for remote mux'd tabs
...
refs: https://github.com/wez/wezterm/issues/91
2020-05-30 09:40:44 -07:00
Wez Furlong
e6cc28a813
mux: use approx rtt to decide whether to use predictive echo
...
We'll only use it if it looks like the latency is over 100ms.
2020-03-31 08:41:53 -07:00
Wez Furlong
9d89241a66
mux: add input event serial number to key events and render responses
...
This should allow some basic reasoning about how in sync we are with
the remote system.
The immediate application of this is to try to avoid wiggling the
text cursor when the predictive echo updates the position locally.
I need to push this in order to test it on my higher latency setup,
so I don't know if this is totally effective yet.
2020-03-10 08:34:47 -07:00
Wez Furlong
6df260219a
mux: improve how we handle EOF on a given tab
...
This adjusts the mux protocol so that we can tell when a remote tab
has been closed; previously we couldn't distinguish between an IO
error and the tab going away.
Similarly, if the remote mux has shut down (which we detect via an EOF),
then we won't try to reconnect and will proceed to detach that domain.
2020-03-06 08:44:46 -08:00
Wez Furlong
fa4bddd943
mux: improve error handling around ssh bootstrap and tls setup
...
Work a bit harder to capture more context and log it.
As of this commit, windows is now able to use openssl to connect to
a remote mux over TLS.
2020-02-02 13:03:07 -08:00
Wez Furlong
9b02089849
mux: tls: auto-bootstrap via ssh
...
This makes the tls channel much easier to use; the config can now be as
simple as this on the server side:
```toml
[[tls_servers]]
bind_address = "192.168.1.8:8080"
```
and this on the client side:
```
[[tls_clients]]
name = "hostname"
bootstrap_via_ssh = "192.168.1.8"
remote_address = "hostname:8080"
```
and then `wezterm connect hostname` will use ssh to connect to the
host, start the mux server, request the CA and client certs and
then connect to it over TLS.
This is implemented only for openssl at the moment.
2020-02-02 13:03:07 -08:00
Wez Furlong
4b455288dd
track the full current dir URL for OSC 7
...
Matching against the current dir when it includes a host and a
path seems like a handy way to automate selecting appropriate
theme/color/profile settings, so I'd like to make sure that
we have the full URL content available for that.
Refs: https://github.com/wez/wezterm/issues/115
Refs: https://github.com/wez/wezterm/issues/117
2020-01-14 22:06:13 -08:00
Wez Furlong
c989485a77
mux: add basic version handshake at domain connect time
2020-01-13 08:10:23 -08:00
Jeremy Fitzhardinge
cb34ac9cdd
Add working dir to mux protocol
2020-01-11 18:25:17 -08:00
Jeremy Fitzhardinge
83641ed46c
Spawn new tabs using the current tab's current directory
...
(If known.)
2020-01-11 18:25:17 -08:00
Wez Furlong
57ad948af1
mux: add bonus lines to GetTabRenderChangesResponse
...
The server now uses this to send the line content for
whichever line the cursor is on, which makes typing
latency better.
2020-01-06 08:36:56 -08:00
Wez Furlong
b384ee4233
make it possible to re-use the line serialization in other pdus
2020-01-06 08:21:12 -08:00
Wez Furlong
0b3af1b7fe
add a pdu size histogram to the stats
...
It tracks the serialized size of the data; here's some stats from a `--release`
build:
```
STAT p50 p75 p95
Key(executor.spawn_delay) 9.09µs 11.14µs 29.44µs
Key(gui.paint.opengl) 7.18ms 7.86ms 28.31ms
Key(pdu.decode.compressed.size) 161 807 2575
Key(pdu.decode.size) 34 41 45
Key(pdu.encode.size) 5 6 12
Key(pdu.size, [pdu = GetLinesResponse]) 161 807 2575
Key(pdu.size, [pdu = GetLines]) 9 12 16
Key(pdu.size, [pdu = GetTabRenderChangesResponse]) 41 41 47
Key(pdu.size, [pdu = GetTabRenderChanges]) 5 5 5
Key(pdu.size, [pdu = ListTabsResponse]) 15 15 15
Key(pdu.size, [pdu = ListTabs]) 3 3 3
Key(pdu.size, [pdu = Resize]) 10 11 11
Key(pdu.size, [pdu = SendKeyDown]) 7 8 8
Key(pdu.size, [pdu = UnitResponse]) 0 0 0
Key(rpc, [method = get_lines]) 729.09µs 4.06ms 10.16ms
Key(rpc, [method = get_tab_render_changes]) 335.87µs 362.50µs 436.22µs
Key(rpc, [method = key_down]) 183.30µs 205.82µs 284.67µs
Key(rpc, [method = list_tabs]) 244.74µs 244.74µs 244.74µs
Key(rpc, [method = resize]) 557.06µs 1.35ms 1.82ms
Key(shape.harfbuzz) 10.24µs 19.20µs 35.33µs
```
2020-01-06 08:03:29 -08:00
Wez Furlong
f0ea9af97a
renumber some pdus to make version mismatch more apparent
2020-01-06 07:54:30 -08:00
Wez Furlong
100084d6e5
remove the OpenURL pdu from the codec
...
Link clicking is handled locally now, so this is not needed.
2020-01-06 07:33:40 -08:00
Wez Furlong
4687b3bb48
clippy
2020-01-05 15:14:32 -08:00
Wez Furlong
624c7234e4
Improve serializing hyperlinks in lines for the mux
...
This is both a little more efficient on the wire and results in
hovering over hyperlinks working as you would expect in the mux.
2020-01-05 14:37:17 -08:00
Wez Furlong
cd2b57cc51
use rangeset to streamline line fetches
2020-01-05 14:37:17 -08:00
Wez Furlong
d79455c2b4
switch most of the rest of the mux over to the new model
...
This mostly works, but has a cache invalidation issue wrt.
passing invalidated rows from the server to the client...
sometimes.
However, scrollback is cached on demand and selection works.
2020-01-05 14:37:17 -08:00
Wez Furlong
66b8b774f5
partially connect new data to mux rpc layer
2020-01-05 14:37:17 -08:00
Wez Furlong
bc24399f06
instrument rpc size distribution
2020-01-05 14:37:17 -08:00
Wez Furlong
4270d144d4
Add GetLines rpc
2020-01-05 14:37:17 -08:00
Wez Furlong
f17feb305b
remove highlight and mouse response bits from the rpc
2020-01-05 14:37:17 -08:00
Wez Furlong
0a1a44eef0
pass mouse grabbed state over remote tabs
...
This allows local double click selection to work outside vim
and for mouse reporting to work inside vim.
2020-01-05 14:37:17 -08:00
Wez Furlong
12b537d2c8
serde_derive -> serde with derive feature
2020-01-05 14:37:17 -08:00
Wez Furlong
9a2c7a1485
failure -> anyhow + thiserror
2019-12-14 21:43:05 -08:00
Wez Furlong
dc3c5cbdd6
enable url highlighting over mux
2019-06-21 21:40:48 -07:00
Wez Furlong
e12f413224
propagate url clicks back to client
2019-06-21 18:44:07 -07:00
Wez Furlong
938eb5e1cf
remove old coarse pdus
2019-06-20 21:38:08 -07:00
Wez Furlong
4171ad3aa3
fix surface size for newly spawned tabs
...
Problem scenario was:
* spawn a window
* resize it larger
* spawn a new tab
When working with a mux client tab, the surface size in the new tab
didn't reflect the size of the remote surface, so the rendering was
messed up.
Arrange to know the size up front.
2019-06-20 08:46:58 -07:00
Wez Furlong
7bff509540
allow server to unilaterally send clipboard when it changes
2019-06-20 08:29:09 -07:00
Wez Furlong
c18dd96472
can now push changes from server->client
...
Need to emit them in more places. The idea is that this helps
to reduce the event->display latency.
2019-06-17 08:47:24 -07:00
Wez Furlong
df381e483c
refactor server side client session state
2019-06-16 22:29:30 -07:00
Wez Furlong
6ceefb2576
re-structure client in readiness for unilateral responses
2019-06-16 21:04:53 -07:00
Wez Furlong
cf2b4896c5
clippy
2019-06-16 21:04:53 -07:00
Wez Furlong
6beee56675
helpers for streaming decode of pdus
2019-06-16 21:04:53 -07:00
Wez Furlong
302db2c976
a lighter way to pass selection ranges for client tabs
2019-06-16 21:04:53 -07:00
Wez Furlong
b58d329b07
some plumbing to use Surface+Change for the mux protocol
2019-06-16 21:04:53 -07:00
Wez Furlong
4089adba20
disable nagling, saves ~100ms latency
2019-06-14 08:30:24 -07:00
Wez Furlong
a2b52eb777
remove IsTabDead rpc; can infer it from poll
2019-06-12 07:05:38 -07:00
Wez Furlong
7b7258d410
plumb title for mux tabs
2019-06-11 08:35:07 -07:00
Wez Furlong
7456c06028
basically working attach to remote tabs/windows
...
The Domain::spawn interface needs to be adjusted to allow indicating
which window we want to spawn into, or whether the spawn should
create a new window, but aside from that, we can now attach to
a mux server and instantiate tabs and windows!
2019-06-11 06:48:19 -07:00
Wez Furlong
9b6800f589
we can now pass the clipboard back from the remote tab
...
So clicking to select now populates the clipboard
2019-06-10 08:13:14 -07:00
Wez Furlong
2ae68209b7
improve dirty line management in client tabs
...
This fixes up a case where a tab was closed and the screen
didn't repaint to show the now-current tab.
2019-06-10 07:57:08 -07:00
Wez Furlong
70579b45b7
improve error handling in mux codec
2019-06-09 21:00:00 -07:00
Wez Furlong
8b6317ba19
add resize to clienttab
2019-06-09 17:59:41 -07:00
Wez Furlong
d00eb0cab4
implement client side send paste
2019-06-09 16:39:54 -07:00
Wez Furlong
86cd39eb4e
we can now send input to a client tab
2019-06-09 16:33:57 -07:00
Wez Furlong
46fb1fe40c
we can now see the remote tab rendered via the muxed domain
2019-06-09 13:38:19 -07:00
Wez Furlong
ee54864d6a
allow writing to a muxed tab
2019-06-09 13:00:36 -07:00