1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-21 12:21:32 +03:00
Commit Graph

1214 Commits

Author SHA1 Message Date
Wez Furlong
9978c1234c restructure throttling around scanning and pushing changes 2019-06-21 08:44:10 -07:00
Wez Furlong
cfeb7e4705 remove dead commented out code 2019-06-21 07:58:49 -07:00
Wez Furlong
4ddef39b52 ratelimit unilateral pushes 2019-06-21 07:56:09 -07:00
Wez Furlong
9a4ae0a06b ratelimit child process output
In the early days we relied upon the bounded length of a sync channel
to put back pressure on the output from a child command.  We're no
longer using that kind of channel, so here's a more deliberate and
measurable rate limiting implementation.

The `ratelimit_output_bytes_per_second` configuration setting defaults
to 2MB/s and constrains the amount of text we send to the escape
sequence parser.

This value was selected based on it being a combination of responsive
to ctrl-c while outputing a lot of data and still generating sleeps
to remain within the constraints.

This does mean that terminal benchmarks that test how quickly you
can dump text to the terminal will hit this artifical upper limit
and are thus not going to be a true measure of performance.
2019-06-21 07:16:37 -07:00
Wez Furlong
130a7263d4 avoid repeated emission of cursor updates when scrolled back 2019-06-20 21:39:47 -07:00
Wez Furlong
938eb5e1cf remove old coarse pdus 2019-06-20 21:38:08 -07:00
Wez Furlong
760f9f25de implement peer authentication on the server side
This is admittedly pretty environment-specific, but it matches
an environment that I use :-p
2019-06-20 18:46:31 -07:00
Wez Furlong
16e26797d4 make openssl the default on unix systems 2019-06-20 17:35:20 -07:00
Wez Furlong
4ad7ff3083 use openssl directly for the client when that feature is enabled
This removes some redundancy and overhead around setting up the
connection (the native_tls crate doesn't provide PEM functions,
despite every deployment I've ever seen only ever using PEM certs),
but more importantly, gives the control needed to make hostname
verification work in a PKI setup with unusual CN values.
2019-06-20 17:27:40 -07:00
Wez Furlong
6c9e851ffa make mux server frontend channel unbounded
This avoids the possibility of deadlock if you connect to a remote
host and quickly dump a lot of output to the terminal.
2019-06-20 08:59:26 -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
e993e5a625 allow capturing the clipboard impl from the terminal host
This should allow asynchronous access to the clipboard, which
in turn will allow the server to send the clipboard to the client
unilaterally.
2019-06-20 07:55:03 -07:00
Wez Furlong
0b9c953446 bump for filedescriptor changes 2019-06-20 06:55:10 -07:00
Wez Furlong
40ff31f984 fixup mux session over tls 2019-06-19 09:30:49 -07:00
Wez Furlong
da02bf0ba7 repaint when switching between mux'd tabs 2019-06-19 08:53:05 -07:00
Wez Furlong
26cdb6c87f improve latency for server -> client push 2019-06-19 08:40:19 -07:00
Wez Furlong
97daa8b246 switch to using the poll stuff from filedescriptor 0.3 2019-06-19 00:01:35 -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
2f5b710b3e more listener plumbing in readiness for sending unilateral responses 2019-06-17 07:02:21 -07:00
Wez Furlong
5407a31dbb move pollable bits to own module 2019-06-16 22:38:04 -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
1d2b4291d3 prep for dealing with unilaterally sent pdus 2019-06-16 21:04:53 -07:00
Wez Furlong
764597851c allow collapsing mouse events in the mux protocol
Repeated moves or wheel events are collapsed so that we don't clog up
the queue.  The queue size doesn't matter as much as the latency of
processing a large queue.  For fast or repeated moves the queue can grow
rather quickly, and with what is currently ~25-50 ms round trip per
entry for a remote session, that is a poor UX.
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
55caafb0c4 more properly fix cond notify on Promise::drop 2019-06-16 21:04:53 -07:00
Wez Furlong
d061303bb4 don't forget to copy in the configured color palette! 2019-06-16 14:49:54 -07:00
David Soria Parra
158a043a40 get-deps: add libssl-dev 2019-06-16 14:25:31 -07:00
David Soria Parra
7cf91d4658 get-deps: sort list 2019-06-16 14:25:31 -07:00
Wez Furlong
797c7bb41a clippy 2019-06-14 20:49:49 -07:00
Wez Furlong
99d6c12532 poll the client tab asynchronously
Restructure the poll routine so that we don't block the gui thread
while we wait for the render data to be returned from the server.
2019-06-14 20:30:45 -07:00
Wez Furlong
036ff424f0 futurify the client methods, make key presses async 2019-06-14 19:44:20 -07:00
Wez Furlong
13640d565a assume openssl by default on !macos unix platforms 2019-06-14 16:37:12 -07:00
Wez Furlong
4089adba20 disable nagling, saves ~100ms latency 2019-06-14 08:30:24 -07:00
Wez Furlong
8f81da406e make openssl optional
Concerned about packaging that bit on windows at the moment
2019-06-14 06:40:02 -07:00
Wez Furlong
83de1117ff add tls mux client
The latency is not great, and there are more authentication and
authorization features that need to be added, but this shows that
we can connect and talk to a remote muxer.
2019-06-14 06:40:02 -07:00
Wez Furlong
16bcf7cf54 make client generic over Read+Write rather than UnixStream 2019-06-14 06:40:02 -07:00
Wez Furlong
f86b65270b add basic tls listener
We don't yet have a client that knows how to connect to it
2019-06-14 06:40:02 -07:00
Wez Furlong
2e4214de48 fixup travis build 2019-06-14 06:40:02 -07:00
Wez Furlong
b673dfd4d7 fixup some warnings, rename mux related flags 2019-06-13 21:53:14 -07:00
Wez Furlong
1d44098747 add cli command to list tabs 2019-06-13 21:53:14 -07:00
Wez Furlong
a6ff84a268 fixup fontconfig detection on centos 7
This compiles on my centos 7 machine, but I've not tried to run
the gui frontend on this system because it is headless.
2019-06-13 21:51:16 -07:00
Wez Furlong
2156d4d9a3 use https for freetype2, as it is easier to access via a proxy 2019-06-13 21:20:56 -07:00
Wez Furlong
01a8c32b55 unblock tunneled mux protocol work
It's taking a while for https://github.com/jwilm/vte/pull/20 to get
merged, so point to my branch directly while I build out some
tunneled mux protocol escape sequences.

I'll need to fork vte on crates.io if vte doesn't merge the PR
before the next termwiz crate bump.
2019-06-13 06:57:10 -07:00
Wez Furlong
1ec8575da5 make ClientSession generic over Read+Write 2019-06-12 23:35:32 -07:00
Wez Furlong
74717744ba Remove perssimstic do_paint call
This do_paint call was added in 8995974124
but I don't think it was intentional; it looks like an accidental commit
of something during debugging.

The intent is that we tick over and paint every tick (~50ms) and this
behavior here was causing us to paint after every input event, which is
undesirable when processing the selection.

refs: https://github.com/wez/wezterm/issues/33
2019-06-12 08:21:25 -07:00