mirror of
https://github.com/yudai/gotty.git
synced 2025-09-21 21:40:49 +02:00
Support config file
This commit is contained in:
parent
6e39085a53
commit
4b67e3059d
111 changed files with 8844 additions and 164 deletions
27
README.md
27
README.md
|
@ -49,31 +49,32 @@ By default, gotty starts a web server at port 8080. Open the URL on your web bro
|
|||
## Options
|
||||
|
||||
```
|
||||
--addr, -a IP address to listen [$GOTTY_ADDR]
|
||||
--address, -a IP address to listen [$GOTTY_ADDRESS]
|
||||
--port, -p "8080" Port number to listen [$GOTTY_PORT]
|
||||
--permit-write, -w Permit clients to write to the TTY (BE CAREFUL) [$GOTTY_PERMIT_WRITE]
|
||||
--credential, -c Credential for Basic Authentication (ex: user:pass) [$GOTTY_CREDENTIAL]
|
||||
--credential, -c Credential for Basic Authentication (ex: user:pass, default disabled) [$GOTTY_CREDENTIAL]
|
||||
--random-url, -r Add a random string to the URL [$GOTTY_RANDOM_URL]
|
||||
--profile-file, -f "~/.gotty" Path to profile file [$GOTTY_PROFILE_FILE]
|
||||
--enable-tls, -t Enable TLS/SSL [$GOTTY_ENABLE_TLS]
|
||||
--tls-crt "~/.gotty.crt" TLS/SSL cert [$GOTTY_TLS_CRT]
|
||||
--tls-key "~/.gotty.key" TLS/SSL key [$GOTTY_TLS_KEY]
|
||||
--random-url-length "8" Random URL length [$GOTTY_RANDOM_URL_LENGTH]
|
||||
--tls, -t Enable TLS/SSL [$GOTTY_TLS]
|
||||
--tls-crt "~/.gotty.key" TLS/SSL crt file path [$GOTTY_TLS_CRT]
|
||||
--tls-key "~/.gotty.crt" TLS/SSL key file path [$GOTTY_TLS_KEY]
|
||||
--profile "~/.gotty.prf" Profile file path [$GOTTY_PROFILE]
|
||||
--title-format "GoTTY - {{ .Command }} ({{ .Hostname }})" Title format of browser window [$GOTTY_TITLE_FORMAT]
|
||||
--auto-reconnect "-1" Seconds to automatically reconnect to the server when the connection is closed (default: disabled) [$GOTTY_AUTO_RECONNECT]
|
||||
--reconnect Enable reconnection [$GOTTY_RECONNECT]
|
||||
--reconnect-time "10" Time to reconnect [$GOTTY_RECONNECT_TIME]
|
||||
--once Accept only one client and exit on disconnection [$GOTTY_ONCE]
|
||||
--config "~/.gotty" Config file path [$GOTTY_CONFIG]
|
||||
```
|
||||
|
||||
### Profile File
|
||||
|
||||
You can customize your terminal (hterm) by providing a profile file to the `gotty` command, which is a JSON file that has a map of preference keys and values. Gotty loads a profile file at `~/.gotty` by default when it exists.
|
||||
You can customize your terminal (hterm) by providing a profile file to the `gotty` command, which is a HCL file that has a map of preference keys and values. Gotty loads a profile file at `~/.gotty` by default when it exists.
|
||||
|
||||
The following example makes the font size smaller and the background color a little bit blue.
|
||||
|
||||
```json
|
||||
{
|
||||
"font-size": 5,
|
||||
"background-color": "rgb(16, 16, 32)"
|
||||
}
|
||||
```
|
||||
font-size = 5,
|
||||
background-color = "rgb(16, 16, 32)"
|
||||
```
|
||||
|
||||
Available preferences are listed in [the hterm source code](https://chromium.googlesource.com/apps/libapps/+/master/hterm/js/hterm_preference_manager.js)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue