Merge pull request #4228 from cdr/bpmct/ipad-fixup

update iPad docs to reflect info in Sep 2021
This commit is contained in:
Joe Previte 2021-09-23 17:13:39 +00:00 committed by GitHub
commit ed0926819d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,14 +3,14 @@
# iPad
- [Using the code-server progressive web app (PWA)](#using-the-code-server-progressive-web-app-pwa)
- [Access code-server with a self-signed certificate on an iPad](#access-code-server-with-a-self-signed-certificate-on-an-ipad)
- [Certificate requirements](#certificate-requirements)
- [Sharing a self-signed certificate with an iPad](#sharing-a-self-signed-certificate-with-an-ipad)
- [Access code-server using Servediter](#access-code-server-using-servediter)
- [Raspberry Pi USB-C network](#raspberry-pi-usb-c-network)
- [Recommendations](#recommendations)
- [Known issues](#known-issues)
- [Workaround for issue with `ctrl+c` not stopping a running process in the terminal](#workaround-for-issue-with-ctrlc-not-stopping-a-running-process-in-the-terminal)
- [Access code-server with a self-signed certificate on an iPad](#access-code-server-with-a-self-signed-certificate-on-an-ipad)
- [Certificate requirements](#certificate-requirements)
- [Sharing a self-signed certificate with an iPad](#sharing-a-self-signed-certificate-with-an-ipad)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
@ -45,51 +45,6 @@ can add this to `keybindings.json`:
4. Test the command by using `cmd+w` to close an active file.
## Access code-server with a self-signed certificate on an iPad
If you've installed code-server and are [running it with a self-signed
certificate](./guide.md#using-a-self-signed-certificate), you may see multiple
security warnings from Safari. To fix this, you'll need to install the
self-signed certificate generated by code-server as a profile on your device (you'll also need to do this to
enable WebSocket connections).
### Certificate requirements
- We're assuming that you're using the self-signed certificate code-server
generates for you (if not, make sure that your certificate [abides by the
guidelines issued by Apple](https://support.apple.com/en-us/HT210176)).
- We've noticed that the certificate has to include `basicConstraints=CA:true`.
- Your certificate must have a subject alt name that matches the hostname you'll
use to access code-server from the iPad. You can pass this name to code-server
so that it generates the certificate correctly using `--cert-host`.
### Sharing a self-signed certificate with an iPad
To share a self-signed certificate with an iPad:
1. Get the location of the certificate code-server generated; code-server prints
the certificate's location in its logs:
```console
[2020-10-30T08:55:45.139Z] info - Using generated certificate and key for HTTPS: ~/.local/share/code-server/mymbp_local.crt
```
2. Send the certificate to the iPad, either by emailing it to yourself or using
Apple's Airdrop feature.
3. Open the `*.crt` file so that you're prompted to go into Settings to install.
4. Go to **Settings** > **General** > **Profile**, and select the profile. Tap **Install**.
5. Go to **Settings** > **About** > **Certificate Trust Settings** and [enable
full trust for your certificate](https://support.apple.com/en-us/HT204477).
You should be able to access code-server without all of Safari's warnings now.
**warning**: Your iPad must access code-server via a domain name. It could be local
DNS like `mymacbookpro.local`, but it must be a domain name. Otherwise, Safari will
not allow WebSockets connections.
## Access code-server using Servediter
If you are unable to get the self-signed certificate working, or you do not have a domain
@ -149,7 +104,6 @@ and tricks helpful:
process](#access-code-server-with-a-self-signed-certificate-on-an-ipad)
- Keyboard issues:
- The keyboard disappear sometimes
[#1313](https://github.com/cdr/code-server/issues/1313),
[#979](https://github.com/cdr/code-server/issues/979)
- Some expectations regarding shortcuts may not be met:
- `cmd + n` opens new browser window instead of new file, and it's difficult
@ -157,15 +111,11 @@ and tricks helpful:
- In general, expect to edit your keyboard shortcuts
- There's no escape key by default on the Magic Keyboard, so most users set
the globe key to be an escape key
- Trackpad scrolling does not work
- Trackpad scrolling does not work on iPadOS < 145
([#1455](https://github.com/cdr/code-server/issues/1455))
- Bug tracking of a WebKit fix
[here](https://bugs.webkit.org/show_bug.cgi?id=210071#c13)
- Tracking of [WebKit patch](https://trac.webkit.org/changeset/270712/webkit)
- Alternatives:
- Install line-jump extension and use keyboard to navigate by jumping large
amount of lines
- Use touch scrolling
- [WebKit fix](https://bugs.webkit.org/show_bug.cgi?id=210071#c13)
- Keyboard may lose focus in Safari / split view [#4182](https://github.com/cdr/code-server/issues/4182)
- Terminal text does not appear by default [#3824](https://github.com/cdr/code-server/issues/3824)
- `ctrl+c` does not stop a long-running process in the browser
- Tracking upstream issue here:
[#114009](https://github.com/microsoft/vscode/issues/114009)
@ -199,3 +149,48 @@ In the meantime, you can manually define a shortcut as a workaround:
```
_Source: [StackOverflow](https://stackoverflow.com/a/52735954/3015595)_
## Access code-server with a self-signed certificate on an iPad
If you've installed code-server and are [running it with a self-signed
certificate](./guide.md#using-a-self-signed-certificate), you may see multiple
security warnings from Safari. To fix this, you'll need to install the
self-signed certificate generated by code-server as a profile on your device (you'll also need to do this to
enable WebSocket connections).
### Certificate requirements
- We're assuming that you're using the self-signed certificate code-server
generates for you (if not, make sure that your certificate [abides by the
guidelines issued by Apple](https://support.apple.com/en-us/HT210176)).
- We've noticed that the certificate has to include `basicConstraints=CA:true`.
- Your certificate must have a subject alt name that matches the hostname you'll
use to access code-server from the iPad. You can pass this name to code-server
so that it generates the certificate correctly using `--cert-host`.
### Sharing a self-signed certificate with an iPad
To share a self-signed certificate with an iPad:
1. Get the location of the certificate code-server generated; code-server prints
the certificate's location in its logs:
```console
[2020-10-30T08:55:45.139Z] info - Using generated certificate and key for HTTPS: ~/.local/share/code-server/mymbp_local.crt
```
2. Send the certificate to the iPad, either by emailing it to yourself or using
Apple's Airdrop feature.
3. Open the `*.crt` file so that you're prompted to go into Settings to install.
4. Go to **Settings** > **General** > **Profile**, and select the profile. Tap **Install**.
5. Go to **Settings** > **About** > **Certificate Trust Settings** and [enable
full trust for your certificate](https://support.apple.com/en-us/HT204477).
You should be able to access code-server without all of Safari's warnings now.
**warning**: Your iPad must access code-server via a domain name. It could be local
DNS like `mymacbookpro.local`, but it must be a domain name. Otherwise, Safari will
not allow WebSockets connections.