-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gotty
More file actions
306 lines (232 loc) · 11.1 KB
/
.gotty
File metadata and controls
306 lines (232 loc) · 11.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
// GoTTY 配置文件
// 配置项格式: key = value
// 注释行以 // 开头
// [string] 监听地址,留空时监听所有地址
// address = ""
// [string] 监听端口
// port = "8080"
// [bool] 允许客户端写入到终端(允许输入命令)
// permit_write = false
// [bool] 启用基本认证
// enable_basic_auth = false
// [string] 基本认证的用户名和密码 (格式: user:pass)
// 要启用基本认证,需将 enable_basic_auth 设置为 true
// credential = "user:pass"
// [bool] 启用随机URL生成
// enable_random_url = false
// [int] 追加到URL的随机字符串默认长度
// 要启用随机URL生成,需将 enable_random_url 设置为 true
// random_url_length = 8
// [bool] 启用 TLS/SSL
// enable_tls = false
// [string] 默认TLS证书文件路径
// tls_crt_file = "~/.gotty.crt"
// [string] 默认TLS密钥文件路径
// tls_key_file = "~/.gotty.key"
// [bool] 启用客户端证书认证
// enable_tls_client_auth = false
// [string] 用于客户端证书的CA证书文件
// tls_ca_crt_file = "~/.gotty.ca.crt"
// [string] 自定义 index.html 文件路径
// index_file = ""
// [string] 浏览器窗口标题格式
// 可用变量:
// Command 命令字符串
// Pid 客户端进程的PID
// Hostname 服务器主机名
// RemoteAddr 客户端IP地址
// title_format = "GoTTY - {{ .Command }} ({{ .Hostname }})"
// [bool] 启用客户端自动重连(连接关闭时)
// enable_reconnect = false
// [int] 尝试重连的间隔时间(秒)
// 要启用重连,需将 enable_reconnect 设置为 true
// reconnect_time = 10
// [int] 等待客户端连接的超时时间(秒),0表示禁用
// timeout = 60
// [int] GoTTY的最大连接数,0(默认)表示无限制
// max_connection = 0
// [bool] 只接受一个客户端,客户端退出后GoTTY也退出
// once = false
// [bool] 允许客户端在URL中传递命令行参数(例如: http://example.com:8080/?arg=AAA&arg=BBB)
// permit_arguments = false
// [object] 客户端终端(hterm)偏好设置
// preferences {
// [enum(null, "none", "ctrl-alt", "left-alt", "right-alt")]
// 选择AltGr检测启发式方法
// null: 根据navigator.language自动检测: "en-us" => "none", 其他 => "right-alt"
// "none": 禁用所有AltGr相关处理
// "ctrl-alt": 假定Ctrl+Alt表示AltGr
// "left-alt": 假定左Alt表示AltGr
// "right-alt": 假定右Alt表示AltGr
// alt_gr_mode = null
// [bool] 如果设置,alt-backspace确实是alt-backspace
// alt_backspace_is_meta_backspace = false
// [bool] 设置alt键是作为meta键还是作为独立的alt键
// alt_is_meta = false
// [enum("escape", "8-bit", "browser-key")]
// 控制alt键的处理方式
// "escape"....... 发送ESC前缀
// "8-bit"........ 向未移位字符添加128(如xterm)
// "browser-key".. 等待keypress事件,查看浏览器的响应
// (在某些平台上,浏览器对某些alt序列执行默认操作时,此方法效果不佳)
// alt_sends_what = "escape"
// [string] 终端铃声URL,空字符串表示无声铃声
// audible_bell_sound = "lib-resource:hterm/audio/bell"
// [bool] 如果为true,后台终端铃声将创建Web通知 http://www.w3.org/TR/notifications/
// 显示通知需要用户权限
// 当此选项设置为true时,hterm将在必要时尝试请求用户权限
// 注意:如果权限请求不是源自用户操作,浏览器可能不显示此权限请求
// desktop_notification_bell = false
// [string] 没有其他颜色属性的文本背景色
// background_color = "rgb(16, 16, 16)"
// [string] 背景图片的CSS值,空字符串表示无图片
// 例如:
// "url(https://goo.gl/anedTK) linear-gradient(top bottom, blue, red)"
// background_image = ""
// [string] 背景图片大小的CSS值,默认为none
// background_size = ""
// [string] 背景图片位置的CSS值
// 例如:
// "10% 10% center"
// background_position = ""
// [bool] 如果为true,退格键应发送BS('\x08',即^H),否则退格键应发送'\x7f'
// backspace_sends_backspace = false
// [map[string]map[string]string]
// 嵌套映射,每个属性是字符集代码,值是稀疏数组
// 在该稀疏数组中,每个属性是接收的字符,值是显示的字符
// 例如:
// {"0" = {"+" = "\u2192"
// "," = "\u2190"
// "-" = "\u2191"
// "." = "\u2193"
// "0" = "\u2588"}}
// character_map_overrides = null
// [bool] 命令退出时是否关闭窗口
// close_on_exit = true
// [bool] 默认是否闪烁光标
// cursor_blink = false
// [2[int]] 光标闪烁速率(毫秒)
// 两元素数组,第一个是光标显示时间,第二个是光标隐藏时间
// cursor_blink_cycle = [1000, 500]
// [string] 可见光标的颜色
// cursor_color = "rgba(255, 0, 0, 0.5)"
// [[]string]
// 覆盖默认调色板中的颜色
// 可以指定为数组或对象
// 值可以指定为几乎任何css颜色值
// 包括 #RGB、#RRGGBB、rgb(...)、rgba(...) 和X11 rgb.txt文件中的任何颜色名称
// 可以使用'null'指定不应更改默认值
// 当值指定为数组时,这对于跳过少量索引很有用
// color_palette_overrides = null
// [bool] 自动复制鼠标选择内容到剪贴板
// copy_on_select = true
// [bool] 是否使用默认的窗口复制行为
// use_default_window_copy = false
// [bool] 复制后是否清除选择
// clear_selection_after_copy = true
// [bool] 如果为true,Ctrl-Plus/Minus/Zero控制缩放
// 如果为false,Ctrl-Shift-Plus/Minus/Zero控制缩放,Ctrl-Minus发送^_,Ctrl-Plus/Zero不执行任何操作
// ctrl_plus_minus_zero_zoom = true
// [bool] 如果为true,Ctrl+C复制;如果为false,向主机发送^C
// 如果为true,Ctrl+Shift+C向主机发送^C;如果为false,复制
// ctrl_c_copy = false
// [bool] 如果为true,Ctrl+V粘贴;如果为false,向主机发送^V
// 如果为true,Ctrl+Shift+V向主机发送^V;如果为false,粘贴
// ctrl_v_paste = false
// [bool] 设置东亚模糊字符是否具有两列宽度
// east_asian_ambiguous_as_two_column = false
// [bool] 为true时启用8位控制字符,为false时忽略它们
// 无论此设置如何,我们都会遵守这些控制字符的双字节版本
// enable_8_bit_control = false
// [enum(null, true, false)]
// 如果为true,对于具有粗体/亮度属性的文本使用粗体字体
// 如果为false,使用正常字体
// 如果为null,自动检测
// enable_bold = null
// [bool] 如果为true,对于具有粗体属性的任何文本使用亮色(16色调色板上的8-15)
// 否则为false
// enable_bold_as_bright = true
// [bool] 当主机写入剪贴板时在终端中显示消息
// enable_clipboard_notice = true
// [bool] 允许主机直接写入系统剪贴板
// enable_clipboard_write = true
// [bool] 使用DEC私有模式12尊重主机尝试更改光标闪烁状态
// enable_dec12 = false
// [map[string]string] 默认环境变量(对象形式)
// environment = {"TERM" = "xterm-256color"}
// [string] 终端文本的默认字体系列
// font_family = "'DejaVu Sans Mono', 'Everson Mono', FreeMono, 'Menlo', 'Terminal', monospace"
// [int] 默认字体大小(像素)
// font_size = 15
// [string] CSS字体平滑属性
// font_smoothing = "antialiased"
// [string] 没有其他颜色属性的文本前景色
// foreground_color = "rgb(240, 240, 240)"
// [bool] 如果为true,home/end控制终端滚动条,shift+home/end发送VT键码
// 如果为false,home/end发送VT码,shift+home/end滚动
// home_keys_scroll = false
// [map[string]string]
// 按键序列到按键动作的映射
// 按键序列包括零个或多个修饰键后跟一个键码
// 键码可以是十进制或十六进制数字,或键标识符
// 按键动作可以指定为发送到主机的字符串,或动作标识符
// 有关键码和动作标识符的完整列表,请参阅 https://goo.gl/8AoD09
// 示例键绑定:
// {"Ctrl-Alt-K" = "clearScrollback"
// "Ctrl-Shift-L"= "PASS"
// "Ctrl-H" = "'HELLO\n'"}
// keybindings = null
// [int] DCS、OSC、PM或APS序列的最大长度,超过此长度我们将放弃并忽略代码
// max_string_sequence = 100000
// [bool] 如果为true,将媒体键转换为其Fkey等效项
// 如果为false,让浏览器处理这些键
// media_keys_are_fkeys = false
// [bool] 设置meta键是否发送前导转义符
// meta_sends_escape = true
// [enum(null, 0, 1, 2, 3, 4, 5, 6]
// 鼠标粘贴按钮,或null表示自动检测
// 对于自动检测,我们将尝试为非X11平台启用中键粘贴
// 在X11上,我们将其移至按钮3
// mouse_paste_button = null
// [bool] 如果为true,page up/down控制终端滚动条,shift+page up/down发送VT键码
// 如果为false,page up/down发送VT码,shift+page up/down滚动
// page_keys_scroll = false
// [enum(null, true, false)]
// 设置是否应将Alt-1..9传递给浏览器
// 在浏览器标签中运行hterm时很方便,这样您就不会失去Chrome的"切换到标签"键盘快捷键
// 不在标签中运行时,最好将这些键发送到主机,以便在vim或emacs中使用
// 如果为true,Alt-1..9将由浏览器处理
// 如果为false,Alt-1..9将发送到主机
// 如果为null,根据浏览器平台和窗口类型自动检测
// pass_alt_number = null
// [enum(null, true, false)]
// 设置是否应将Ctrl-1..9传递给浏览器
// 在浏览器标签中运行hterm时很方便,这样您就不会失去Chrome的"切换到标签"键盘快捷键
// 不在标签中运行时,最好将这些键发送到主机,以便在vim或emacs中使用
// 如果为true,Ctrl-1..9将由浏览器处理
// 如果为false,Ctrl-1..9将发送到主机
// 如果为null,根据浏览器平台和窗口类型自动检测
// pass_ctrl_number = null
// [enum(null, true, false)]
// 设置是否应将Meta-1..9传递给浏览器
// 在浏览器标签中运行hterm时很方便,这样您就不会失去Chrome的"切换到标签"键盘快捷键
// 不在标签中运行时,最好将这些键发送到主机,以便在vim或emacs中使用
// 如果为true,Meta-1..9将由浏览器处理
// 如果为false,Meta-1..9将发送到主机
// 如果为null,根据浏览器平台和窗口类型自动检测
// pass_meta_number = null
// [bool] 设置meta-V是否传递给主机
// pass_meta_v = true
// [bool] 如果为true,任何按键时滚动到底部
// scroll_on_keystroke = true
// [bool] 如果为true,终端输出时滚动到底部
// scroll_on_output = false
// [bool] 垂直滚动条模式
// scrollbar_visible = true
// [int] 鼠标滚轮事件中像素增量的乘数,改变页面滚动速度
// scroll_wheel_move_multiplier = 1
// [bool] 如果为true,Shift+Insert粘贴;如果为false,发送到主机
// shift_insert_paste = true
// [string] 要包含在终端文档中的用户样式表URL
// user_css = ""
// }