conf.h 34 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289
  1. /*
  2. * Master list of configuration options living in the Conf data
  3. * structure.
  4. *
  5. * Each CONF_OPTION directive defines a single CONF_foo primary key in
  6. * Conf, and can be equipped with the following properties:
  7. *
  8. * - VALUE_TYPE: the type of data associated with that key
  9. * - SUBKEY_TYPE: if the primary key goes with a subkey (that is, the
  10. * primary key identifies some mapping from subkeys to values), the
  11. * data type of the subkey
  12. * - DEFAULT_INT, DEFAULT_STR, DEFAULT_BOOL: the default value for
  13. * the key, if no save data is available. Must match VALUE_TYPE, if
  14. * the key has no subkey. Otherwise, no default is permitted, and
  15. * the default value of the mapping is assumed to be empty (and if
  16. * not, then LOAD_CUSTOM code must override that).
  17. * - SAVE_KEYWORD: the keyword used for the option in the Windows
  18. * registry or ~/.putty/sessions save files.
  19. * - STORAGE_ENUM: for int-typed settings with no subkeys, this
  20. * identifies an enumeration in conf-enums.h which maps internal
  21. * values of the setting in the Conf to values in the saved data.
  22. * - LOAD_CUSTOM, SAVE_CUSTOM: suppress automated loading or saving
  23. * (respectively) of this setting, in favour of manual code in
  24. * settings.c load_open_settings() or save_open_settings()
  25. * respectively.
  26. * - NOT_SAVED: indicate that this setting is not part of saved
  27. * session data at all.
  28. */
  29. CONF_OPTION(host,
  30. VALUE_TYPE(STR),
  31. DEFAULT_STR(""),
  32. SAVE_KEYWORD("HostName"),
  33. )
  34. CONF_OPTION(port,
  35. VALUE_TYPE(INT),
  36. SAVE_KEYWORD("PortNumber"),
  37. LOAD_CUSTOM, /* default value depends on the value of CONF_protocol */
  38. )
  39. CONF_OPTION(protocol,
  40. VALUE_TYPE(INT), /* PROT_SSH, PROT_TELNET etc */
  41. LOAD_CUSTOM, SAVE_CUSTOM,
  42. /*
  43. * Notionally SAVE_KEYWORD("Protocol"), but saving/loading is handled by
  44. * custom code because the stored value is a string representation
  45. * of the protocol name.
  46. */
  47. )
  48. CONF_OPTION(addressfamily,
  49. VALUE_TYPE(INT),
  50. DEFAULT_INT(ADDRTYPE_UNSPEC),
  51. SAVE_KEYWORD("AddressFamily"),
  52. STORAGE_ENUM(addressfamily),
  53. )
  54. CONF_OPTION(close_on_exit,
  55. VALUE_TYPE(INT),
  56. DEFAULT_INT(AUTO),
  57. SAVE_KEYWORD("CloseOnExit"),
  58. STORAGE_ENUM(off_auto_on),
  59. )
  60. CONF_OPTION(warn_on_close,
  61. VALUE_TYPE(BOOL),
  62. DEFAULT_BOOL(true),
  63. SAVE_KEYWORD("WarnOnClose"),
  64. )
  65. CONF_OPTION(ping_interval,
  66. VALUE_TYPE(INT), /* in seconds */
  67. LOAD_CUSTOM, SAVE_CUSTOM,
  68. /*
  69. * Saving/loading is handled by custom code because for historical
  70. * reasons this value corresponds to two save keywords,
  71. * "PingInterval" (measured in minutes) and "PingIntervalSecs"
  72. * (measured in seconds), which are added together on loading.
  73. * Rationale: the value was once measured in minutes, and the
  74. * seconds field was added later.
  75. */
  76. )
  77. CONF_OPTION(tcp_nodelay,
  78. VALUE_TYPE(BOOL),
  79. DEFAULT_BOOL(true),
  80. SAVE_KEYWORD("TCPNoDelay"),
  81. )
  82. CONF_OPTION(tcp_keepalives,
  83. VALUE_TYPE(BOOL),
  84. DEFAULT_BOOL(false),
  85. SAVE_KEYWORD("TCPKeepalives"),
  86. )
  87. CONF_OPTION(loghost, /* logical host being contacted, for host key check */
  88. VALUE_TYPE(STR),
  89. DEFAULT_STR(""),
  90. SAVE_KEYWORD("LogHost"),
  91. )
  92. /* Proxy options */
  93. CONF_OPTION(proxy_exclude_list,
  94. VALUE_TYPE(STR),
  95. DEFAULT_STR(""),
  96. SAVE_KEYWORD("ProxyExcludeList"),
  97. )
  98. CONF_OPTION(proxy_dns,
  99. VALUE_TYPE(INT),
  100. DEFAULT_INT(AUTO),
  101. SAVE_KEYWORD("ProxyDNS"),
  102. STORAGE_ENUM(off_auto_on),
  103. )
  104. CONF_OPTION(even_proxy_localhost,
  105. VALUE_TYPE(BOOL),
  106. DEFAULT_BOOL(false),
  107. SAVE_KEYWORD("ProxyLocalhost"),
  108. )
  109. CONF_OPTION(proxy_type,
  110. VALUE_TYPE(INT), /* PROXY_NONE, PROXY_SOCKS4, ... */
  111. STORAGE_ENUM(proxy_type),
  112. SAVE_KEYWORD("ProxyMethod"),
  113. LOAD_CUSTOM,
  114. /*
  115. * Custom load code: there was an earlier keyword "ProxyType"
  116. * using a different enumeration, in which SOCKS4 and SOCKS5
  117. * shared a value, and a second keyword "ProxySOCKSVersion"
  118. * disambiguated.
  119. */
  120. )
  121. CONF_OPTION(proxy_host,
  122. VALUE_TYPE(STR),
  123. DEFAULT_STR("proxy"),
  124. SAVE_KEYWORD("ProxyHost"),
  125. )
  126. CONF_OPTION(proxy_port,
  127. VALUE_TYPE(INT),
  128. DEFAULT_INT(80),
  129. SAVE_KEYWORD("ProxyPort"),
  130. )
  131. CONF_OPTION(proxy_username,
  132. VALUE_TYPE(STR),
  133. DEFAULT_STR(""),
  134. SAVE_KEYWORD("ProxyUsername"),
  135. )
  136. CONF_OPTION(proxy_password,
  137. VALUE_TYPE(STR),
  138. DEFAULT_STR(""),
  139. SAVE_KEYWORD("ProxyPassword"),
  140. )
  141. CONF_OPTION(proxy_telnet_command,
  142. VALUE_TYPE(STR),
  143. DEFAULT_STR("connect %host %port\\n"),
  144. SAVE_KEYWORD("ProxyTelnetCommand"),
  145. )
  146. CONF_OPTION(proxy_log_to_term,
  147. VALUE_TYPE(INT),
  148. DEFAULT_INT(FORCE_OFF),
  149. SAVE_KEYWORD("ProxyLogToTerm"),
  150. STORAGE_ENUM(on_off_auto),
  151. )
  152. /* SSH options */
  153. CONF_OPTION(remote_cmd,
  154. VALUE_TYPE(STR_AMBI),
  155. DEFAULT_STR(""),
  156. SAVE_KEYWORD("RemoteCommand"),
  157. )
  158. CONF_OPTION(remote_cmd2,
  159. /*
  160. * Fallback command to try to run if remote_cmd fails. Only set
  161. * internally by PSCP and PSFTP (so that they can try multiple
  162. * methods of running an SFTP server at the remote end); never set
  163. * by user configuration, or loaded or saved.
  164. */
  165. VALUE_TYPE(STR_AMBI),
  166. DEFAULT_STR(""),
  167. NOT_SAVED,
  168. )
  169. CONF_OPTION(nopty,
  170. VALUE_TYPE(BOOL),
  171. DEFAULT_BOOL(false),
  172. SAVE_KEYWORD("NoPTY"),
  173. )
  174. CONF_OPTION(compression,
  175. VALUE_TYPE(BOOL),
  176. DEFAULT_BOOL(false),
  177. SAVE_KEYWORD("Compression"),
  178. )
  179. CONF_OPTION(ssh_kexlist,
  180. SUBKEY_TYPE(INT), /* indices in preference order: 0,...,KEX_MAX-1
  181. * (lower is more preferred) */
  182. VALUE_TYPE(INT), /* KEX_* enum values */
  183. LOAD_CUSTOM, SAVE_CUSTOM, /* necessary for preference lists */
  184. )
  185. CONF_OPTION(ssh_hklist,
  186. SUBKEY_TYPE(INT), /* indices in preference order: 0,...,HK_MAX-1
  187. * (lower is more preferred) */
  188. VALUE_TYPE(INT), /* HK_* enum values */
  189. LOAD_CUSTOM, SAVE_CUSTOM, /* necessary for preference lists */
  190. )
  191. CONF_OPTION(ssh_prefer_known_hostkeys,
  192. VALUE_TYPE(BOOL),
  193. DEFAULT_BOOL(true),
  194. SAVE_KEYWORD("PreferKnownHostKeys"),
  195. )
  196. CONF_OPTION(ssh_rekey_time,
  197. VALUE_TYPE(INT), /* in minutes */
  198. DEFAULT_INT(60),
  199. SAVE_KEYWORD("RekeyTime"),
  200. )
  201. CONF_OPTION(ssh_rekey_data,
  202. VALUE_TYPE(STR), /* string encoding e.g. "100K", "2M", "1G" */
  203. DEFAULT_STR("1G"),
  204. SAVE_KEYWORD("RekeyBytes"),
  205. )
  206. CONF_OPTION(tryagent,
  207. VALUE_TYPE(BOOL),
  208. DEFAULT_BOOL(true),
  209. SAVE_KEYWORD("TryAgent"),
  210. )
  211. CONF_OPTION(agentfwd,
  212. VALUE_TYPE(BOOL),
  213. DEFAULT_BOOL(false),
  214. SAVE_KEYWORD("AgentFwd"),
  215. )
  216. CONF_OPTION(change_username, /* allow username switching in SSH-2 */
  217. VALUE_TYPE(BOOL),
  218. DEFAULT_BOOL(false),
  219. SAVE_KEYWORD("ChangeUsername"),
  220. )
  221. CONF_OPTION(ssh_cipherlist,
  222. SUBKEY_TYPE(INT), /* indices in preference order: 0,...,CIPHER_MAX-1
  223. * (lower is more preferred) */
  224. VALUE_TYPE(INT), /* CIPHER_* enum values */
  225. LOAD_CUSTOM, SAVE_CUSTOM, /* necessary for preference lists */
  226. )
  227. CONF_OPTION(keyfile,
  228. VALUE_TYPE(FILENAME),
  229. SAVE_KEYWORD("PublicKeyFile"),
  230. )
  231. CONF_OPTION(detached_cert,
  232. VALUE_TYPE(FILENAME),
  233. SAVE_KEYWORD("DetachedCertificate"),
  234. )
  235. CONF_OPTION(auth_plugin,
  236. VALUE_TYPE(STR),
  237. DEFAULT_STR(""),
  238. SAVE_KEYWORD("AuthPlugin"),
  239. )
  240. CONF_OPTION(sshprot,
  241. /*
  242. * Which SSH protocol to use.
  243. *
  244. * For historical reasons, the current legal values for CONF_sshprot
  245. * are:
  246. * 0 = SSH-1 only
  247. * 3 = SSH-2 only
  248. *
  249. * We used to also support
  250. * 1 = SSH-1 with fallback to SSH-2
  251. * 2 = SSH-2 with fallback to SSH-1
  252. *
  253. * and we continue to use 0/3 in storage formats rather than the more
  254. * obvious 1/2 to avoid surprises if someone saves a session and later
  255. * downgrades PuTTY. So it's easier to use these numbers internally too.
  256. */
  257. VALUE_TYPE(INT),
  258. DEFAULT_INT(3),
  259. SAVE_KEYWORD("SshProt"),
  260. STORAGE_ENUM(ssh_protocol),
  261. )
  262. CONF_OPTION(ssh_simple,
  263. /*
  264. * This means that we promise never to open any channel other
  265. * than the main one, which means it can safely use a very large
  266. * window in SSH-2.
  267. *
  268. * Only ever set internally by file transfer tools; never set by
  269. * user configuration, or loaded or saved.
  270. */
  271. VALUE_TYPE(BOOL),
  272. DEFAULT_BOOL(false),
  273. NOT_SAVED,
  274. )
  275. CONF_OPTION(ssh_connection_sharing,
  276. VALUE_TYPE(BOOL),
  277. DEFAULT_BOOL(false),
  278. SAVE_KEYWORD("ConnectionSharing"),
  279. )
  280. CONF_OPTION(ssh_connection_sharing_upstream,
  281. VALUE_TYPE(BOOL),
  282. DEFAULT_BOOL(true),
  283. SAVE_KEYWORD("ConnectionSharingUpstream"),
  284. )
  285. CONF_OPTION(ssh_connection_sharing_downstream,
  286. VALUE_TYPE(BOOL),
  287. DEFAULT_BOOL(true),
  288. SAVE_KEYWORD("ConnectionSharingDownstream"),
  289. )
  290. CONF_OPTION(ssh_manual_hostkeys,
  291. /*
  292. * Manually configured host keys to accept regardless of the state
  293. * of the host key cache.
  294. *
  295. * This is conceptually a set rather than a dictionary: every
  296. * value in this map is the empty string, and the set of subkeys
  297. * that exist is the important data.
  298. */
  299. SUBKEY_TYPE(STR),
  300. VALUE_TYPE(STR),
  301. LOAD_CUSTOM, SAVE_CUSTOM, /* necessary for mappings */
  302. )
  303. CONF_OPTION(ssh2_des_cbc, /* "des-cbc" unrecommended SSH-2 cipher */
  304. VALUE_TYPE(BOOL),
  305. DEFAULT_BOOL(false),
  306. SAVE_KEYWORD("SSH2DES"),
  307. )
  308. CONF_OPTION(ssh_no_userauth, /* bypass "ssh-userauth" (SSH-2 only) */
  309. VALUE_TYPE(BOOL),
  310. DEFAULT_BOOL(false),
  311. SAVE_KEYWORD("SshNoAuth"),
  312. )
  313. CONF_OPTION(ssh_no_trivial_userauth, /* disable trivial types of auth */
  314. VALUE_TYPE(BOOL),
  315. DEFAULT_BOOL(false),
  316. SAVE_KEYWORD("SshNoTrivialAuth"),
  317. )
  318. CONF_OPTION(ssh_show_banner, /* show USERAUTH_BANNERs (SSH-2 only) */
  319. VALUE_TYPE(BOOL),
  320. DEFAULT_BOOL(true),
  321. SAVE_KEYWORD("SshBanner"),
  322. )
  323. CONF_OPTION(try_tis_auth,
  324. VALUE_TYPE(BOOL),
  325. DEFAULT_BOOL(false),
  326. SAVE_KEYWORD("AuthTIS"),
  327. )
  328. CONF_OPTION(try_ki_auth,
  329. VALUE_TYPE(BOOL),
  330. DEFAULT_BOOL(true),
  331. SAVE_KEYWORD("AuthKI"),
  332. )
  333. CONF_OPTION(try_gssapi_auth, /* attempt gssapi via ssh userauth */
  334. VALUE_TYPE(BOOL),
  335. LOAD_CUSTOM, SAVE_CUSTOM, /* under #ifndef NO_GSSAPI */
  336. )
  337. CONF_OPTION(try_gssapi_kex, /* attempt gssapi via ssh kex */
  338. VALUE_TYPE(BOOL),
  339. LOAD_CUSTOM, SAVE_CUSTOM, /* under #ifndef NO_GSSAPI */
  340. )
  341. CONF_OPTION(gssapifwd, /* forward tgt via gss */
  342. VALUE_TYPE(BOOL),
  343. LOAD_CUSTOM, SAVE_CUSTOM, /* under #ifndef NO_GSSAPI */
  344. )
  345. CONF_OPTION(gssapirekey, /* KEXGSS refresh interval (mins) */
  346. VALUE_TYPE(INT),
  347. LOAD_CUSTOM, SAVE_CUSTOM, /* under #ifndef NO_GSSAPI */
  348. )
  349. CONF_OPTION(ssh_gsslist,
  350. SUBKEY_TYPE(INT), /* indices in preference order: 0,...,ngsslibs
  351. * (lower is more preferred; ngsslibs is a platform-
  352. * dependent value) */
  353. VALUE_TYPE(INT), /* indices of GSSAPI lib types (platform-dependent) */
  354. LOAD_CUSTOM, SAVE_CUSTOM, /* necessary for preference lists, also this
  355. * setting is under #ifndef NO_GSSAPI */
  356. )
  357. CONF_OPTION(ssh_gss_custom,
  358. VALUE_TYPE(FILENAME),
  359. LOAD_CUSTOM, SAVE_CUSTOM, /* under #ifndef NO_GSSAPI */
  360. )
  361. CONF_OPTION(ssh_subsys, /* run a subsystem rather than a command */
  362. /*
  363. * Only set internally by PSCP and PSFTP; never set by user
  364. * configuration, or loaded or saved.
  365. */
  366. VALUE_TYPE(BOOL),
  367. DEFAULT_BOOL(false),
  368. NOT_SAVED,
  369. )
  370. CONF_OPTION(ssh_subsys2, /* fallback to go with remote_cmd2 */
  371. /*
  372. * Only set internally by PSCP and PSFTP; never set by user
  373. * configuration, or loaded or saved.
  374. */
  375. VALUE_TYPE(BOOL),
  376. DEFAULT_BOOL(false),
  377. NOT_SAVED,
  378. )
  379. CONF_OPTION(ssh_no_shell, /* avoid running a shell */
  380. VALUE_TYPE(BOOL),
  381. DEFAULT_BOOL(false),
  382. SAVE_KEYWORD("SshNoShell"),
  383. )
  384. CONF_OPTION(ssh_nc_host, /* host to connect to in `nc' mode */
  385. /*
  386. * Only set by the '-nc' command-line option and by the SSH proxy
  387. * code. There's no GUI config option for this, and therefore it's
  388. * also never loaded or saved.
  389. */
  390. VALUE_TYPE(STR),
  391. DEFAULT_STR(""),
  392. NOT_SAVED,
  393. )
  394. CONF_OPTION(ssh_nc_port, /* port to connect to in `nc' mode */
  395. /*
  396. * Only set by the '-nc' command-line option and by the SSH proxy
  397. * code. There's no GUI config option for this, and therefore it's
  398. * also never loaded or saved.
  399. */
  400. VALUE_TYPE(INT),
  401. DEFAULT_INT(0),
  402. NOT_SAVED,
  403. )
  404. /* Telnet options */
  405. CONF_OPTION(termtype,
  406. VALUE_TYPE(STR),
  407. DEFAULT_STR("xterm"),
  408. SAVE_KEYWORD("TerminalType"),
  409. )
  410. CONF_OPTION(termspeed,
  411. VALUE_TYPE(STR),
  412. DEFAULT_STR("38400,38400"),
  413. SAVE_KEYWORD("TerminalSpeed"),
  414. )
  415. CONF_OPTION(ttymodes,
  416. /*
  417. * The full set of permitted subkeys is listed in
  418. * ssh/ttymode-list.h, as the first parameter of each TTYMODE_CHAR
  419. * or TTYMODE_FLAG macro.
  420. *
  421. * The permitted value strings are:
  422. *
  423. * - "N" means do not include a record for this mode at all in
  424. * the terminal mode data in the "pty-req" channel request.
  425. * Corresponds to setting the mode to 'Nothing' in the GUI.
  426. * - "A" means use PuTTY's automatic default, matching the
  427. * settings for GUI PuTTY's terminal window or Unix Plink's
  428. * controlling tty. Corresponds to setting 'Auto' in the GUI.
  429. * - "V" followed by further string data means send a custom
  430. * value to the SSH server. Values are as documented in the
  431. * manual.
  432. */
  433. SUBKEY_TYPE(STR),
  434. VALUE_TYPE(STR),
  435. LOAD_CUSTOM, SAVE_CUSTOM, /* necessary for mappings */
  436. )
  437. CONF_OPTION(environmt,
  438. SUBKEY_TYPE(STR), /* environment variable name */
  439. VALUE_TYPE(STR), /* environment variable value */
  440. LOAD_CUSTOM, SAVE_CUSTOM, /* necessary for mappings */
  441. )
  442. CONF_OPTION(username,
  443. VALUE_TYPE(STR_AMBI),
  444. DEFAULT_STR(""),
  445. SAVE_KEYWORD("UserName"),
  446. )
  447. CONF_OPTION(username_from_env,
  448. VALUE_TYPE(BOOL),
  449. DEFAULT_BOOL(false),
  450. SAVE_KEYWORD("UserNameFromEnvironment"),
  451. )
  452. CONF_OPTION(localusername,
  453. VALUE_TYPE(STR),
  454. DEFAULT_STR(""),
  455. SAVE_KEYWORD("LocalUserName"),
  456. )
  457. CONF_OPTION(rfc_environ,
  458. VALUE_TYPE(BOOL),
  459. DEFAULT_BOOL(false),
  460. SAVE_KEYWORD("RFCEnviron"),
  461. )
  462. CONF_OPTION(passive_telnet,
  463. VALUE_TYPE(BOOL),
  464. DEFAULT_BOOL(false),
  465. SAVE_KEYWORD("PassiveTelnet"),
  466. )
  467. /* Serial port options */
  468. CONF_OPTION(serline,
  469. VALUE_TYPE(STR),
  470. DEFAULT_STR(""),
  471. SAVE_KEYWORD("SerialLine"),
  472. )
  473. CONF_OPTION(serspeed,
  474. VALUE_TYPE(INT),
  475. DEFAULT_INT(9600),
  476. SAVE_KEYWORD("SerialSpeed"),
  477. )
  478. CONF_OPTION(serdatabits,
  479. VALUE_TYPE(INT),
  480. DEFAULT_INT(8),
  481. SAVE_KEYWORD("SerialDataBits"),
  482. )
  483. CONF_OPTION(serstopbits,
  484. VALUE_TYPE(INT),
  485. DEFAULT_INT(2),
  486. SAVE_KEYWORD("SerialStopHalfbits"),
  487. )
  488. CONF_OPTION(serparity,
  489. VALUE_TYPE(INT),
  490. DEFAULT_INT(SER_PAR_NONE),
  491. SAVE_KEYWORD("SerialParity"),
  492. STORAGE_ENUM(serparity),
  493. )
  494. CONF_OPTION(serflow,
  495. VALUE_TYPE(INT),
  496. DEFAULT_INT(SER_FLOW_XONXOFF),
  497. SAVE_KEYWORD("SerialFlowControl"),
  498. STORAGE_ENUM(serflow),
  499. )
  500. /* SUPDUP options */
  501. CONF_OPTION(supdup_location,
  502. VALUE_TYPE(STR),
  503. DEFAULT_STR("The Internet"),
  504. SAVE_KEYWORD("SUPDUPLocation"),
  505. )
  506. CONF_OPTION(supdup_ascii_set,
  507. VALUE_TYPE(INT),
  508. DEFAULT_INT(SUPDUP_CHARSET_ASCII),
  509. SAVE_KEYWORD("SUPDUPCharset"),
  510. STORAGE_ENUM(supdup_charset),
  511. )
  512. CONF_OPTION(supdup_more,
  513. VALUE_TYPE(BOOL),
  514. DEFAULT_BOOL(false),
  515. SAVE_KEYWORD("SUPDUPMoreProcessing"),
  516. )
  517. CONF_OPTION(supdup_scroll,
  518. VALUE_TYPE(BOOL),
  519. DEFAULT_BOOL(false),
  520. SAVE_KEYWORD("SUPDUPScrolling"),
  521. )
  522. /* Keyboard options */
  523. CONF_OPTION(bksp_is_delete,
  524. VALUE_TYPE(BOOL),
  525. DEFAULT_BOOL(true),
  526. SAVE_KEYWORD("BackspaceIsDelete"),
  527. )
  528. CONF_OPTION(rxvt_homeend,
  529. VALUE_TYPE(BOOL),
  530. DEFAULT_BOOL(false),
  531. SAVE_KEYWORD("RXVTHomeEnd"),
  532. )
  533. CONF_OPTION(funky_type,
  534. VALUE_TYPE(INT),
  535. DEFAULT_INT(FUNKY_TILDE),
  536. SAVE_KEYWORD("LinuxFunctionKeys"),
  537. STORAGE_ENUM(funky_type),
  538. )
  539. CONF_OPTION(sharrow_type,
  540. VALUE_TYPE(INT),
  541. DEFAULT_INT(SHARROW_APPLICATION),
  542. SAVE_KEYWORD("ShiftedArrowKeys"),
  543. STORAGE_ENUM(sharrow_type),
  544. )
  545. CONF_OPTION(no_applic_c, /* totally disable app cursor keys */
  546. VALUE_TYPE(BOOL),
  547. DEFAULT_BOOL(false),
  548. SAVE_KEYWORD("NoApplicationCursors"),
  549. )
  550. CONF_OPTION(no_applic_k, /* totally disable app keypad */
  551. VALUE_TYPE(BOOL),
  552. DEFAULT_BOOL(false),
  553. SAVE_KEYWORD("NoApplicationKeys"),
  554. )
  555. CONF_OPTION(no_mouse_rep, /* totally disable mouse reporting */
  556. VALUE_TYPE(BOOL),
  557. DEFAULT_BOOL(false),
  558. SAVE_KEYWORD("NoMouseReporting"),
  559. )
  560. CONF_OPTION(no_remote_resize, /* disable remote resizing */
  561. VALUE_TYPE(BOOL),
  562. DEFAULT_BOOL(false),
  563. SAVE_KEYWORD("NoRemoteResize"),
  564. )
  565. CONF_OPTION(no_alt_screen, /* disable alternate screen */
  566. VALUE_TYPE(BOOL),
  567. DEFAULT_BOOL(false),
  568. SAVE_KEYWORD("NoAltScreen"),
  569. )
  570. CONF_OPTION(no_remote_wintitle, /* disable remote retitling */
  571. VALUE_TYPE(BOOL),
  572. DEFAULT_BOOL(false),
  573. SAVE_KEYWORD("NoRemoteWinTitle"),
  574. )
  575. CONF_OPTION(no_remote_clearscroll, /* disable ESC[3J */
  576. VALUE_TYPE(BOOL),
  577. DEFAULT_BOOL(false),
  578. SAVE_KEYWORD("NoRemoteClearScroll"),
  579. )
  580. CONF_OPTION(no_dbackspace, /* disable destructive backspace */
  581. VALUE_TYPE(BOOL),
  582. DEFAULT_BOOL(false),
  583. SAVE_KEYWORD("NoDBackspace"),
  584. )
  585. CONF_OPTION(no_remote_charset, /* disable remote charset config */
  586. VALUE_TYPE(BOOL),
  587. DEFAULT_BOOL(false),
  588. SAVE_KEYWORD("NoRemoteCharset"),
  589. )
  590. CONF_OPTION(remote_qtitle_action, /* handling of remote window title queries */
  591. VALUE_TYPE(INT),
  592. STORAGE_ENUM(remote_qtitle_action),
  593. SAVE_KEYWORD("RemoteQTitleAction"),
  594. LOAD_CUSTOM, /* older versions had a boolean "NoRemoteQTitle"
  595. * before we ended up with three options */
  596. )
  597. CONF_OPTION(app_cursor,
  598. VALUE_TYPE(BOOL),
  599. DEFAULT_BOOL(false),
  600. SAVE_KEYWORD("ApplicationCursorKeys"),
  601. )
  602. CONF_OPTION(app_keypad,
  603. VALUE_TYPE(BOOL),
  604. DEFAULT_BOOL(false),
  605. SAVE_KEYWORD("ApplicationKeypad"),
  606. )
  607. CONF_OPTION(nethack_keypad,
  608. VALUE_TYPE(BOOL),
  609. DEFAULT_BOOL(false),
  610. SAVE_KEYWORD("NetHackKeypad"),
  611. )
  612. CONF_OPTION(telnet_keyboard,
  613. VALUE_TYPE(BOOL),
  614. DEFAULT_BOOL(false),
  615. SAVE_KEYWORD("TelnetKey"),
  616. )
  617. CONF_OPTION(telnet_newline,
  618. VALUE_TYPE(BOOL),
  619. DEFAULT_BOOL(true),
  620. SAVE_KEYWORD("TelnetRet"),
  621. )
  622. CONF_OPTION(alt_f4, /* is it special? */
  623. VALUE_TYPE(BOOL),
  624. DEFAULT_BOOL(true),
  625. SAVE_KEYWORD("AltF4"),
  626. )
  627. CONF_OPTION(alt_space, /* is it special? */
  628. VALUE_TYPE(BOOL),
  629. DEFAULT_BOOL(false),
  630. SAVE_KEYWORD("AltSpace"),
  631. )
  632. CONF_OPTION(alt_only, /* is it special? */
  633. VALUE_TYPE(BOOL),
  634. DEFAULT_BOOL(false),
  635. SAVE_KEYWORD("AltOnly"),
  636. )
  637. CONF_OPTION(localecho,
  638. VALUE_TYPE(INT),
  639. DEFAULT_INT(AUTO),
  640. SAVE_KEYWORD("LocalEcho"),
  641. STORAGE_ENUM(on_off_auto),
  642. )
  643. CONF_OPTION(localedit,
  644. VALUE_TYPE(INT),
  645. DEFAULT_INT(AUTO),
  646. SAVE_KEYWORD("LocalEdit"),
  647. STORAGE_ENUM(on_off_auto),
  648. )
  649. CONF_OPTION(alwaysontop,
  650. VALUE_TYPE(BOOL),
  651. DEFAULT_BOOL(false),
  652. SAVE_KEYWORD("AlwaysOnTop"),
  653. )
  654. CONF_OPTION(fullscreenonaltenter,
  655. VALUE_TYPE(BOOL),
  656. DEFAULT_BOOL(false),
  657. SAVE_KEYWORD("FullScreenOnAltEnter"),
  658. )
  659. CONF_OPTION(scroll_on_key,
  660. VALUE_TYPE(BOOL),
  661. DEFAULT_BOOL(false),
  662. SAVE_KEYWORD("ScrollOnKey"),
  663. )
  664. CONF_OPTION(scroll_on_disp,
  665. VALUE_TYPE(BOOL),
  666. DEFAULT_BOOL(true),
  667. SAVE_KEYWORD("ScrollOnDisp"),
  668. )
  669. CONF_OPTION(erase_to_scrollback,
  670. VALUE_TYPE(BOOL),
  671. DEFAULT_BOOL(true),
  672. SAVE_KEYWORD("EraseToScrollback"),
  673. )
  674. CONF_OPTION(compose_key,
  675. VALUE_TYPE(BOOL),
  676. DEFAULT_BOOL(false),
  677. SAVE_KEYWORD("ComposeKey"),
  678. )
  679. CONF_OPTION(ctrlaltkeys,
  680. VALUE_TYPE(BOOL),
  681. DEFAULT_BOOL(true),
  682. SAVE_KEYWORD("CtrlAltKeys"),
  683. )
  684. CONF_OPTION(osx_option_meta,
  685. VALUE_TYPE(BOOL),
  686. LOAD_CUSTOM, SAVE_CUSTOM, /* under #ifdef OSX_META_KEY_CONFIG */
  687. )
  688. CONF_OPTION(osx_command_meta,
  689. VALUE_TYPE(BOOL),
  690. LOAD_CUSTOM, SAVE_CUSTOM, /* under #ifdef OSX_META_KEY_CONFIG */
  691. )
  692. CONF_OPTION(wintitle, /* initial window title */
  693. VALUE_TYPE(STR),
  694. DEFAULT_STR(""),
  695. SAVE_KEYWORD("WinTitle"),
  696. )
  697. /* Terminal options */
  698. CONF_OPTION(savelines,
  699. VALUE_TYPE(INT),
  700. DEFAULT_INT(2000),
  701. SAVE_KEYWORD("ScrollbackLines"),
  702. )
  703. CONF_OPTION(dec_om,
  704. VALUE_TYPE(BOOL),
  705. DEFAULT_BOOL(false),
  706. SAVE_KEYWORD("DECOriginMode"),
  707. )
  708. CONF_OPTION(wrap_mode,
  709. VALUE_TYPE(BOOL),
  710. DEFAULT_BOOL(true),
  711. SAVE_KEYWORD("AutoWrapMode"),
  712. )
  713. CONF_OPTION(lfhascr,
  714. VALUE_TYPE(BOOL),
  715. DEFAULT_BOOL(false),
  716. SAVE_KEYWORD("LFImpliesCR"),
  717. )
  718. CONF_OPTION(cursor_type,
  719. VALUE_TYPE(INT),
  720. DEFAULT_INT(0),
  721. SAVE_KEYWORD("CurType"),
  722. STORAGE_ENUM(cursor_type),
  723. )
  724. CONF_OPTION(blink_cur,
  725. VALUE_TYPE(BOOL),
  726. DEFAULT_BOOL(false),
  727. SAVE_KEYWORD("BlinkCur"),
  728. )
  729. CONF_OPTION(beep,
  730. VALUE_TYPE(INT),
  731. DEFAULT_INT(BELL_DEFAULT),
  732. SAVE_KEYWORD("Beep"),
  733. STORAGE_ENUM(beep),
  734. )
  735. CONF_OPTION(beep_ind,
  736. VALUE_TYPE(INT),
  737. DEFAULT_INT(B_IND_DISABLED),
  738. SAVE_KEYWORD("BeepInd"),
  739. STORAGE_ENUM(beep_indication),
  740. )
  741. CONF_OPTION(bellovl, /* bell overload protection active? */
  742. VALUE_TYPE(BOOL),
  743. DEFAULT_BOOL(true),
  744. SAVE_KEYWORD("BellOverload"),
  745. )
  746. CONF_OPTION(bellovl_n, /* number of bells to cause overload */
  747. VALUE_TYPE(INT),
  748. DEFAULT_INT(5),
  749. SAVE_KEYWORD("BellOverloadN"),
  750. )
  751. CONF_OPTION(bellovl_t, /* time interval for overload (ticks) */
  752. VALUE_TYPE(INT),
  753. LOAD_CUSTOM, SAVE_CUSTOM,
  754. /*
  755. * Loading and saving is done in custom code because the format is
  756. * platform-dependent for historical reasons: on Unix, the stored
  757. * value is multiplied by 1000. (And since TICKSPERSEC=1000 on
  758. * that platform, it means the stored value is interpreted in
  759. * microseconds.)
  760. */
  761. )
  762. CONF_OPTION(bellovl_s, /* period of silence to re-enable bell (s) */
  763. VALUE_TYPE(INT),
  764. LOAD_CUSTOM, SAVE_CUSTOM,
  765. /*
  766. * Loading and saving is done in custom code because the format is
  767. * platform-dependent for historical reasons: on Unix, the stored
  768. * value is multiplied by 1000. (And since TICKSPERSEC=1000 on
  769. * that platform, it means the stored value is interpreted in
  770. * microseconds.)
  771. */
  772. )
  773. CONF_OPTION(bell_wavefile,
  774. VALUE_TYPE(FILENAME),
  775. SAVE_KEYWORD("BellWaveFile"),
  776. )
  777. CONF_OPTION(scrollbar,
  778. VALUE_TYPE(BOOL),
  779. DEFAULT_BOOL(true),
  780. SAVE_KEYWORD("ScrollBar"),
  781. )
  782. CONF_OPTION(scrollbar_in_fullscreen,
  783. VALUE_TYPE(BOOL),
  784. DEFAULT_BOOL(false),
  785. SAVE_KEYWORD("ScrollBarFullScreen"),
  786. )
  787. CONF_OPTION(resize_action,
  788. VALUE_TYPE(INT),
  789. DEFAULT_INT(RESIZE_TERM),
  790. SAVE_KEYWORD("LockSize"),
  791. STORAGE_ENUM(resize_effect),
  792. )
  793. CONF_OPTION(bce,
  794. VALUE_TYPE(BOOL),
  795. DEFAULT_BOOL(true),
  796. SAVE_KEYWORD("BCE"),
  797. )
  798. CONF_OPTION(blinktext,
  799. VALUE_TYPE(BOOL),
  800. DEFAULT_BOOL(false),
  801. SAVE_KEYWORD("BlinkText"),
  802. )
  803. CONF_OPTION(win_name_always,
  804. VALUE_TYPE(BOOL),
  805. DEFAULT_BOOL(true),
  806. SAVE_KEYWORD("WinNameAlways"),
  807. )
  808. CONF_OPTION(width,
  809. VALUE_TYPE(INT),
  810. DEFAULT_INT(80),
  811. SAVE_KEYWORD("TermWidth"),
  812. )
  813. CONF_OPTION(height,
  814. VALUE_TYPE(INT),
  815. DEFAULT_INT(24),
  816. SAVE_KEYWORD("TermHeight"),
  817. )
  818. CONF_OPTION(font,
  819. VALUE_TYPE(FONT),
  820. SAVE_KEYWORD("Font"),
  821. )
  822. CONF_OPTION(font_quality,
  823. VALUE_TYPE(INT),
  824. DEFAULT_INT(FQ_DEFAULT),
  825. SAVE_KEYWORD("FontQuality"),
  826. STORAGE_ENUM(font_quality),
  827. )
  828. CONF_OPTION(logfilename,
  829. VALUE_TYPE(FILENAME),
  830. SAVE_KEYWORD("LogFileName"),
  831. )
  832. CONF_OPTION(logtype,
  833. VALUE_TYPE(INT),
  834. DEFAULT_INT(LGTYP_NONE),
  835. SAVE_KEYWORD("LogType"),
  836. STORAGE_ENUM(log_type),
  837. )
  838. CONF_OPTION(logxfovr,
  839. VALUE_TYPE(INT),
  840. DEFAULT_INT(LGXF_ASK),
  841. SAVE_KEYWORD("LogFileClash"),
  842. STORAGE_ENUM(log_to_existing_file),
  843. )
  844. CONF_OPTION(logflush,
  845. VALUE_TYPE(BOOL),
  846. DEFAULT_BOOL(true),
  847. SAVE_KEYWORD("LogFlush"),
  848. )
  849. CONF_OPTION(logheader,
  850. VALUE_TYPE(BOOL),
  851. DEFAULT_BOOL(true),
  852. SAVE_KEYWORD("LogHeader"),
  853. )
  854. CONF_OPTION(logomitpass,
  855. VALUE_TYPE(BOOL),
  856. DEFAULT_BOOL(true),
  857. SAVE_KEYWORD("SSHLogOmitPasswords"),
  858. )
  859. CONF_OPTION(logomitdata,
  860. VALUE_TYPE(BOOL),
  861. DEFAULT_BOOL(false),
  862. SAVE_KEYWORD("SSHLogOmitData"),
  863. )
  864. CONF_OPTION(hide_mouseptr,
  865. VALUE_TYPE(BOOL),
  866. DEFAULT_BOOL(false),
  867. SAVE_KEYWORD("HideMousePtr"),
  868. )
  869. CONF_OPTION(sunken_edge,
  870. VALUE_TYPE(BOOL),
  871. DEFAULT_BOOL(false),
  872. SAVE_KEYWORD("SunkenEdge"),
  873. )
  874. CONF_OPTION(window_border,
  875. VALUE_TYPE(INT), /* in pixels */
  876. DEFAULT_INT(1),
  877. SAVE_KEYWORD("WindowBorder"),
  878. )
  879. CONF_OPTION(answerback,
  880. VALUE_TYPE(STR),
  881. DEFAULT_STR("PuTTY"),
  882. SAVE_KEYWORD("Answerback"),
  883. )
  884. CONF_OPTION(printer,
  885. VALUE_TYPE(STR),
  886. DEFAULT_STR(""),
  887. SAVE_KEYWORD("Printer"),
  888. )
  889. CONF_OPTION(no_arabicshaping,
  890. VALUE_TYPE(BOOL),
  891. DEFAULT_BOOL(false),
  892. SAVE_KEYWORD("DisableArabicShaping"),
  893. )
  894. CONF_OPTION(no_bidi,
  895. VALUE_TYPE(BOOL),
  896. DEFAULT_BOOL(false),
  897. SAVE_KEYWORD("DisableBidi"),
  898. )
  899. CONF_OPTION(no_bracketed_paste,
  900. VALUE_TYPE(BOOL),
  901. DEFAULT_BOOL(false),
  902. SAVE_KEYWORD("DisableBracketedPaste"),
  903. )
  904. /* Colour options */
  905. CONF_OPTION(ansi_colour,
  906. VALUE_TYPE(BOOL),
  907. DEFAULT_BOOL(true),
  908. SAVE_KEYWORD("ANSIColour"),
  909. )
  910. CONF_OPTION(xterm_256_colour,
  911. VALUE_TYPE(BOOL),
  912. DEFAULT_BOOL(true),
  913. SAVE_KEYWORD("Xterm256Colour"),
  914. )
  915. CONF_OPTION(true_colour,
  916. VALUE_TYPE(BOOL),
  917. DEFAULT_BOOL(true),
  918. SAVE_KEYWORD("TrueColour"),
  919. )
  920. CONF_OPTION(system_colour,
  921. VALUE_TYPE(BOOL),
  922. DEFAULT_BOOL(false),
  923. SAVE_KEYWORD("UseSystemColours"),
  924. )
  925. CONF_OPTION(try_palette,
  926. VALUE_TYPE(BOOL),
  927. DEFAULT_BOOL(false),
  928. SAVE_KEYWORD("TryPalette"),
  929. )
  930. CONF_OPTION(bold_style,
  931. VALUE_TYPE(INT),
  932. DEFAULT_INT(2),
  933. SAVE_KEYWORD("BoldAsColour"),
  934. STORAGE_ENUM(bold_style),
  935. )
  936. CONF_OPTION(colours,
  937. /*
  938. * Subkeys in this setting are indexed based on the CONF_COLOUR_*
  939. * enum values in putty.h. But each subkey identifies just one
  940. * component of the RGB value. Subkey 3*a+b identifies colour #a,
  941. * channel #b, where channels 0,1,2 mean R,G,B respectively.
  942. *
  943. * Values are 8-bit integers.
  944. */
  945. SUBKEY_TYPE(INT),
  946. VALUE_TYPE(INT),
  947. LOAD_CUSTOM, SAVE_CUSTOM, /* necessary for mappings */
  948. )
  949. /* Selection options */
  950. CONF_OPTION(mouse_is_xterm,
  951. VALUE_TYPE(INT),
  952. DEFAULT_INT(0),
  953. SAVE_KEYWORD("MouseIsXterm"),
  954. STORAGE_ENUM(mouse_buttons),
  955. )
  956. CONF_OPTION(rect_select,
  957. VALUE_TYPE(BOOL),
  958. DEFAULT_BOOL(false),
  959. SAVE_KEYWORD("RectSelect"),
  960. )
  961. CONF_OPTION(paste_controls,
  962. VALUE_TYPE(BOOL),
  963. DEFAULT_BOOL(false),
  964. SAVE_KEYWORD("PasteControls"),
  965. )
  966. CONF_OPTION(rawcnp,
  967. VALUE_TYPE(BOOL),
  968. DEFAULT_BOOL(false),
  969. SAVE_KEYWORD("RawCNP"),
  970. )
  971. CONF_OPTION(utf8linedraw,
  972. VALUE_TYPE(BOOL),
  973. DEFAULT_BOOL(false),
  974. SAVE_KEYWORD("UTF8linedraw"),
  975. )
  976. CONF_OPTION(rtf_paste,
  977. VALUE_TYPE(BOOL),
  978. DEFAULT_BOOL(false),
  979. SAVE_KEYWORD("PasteRTF"),
  980. )
  981. CONF_OPTION(mouse_override,
  982. VALUE_TYPE(BOOL),
  983. DEFAULT_BOOL(true),
  984. SAVE_KEYWORD("MouseOverride"),
  985. )
  986. CONF_OPTION(wordness,
  987. SUBKEY_TYPE(INT), /* ASCII character codes (literally, just 00-7F) */
  988. VALUE_TYPE(INT), /* arbitrary equivalence-class value for that char */
  989. LOAD_CUSTOM, SAVE_CUSTOM, /* necessary for mappings */
  990. )
  991. CONF_OPTION(mouseautocopy,
  992. /*
  993. * What clipboard (if any) to copy text to as soon as it's
  994. * selected with the mouse.
  995. */
  996. VALUE_TYPE(BOOL),
  997. DEFAULT_BOOL(CLIPUI_DEFAULT_AUTOCOPY), /* platform-dependent bool-valued
  998. * macro */
  999. SAVE_KEYWORD("MouseAutocopy"),
  1000. )
  1001. CONF_OPTION(mousepaste, /* clipboard used by one-mouse-click paste actions */
  1002. VALUE_TYPE(INT),
  1003. LOAD_CUSTOM, SAVE_CUSTOM,
  1004. /*
  1005. * SAVE_KEYWORD("MousePaste"), but loading and saving is done by
  1006. * custom code, because the saved value is a string, and also sets
  1007. * CONF_mousepaste_custom
  1008. */
  1009. )
  1010. CONF_OPTION(ctrlshiftins, /* clipboard used by Ctrl+Ins and Shift+Ins */
  1011. VALUE_TYPE(INT),
  1012. LOAD_CUSTOM, SAVE_CUSTOM,
  1013. /*
  1014. * SAVE_KEYWORD("CtrlShiftIns"), but loading and saving is done by
  1015. * custom code, because the saved value is a string, and also sets
  1016. * CONF_ctrlshiftins_custom
  1017. */
  1018. )
  1019. CONF_OPTION(ctrlshiftcv, /* clipboard used by Ctrl+Shift+C and Ctrl+Shift+V */
  1020. VALUE_TYPE(INT),
  1021. LOAD_CUSTOM, SAVE_CUSTOM,
  1022. /*
  1023. * SAVE_KEYWORD("CtrlShiftCV"), but loading and saving is done by
  1024. * custom code, because the saved value is a string, and also sets
  1025. * CONF_ctrlshiftcv_custom
  1026. */
  1027. )
  1028. CONF_OPTION(mousepaste_custom,
  1029. /* Custom clipboard name if CONF_mousepaste is set to CLIPUI_CUSTOM */
  1030. VALUE_TYPE(STR),
  1031. LOAD_CUSTOM, SAVE_CUSTOM,
  1032. /*
  1033. * Loading and saving is handled by custom code in conjunction
  1034. * with CONF_mousepaste
  1035. */
  1036. )
  1037. CONF_OPTION(ctrlshiftins_custom,
  1038. /* Custom clipboard name if CONF_ctrlshiftins is set to CLIPUI_CUSTOM */
  1039. VALUE_TYPE(STR),
  1040. LOAD_CUSTOM, SAVE_CUSTOM,
  1041. /*
  1042. * Loading and saving is handled by custom code in conjunction
  1043. * with CONF_ctrlshiftins
  1044. */
  1045. )
  1046. CONF_OPTION(ctrlshiftcv_custom,
  1047. /* Custom clipboard name if CONF_ctrlshiftcv is set to CLIPUI_CUSTOM */
  1048. VALUE_TYPE(STR),
  1049. LOAD_CUSTOM, SAVE_CUSTOM,
  1050. /*
  1051. * Loading and saving is handled by custom code in conjunction
  1052. * with CONF_ctrlshiftcv
  1053. */
  1054. )
  1055. /* Character-set translation */
  1056. CONF_OPTION(vtmode,
  1057. VALUE_TYPE(INT),
  1058. DEFAULT_INT(VT_UNICODE),
  1059. SAVE_KEYWORD("FontVTMode"),
  1060. STORAGE_ENUM(line_drawing),
  1061. )
  1062. CONF_OPTION(line_codepage,
  1063. VALUE_TYPE(STR),
  1064. DEFAULT_STR(""),
  1065. SAVE_KEYWORD("LineCodePage"),
  1066. )
  1067. CONF_OPTION(cjk_ambig_wide,
  1068. VALUE_TYPE(BOOL),
  1069. DEFAULT_BOOL(false),
  1070. SAVE_KEYWORD("CJKAmbigWide"),
  1071. )
  1072. CONF_OPTION(utf8_override,
  1073. VALUE_TYPE(BOOL),
  1074. DEFAULT_BOOL(true),
  1075. SAVE_KEYWORD("UTF8Override"),
  1076. )
  1077. CONF_OPTION(xlat_capslockcyr,
  1078. VALUE_TYPE(BOOL),
  1079. DEFAULT_BOOL(false),
  1080. SAVE_KEYWORD("CapsLockCyr"),
  1081. )
  1082. /* X11 forwarding */
  1083. CONF_OPTION(x11_forward,
  1084. VALUE_TYPE(BOOL),
  1085. DEFAULT_BOOL(false),
  1086. SAVE_KEYWORD("X11Forward"),
  1087. )
  1088. CONF_OPTION(x11_display,
  1089. VALUE_TYPE(STR),
  1090. DEFAULT_STR(""),
  1091. SAVE_KEYWORD("X11Display"),
  1092. )
  1093. CONF_OPTION(x11_auth,
  1094. VALUE_TYPE(INT),
  1095. DEFAULT_INT(X11_MIT),
  1096. SAVE_KEYWORD("X11AuthType"),
  1097. STORAGE_ENUM(x11_auth),
  1098. )
  1099. CONF_OPTION(xauthfile,
  1100. VALUE_TYPE(FILENAME),
  1101. SAVE_KEYWORD("X11AuthFile"),
  1102. )
  1103. /* Port forwarding */
  1104. CONF_OPTION(lport_acceptall, /* accept conns from hosts other than localhost */
  1105. VALUE_TYPE(BOOL),
  1106. DEFAULT_BOOL(false),
  1107. SAVE_KEYWORD("LocalPortAcceptAll"),
  1108. )
  1109. CONF_OPTION(rport_acceptall, /* same for remote forwarded ports */
  1110. VALUE_TYPE(BOOL),
  1111. DEFAULT_BOOL(false),
  1112. SAVE_KEYWORD("RemotePortAcceptAll"),
  1113. )
  1114. CONF_OPTION(portfwd,
  1115. /*
  1116. * Subkeys for 'portfwd' can have the following forms:
  1117. *
  1118. * [LR]localport
  1119. * [LR]localaddr:localport
  1120. *
  1121. * Dynamic forwardings are indicated by an 'L' key, and the
  1122. * special value "D". For all other forwardings, the value should
  1123. * be of the form 'host:port'.
  1124. */
  1125. SUBKEY_TYPE(STR),
  1126. VALUE_TYPE(STR),
  1127. LOAD_CUSTOM, SAVE_CUSTOM, /* necessary for mappings */
  1128. )
  1129. /* SSH bug compatibility modes. All FORCE_ON/FORCE_OFF/AUTO */
  1130. CONF_OPTION(sshbug_ignore1,
  1131. VALUE_TYPE(INT),
  1132. DEFAULT_INT(AUTO),
  1133. SAVE_KEYWORD("BugIgnore1"),
  1134. STORAGE_ENUM(auto_off_on),
  1135. )
  1136. CONF_OPTION(sshbug_plainpw1,
  1137. VALUE_TYPE(INT),
  1138. DEFAULT_INT(AUTO),
  1139. SAVE_KEYWORD("BugPlainPW1"),
  1140. STORAGE_ENUM(auto_off_on),
  1141. )
  1142. CONF_OPTION(sshbug_rsa1,
  1143. VALUE_TYPE(INT),
  1144. DEFAULT_INT(AUTO),
  1145. SAVE_KEYWORD("BugRSA1"),
  1146. STORAGE_ENUM(auto_off_on),
  1147. )
  1148. CONF_OPTION(sshbug_ignore2,
  1149. VALUE_TYPE(INT),
  1150. DEFAULT_INT(AUTO),
  1151. SAVE_KEYWORD("BugIgnore2"),
  1152. STORAGE_ENUM(auto_off_on),
  1153. )
  1154. CONF_OPTION(sshbug_derivekey2,
  1155. VALUE_TYPE(INT),
  1156. DEFAULT_INT(AUTO),
  1157. SAVE_KEYWORD("BugDeriveKey2"),
  1158. STORAGE_ENUM(auto_off_on),
  1159. )
  1160. CONF_OPTION(sshbug_rsapad2,
  1161. VALUE_TYPE(INT),
  1162. DEFAULT_INT(AUTO),
  1163. SAVE_KEYWORD("BugRSAPad2"),
  1164. STORAGE_ENUM(auto_off_on),
  1165. )
  1166. CONF_OPTION(sshbug_pksessid2,
  1167. VALUE_TYPE(INT),
  1168. DEFAULT_INT(AUTO),
  1169. SAVE_KEYWORD("BugPKSessID2"),
  1170. STORAGE_ENUM(auto_off_on),
  1171. )
  1172. CONF_OPTION(sshbug_rekey2,
  1173. VALUE_TYPE(INT),
  1174. DEFAULT_INT(AUTO),
  1175. SAVE_KEYWORD("BugRekey2"),
  1176. STORAGE_ENUM(auto_off_on),
  1177. )
  1178. CONF_OPTION(sshbug_maxpkt2,
  1179. VALUE_TYPE(INT),
  1180. DEFAULT_INT(AUTO),
  1181. SAVE_KEYWORD("BugMaxPkt2"),
  1182. STORAGE_ENUM(auto_off_on),
  1183. )
  1184. CONF_OPTION(sshbug_oldgex2,
  1185. VALUE_TYPE(INT),
  1186. DEFAULT_INT(AUTO),
  1187. SAVE_KEYWORD("BugOldGex2"),
  1188. STORAGE_ENUM(auto_off_on),
  1189. )
  1190. CONF_OPTION(sshbug_winadj,
  1191. VALUE_TYPE(INT),
  1192. DEFAULT_INT(AUTO),
  1193. SAVE_KEYWORD("BugWinadj"),
  1194. STORAGE_ENUM(auto_off_on),
  1195. )
  1196. CONF_OPTION(sshbug_chanreq,
  1197. VALUE_TYPE(INT),
  1198. DEFAULT_INT(AUTO),
  1199. SAVE_KEYWORD("BugChanReq"),
  1200. STORAGE_ENUM(auto_off_on),
  1201. )
  1202. CONF_OPTION(sshbug_dropstart,
  1203. VALUE_TYPE(INT),
  1204. DEFAULT_INT(FORCE_OFF),
  1205. SAVE_KEYWORD("BugDropStart"),
  1206. STORAGE_ENUM(off1_on2),
  1207. )
  1208. CONF_OPTION(sshbug_filter_kexinit,
  1209. VALUE_TYPE(INT),
  1210. DEFAULT_INT(FORCE_OFF),
  1211. SAVE_KEYWORD("BugFilterKexinit"),
  1212. STORAGE_ENUM(off1_on2),
  1213. )
  1214. CONF_OPTION(sshbug_rsa_sha2_cert_userauth,
  1215. VALUE_TYPE(INT),
  1216. DEFAULT_INT(AUTO),
  1217. SAVE_KEYWORD("BugRSASHA2CertUserauth"),
  1218. STORAGE_ENUM(auto_off_on),
  1219. )
  1220. CONF_OPTION(sshbug_hmac2,
  1221. VALUE_TYPE(INT),
  1222. DEFAULT_INT(AUTO),
  1223. SAVE_KEYWORD("BugHMAC2"),
  1224. STORAGE_ENUM(auto_off_on),
  1225. LOAD_CUSTOM, /* there was an earlier keyword called "BuggyMAC" */
  1226. )
  1227. /* Options for Unix. Should split out into platform-dependent part. */
  1228. CONF_OPTION(stamp_utmp, /* used by Unix pterm */
  1229. VALUE_TYPE(BOOL),
  1230. DEFAULT_BOOL(true),
  1231. SAVE_KEYWORD("StampUtmp"),
  1232. )
  1233. CONF_OPTION(login_shell, /* used by Unix pterm */
  1234. VALUE_TYPE(BOOL),
  1235. DEFAULT_BOOL(true),
  1236. SAVE_KEYWORD("LoginShell"),
  1237. )
  1238. CONF_OPTION(scrollbar_on_left,
  1239. VALUE_TYPE(BOOL),
  1240. DEFAULT_BOOL(false),
  1241. SAVE_KEYWORD("ScrollbarOnLeft"),
  1242. )
  1243. CONF_OPTION(shadowbold,
  1244. VALUE_TYPE(BOOL),
  1245. DEFAULT_BOOL(false),
  1246. SAVE_KEYWORD("ShadowBold"),
  1247. )
  1248. CONF_OPTION(boldfont,
  1249. VALUE_TYPE(FONT),
  1250. SAVE_KEYWORD("BoldFont"),
  1251. )
  1252. CONF_OPTION(widefont,
  1253. VALUE_TYPE(FONT),
  1254. SAVE_KEYWORD("WideFont"),
  1255. )
  1256. CONF_OPTION(wideboldfont,
  1257. VALUE_TYPE(FONT),
  1258. SAVE_KEYWORD("WideBoldFont"),
  1259. )
  1260. CONF_OPTION(shadowboldoffset,
  1261. VALUE_TYPE(INT), /* in pixels */
  1262. DEFAULT_INT(1),
  1263. SAVE_KEYWORD("ShadowBoldOffset"),
  1264. )
  1265. CONF_OPTION(crhaslf,
  1266. VALUE_TYPE(BOOL),
  1267. DEFAULT_BOOL(false),
  1268. SAVE_KEYWORD("CRImpliesLF"),
  1269. )
  1270. CONF_OPTION(winclass,
  1271. VALUE_TYPE(STR),
  1272. DEFAULT_STR(""),
  1273. SAVE_KEYWORD("WindowClass"),
  1274. )