1
0

.gotty 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  1. // [string] Address to listen, all addresses will be used when empty
  2. // address = ""
  3. // [string] Port to listen
  4. // port = "8080"
  5. // [bool] Permit clients to write to the TTY
  6. // permit_write = false
  7. // [bool] Enable basic authentication
  8. // enable_basic_auth = false
  9. // [string] Default username and password of basic authentication (user:pass)
  10. // To enable basic authentication, set `true` to `enable_basic_auth`
  11. // credential = "user:pass"
  12. // [bool] Enable random URL generation
  13. // enable_random_url = false
  14. // [int] Default length of random strings appended to URL
  15. // To enable random URL generation, set `true` to `enable_random_url`
  16. // random_url_length = 8
  17. // [bool] Enable TLS/SSL
  18. // enable_tls = false
  19. // [string] Default TLS certificate file path
  20. // tls_crt_file = "~/.gotty.crt"
  21. // [string] Default TLS key file path
  22. // tls_key_file = "~/.gotty.key"
  23. // [bool] Enable client certificate authentication
  24. // enable_tls_client_auth = false
  25. // [string] Certificate file of CA for client certificates
  26. // tls_ca_crt_file = "~/.gotty.ca.crt"
  27. // [string] Custom index.html file
  28. // index_file = ""
  29. // [string] Title format of browser window
  30. // Available variables are:
  31. // Command Command string
  32. // Pid PID of the process for the client
  33. // Hostname Server hostname
  34. // RemoteAddr Client IP address
  35. // title_format = "GoTTY - {{ .Command }} ({{ .Hostname }})"
  36. // [bool] Enable client side reconnection when connection closed
  37. // enable_reconnect = false
  38. // [int] Interval time to try reconnection (seconds)
  39. // To enable reconnection, set `true` to `enable_reconnect`
  40. // reconnect_time = 10
  41. // [int] Timeout seconds for waiting a client (0 to disable)
  42. // timeout = 60
  43. // [int] Maximum connection to gotty, 0(default) means no limit.
  44. // max_connection = 0
  45. // [bool] Accept only one client and exit gotty once the client exits
  46. // once = false
  47. // [bool] Permit clients to send command line arguments in URL (e.g. http://example.com:8080/?arg=AAA&arg=BBB)
  48. // permit_arguments = false
  49. // [object] Client terminal (hterm) preferences
  50. // preferences {
  51. // [enum(null, "none", "ctrl-alt", "left-alt", "right-alt")]
  52. // Select an AltGr detection hack^Wheuristic.
  53. // null: Autodetect based on navigator.language: "en-us" => "none", else => "right-alt"
  54. // "none": Disable any AltGr related munging.
  55. // "ctrl-alt": Assume Ctrl+Alt means AltGr.
  56. // "left-alt": Assume left Alt means AltGr.
  57. // "right-alt": Assume right Alt means AltGr.
  58. // alt_gr_mode = null
  59. // [bool] If set, alt-backspace indeed is alt-backspace.
  60. // alt_backspace_is_meta_backspace = false
  61. // [bool] Set whether the alt key acts as a meta key or as a distinct alt key.
  62. // alt_is_meta = false
  63. // [enum("escape", "8-bit", "browser-key")]
  64. // Controls how the alt key is handled.
  65. // "escape"....... Send an ESC prefix.
  66. // "8-bit"........ Add 128 to the unshifted character as in xterm.
  67. // "browser-key".. Wait for the keypress event and see what the browser says.
  68. // (This won't work well on platforms where the browser performs a default action for some alt sequences.)
  69. // alt_sends_what = "escape"
  70. // [string] URL of the terminal bell sound. Empty string for no audible bell.
  71. // audible_bell_sound = "lib-resource:hterm/audio/bell"
  72. // [bool] If true, terminal bells in the background will create a Web Notification. http://www.w3.org/TR/notifications/
  73. // Displaying notifications requires permission from the user.
  74. // When this option is set to true, hterm will attempt to ask the user for permission if necessary.
  75. // Note browsers may not show this permission request
  76. // if it did not originate from a user action.
  77. // desktop_notification_bell = false
  78. // [string] The background color for text with no other color attributes.
  79. // background_color = "rgb(16, 16, 16)"
  80. // [string] CSS value of the background image. Empty string for no image.
  81. // For example:
  82. // "url(https://goo.gl/anedTK) linear-gradient(top bottom, blue, red)"
  83. // background_image = ""
  84. // [string] CSS value of the background image size. Defaults to none.
  85. // background_size = ""
  86. // [string] CSS value of the background image position.
  87. // For example:
  88. // "10% 10% center"
  89. // background_position = ""
  90. // [bool] If true, the backspace should send BS ('\x08', aka ^H). Otherwise the backspace key should send '\x7f'.
  91. // backspace_sends_backspace = false
  92. // [map[string]map[string]string]
  93. // A nested map where each property is the character set code and the value is a map that is a sparse array itself.
  94. // In that sparse array, each property is the received character and the value is the displayed character.
  95. // For example:
  96. // {"0" = {"+" = "\u2192"
  97. // "," = "\u2190"
  98. // "-" = "\u2191"
  99. // "." = "\u2193"
  100. // "0" = "\u2588"}}
  101. // character_map_overrides = null
  102. // [bool] Whether or not to close the window when the command exits.
  103. // close_on_exit = true
  104. // [bool] Whether or not to blink the cursor by default.
  105. // cursor_blink = false
  106. // [2[int]] The cursor blink rate in milliseconds.
  107. // A two element array, the first of which is how long the cursor should be on, second is how long it should be off.
  108. // cursor_blink_cycle = [1000, 500]
  109. // [string] The color of the visible cursor.
  110. // cursor_color = "rgba(255, 0, 0, 0.5)"
  111. // [[]string]
  112. // Override colors in the default palette.
  113. // This can be specified as an array or an object.
  114. // Values can be specified as almost any css color value.
  115. // This includes #RGB, #RRGGBB, rgb(...), rgba(...), and any color names that are also part of the stock X11 rgb.txt file.
  116. // You can use 'null' to specify that the default value should be not be changed.
  117. // This is useful for skipping a small number of indicies when the value is specified as an array.
  118. // color_palette_overrides = null
  119. // [bool] Automatically copy mouse selection to the clipboard.
  120. copy_on_select = true
  121. // [bool] Whether to use the default window copy behaviour
  122. //use_default_window_copy = false
  123. // [bool] Whether to clear the selection after copying.
  124. clear_selection_after_copy = false
  125. // [bool] If true, Ctrl-Plus/Minus/Zero controls zoom.
  126. // If false, Ctrl-Shift-Plus/Minus/Zero controls zoom, Ctrl-Minus sends ^_, Ctrl-Plus/Zero do nothing.
  127. // ctrl_plus_minus_zero_zoom = true
  128. // [bool] Ctrl+C copies if true, send ^C to host if false.
  129. // Ctrl+Shift+C sends ^C to host if true, copies if false.
  130. // ctrl_c_copy = true
  131. // [bool] Ctrl+V pastes if true, send ^V to host if false.
  132. // Ctrl+Shift+V sends ^V to host if true, pastes if false.
  133. // ctrl_v_paste = true
  134. // [bool] Set whether East Asian Ambiguous characters have two column width.
  135. // east_asian_ambiguous_as_two_column = false
  136. // [bool] True to enable 8-bit control characters, false to ignore them.
  137. // We'll respect the two-byte versions of these control characters regardless of this setting.
  138. // enable_8_bit_control = false
  139. // [enum(null, true, false)]
  140. // True if we should use bold weight font for text with the bold/bright attribute.
  141. // False to use the normal weight font.
  142. // Null to autodetect.
  143. // enable_bold = null
  144. // [bool] True if we should use bright colors (8-15 on a 16 color palette) for any text with the bold attribute.
  145. // False otherwise.
  146. // enable_bold_as_bright = true
  147. // [bool] Show a message in the terminal when the host writes to the clipboard.
  148. // enable_clipboard_notice = true
  149. // [bool] Allow the host to write directly to the system clipboard.
  150. // enable_clipboard_write = true
  151. // [bool] Respect the host's attempt to change the cursor blink status using DEC Private Mode 12.
  152. // enable_dec12 = false
  153. // [map[string]string] The default environment variables, as an object.
  154. // environment = {"TERM" = "xterm-256color"}
  155. // [string] Default font family for the terminal text.
  156. // font_family = "'DejaVu Sans Mono', 'Everson Mono', FreeMono, 'Menlo', 'Terminal', monospace"
  157. // [int] The default font size in pixels.
  158. // font_size = 15
  159. // [string] CSS font-smoothing property.
  160. // font_smoothing = "antialiased"
  161. // [string] The foreground color for text with no other color attributes.
  162. // foreground_color = "rgb(240, 240, 240)"
  163. // [bool] If true, home/end will control the terminal scrollbar and shift home/end will send the VT keycodes.
  164. // If false then home/end sends VT codes and shift home/end scrolls.
  165. // home_keys_scroll = false
  166. // [map[string]string]
  167. // A map of key sequence to key actions.
  168. // Key sequences include zero or more modifier keys followed by a key code.
  169. // Key codes can be decimal or hexadecimal numbers, or a key identifier.
  170. // Key actions can be specified a string to send to the host, or an action identifier.
  171. // For a full list of key code and action identifiers, see https://goo.gl/8AoD09.
  172. // Sample keybindings:
  173. // {"Ctrl-Alt-K" = "clearScrollback"
  174. // "Ctrl-Shift-L"= "PASS"
  175. // "Ctrl-H" = "'HELLO\n'"}
  176. // keybindings = null
  177. // [int] Max length of a DCS, OSC, PM, or APS sequence before we give up and ignore the code.
  178. // max_string_sequence = 100000
  179. // [bool] If true, convert media keys to their Fkey equivalent.
  180. // If false, let the browser handle the keys.
  181. // media_keys_are_fkeys = false
  182. // [bool] Set whether the meta key sends a leading escape or not.
  183. // meta_sends_escape = true
  184. // [enum(null, 0, 1, 2, 3, 4, 5, 6]
  185. // Mouse paste button, or null to autodetect.
  186. // For autodetect, we'll try to enable middle button paste for non-X11 platforms.
  187. // On X11 we move it to button 3.
  188. // mouse_paste_button = null
  189. // [bool] If true, page up/down will control the terminal scrollbar and shift page up/down will send the VT keycodes.
  190. // If false then page up/down sends VT codes and shift page up/down scrolls.
  191. // page_keys_scroll = false
  192. // [enum(null, true, false)]
  193. // Set whether we should pass Alt-1..9 to the browser.
  194. // This is handy when running hterm in a browser tab, so that you don't lose Chrome's "switch to tab" keyboard accelerators.
  195. // When not running in a tab it's better to send these keys to the host so they can be used in vim or emacs.
  196. // If true, Alt-1..9 will be handled by the browser.
  197. // If false, Alt-1..9 will be sent to the host.
  198. // If null, autodetect based on browser platform and window type.
  199. // pass_alt_number = null
  200. // [enum(null, true, false)]
  201. // Set whether we should pass Ctrl-1..9 to the browser.
  202. // This is handy when running hterm in a browser tab, so that you don't lose Chrome's "switch to tab" keyboard accelerators.
  203. // When not running in a tab it's better to send these keys to the host so they can be used in vim or emacs.
  204. // If true, Ctrl-1..9 will be handled by the browser.
  205. // If false, Ctrl-1..9 will be sent to the host.
  206. // If null, autodetect based on browser platform and window type.
  207. // pass_ctrl_number = null
  208. // [enum(null, true, false)]
  209. // Set whether we should pass Meta-1..9 to the browser.
  210. // This is handy when running hterm in a browser tab, so that you don't lose Chrome's "switch to tab" keyboard accelerators.
  211. // When not running in a tab it's better to send these keys to the host so they can be used in vim or emacs.
  212. // If true, Meta-1..9 will be handled by the browser.
  213. // If false, Meta-1..9 will be sent to the host. If null, autodetect based on browser platform and window type.
  214. // pass_meta_number = null
  215. // [bool] Set whether meta-V gets passed to host.
  216. // pass_meta_v = true
  217. // [bool] If true, scroll to the bottom on any keystroke.
  218. // scroll_on_keystroke = true
  219. // [bool] If true, scroll to the bottom on terminal output.
  220. // scroll_on_output = false
  221. // [bool] The vertical scrollbar mode.
  222. // scrollbar_visible = true
  223. // [int] The multiplier for the pixel delta in mousewheel event caused by the scroll wheel. Alters how fast the page scrolls.
  224. // scroll_wheel_move_multiplier = 1
  225. // [bool] Shift + Insert pastes if true, sent to host if false.
  226. // shift_insert_paste = true
  227. // [string] URL of user stylesheet to include in the terminal document.
  228. // user_css = ""
  229. // }