aria2Options.js 31 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049
  1. (function () {
  2. 'use strict';
  3. angular.module('ariaNg').constant('aria2AllOptions', {
  4. // Aria2 Option Defination EXAMPLE:
  5. // 'option key': {
  6. // [since: '',] //This option is supported by this or higher aria2 version
  7. // type: 'string|integer|float|text|boolean|option',
  8. // [suffix: 'Bytes|Milliseconds|Seconds|Minutes|Hours',]
  9. // [readonly: true|false,] //default: false
  10. // [defaultValue: '',]
  11. // [required: true|false,] //default: false
  12. // [split: '',] //SUPPORT 'text' type
  13. // [submitFormat: 'string|array'] //default: string, parameter 'split' is required
  14. // [showCount: true|false,] //SUPPORT 'text' type, parameter 'split' is required, default: false
  15. // [options: [],] //SUPPORT 'option' type
  16. // [min: 0,] //SUPPORT 'integer', 'float'
  17. // [max: 0,] //SUPPORT 'integer', 'float'
  18. // [pattern: '']
  19. // }
  20. 'gid': {
  21. type: 'string',
  22. readonly: true,
  23. required: true
  24. },
  25. 'dir': {
  26. type: 'string',
  27. required: true
  28. },
  29. 'log': {
  30. type: 'string',
  31. required: true
  32. },
  33. 'max-concurrent-downloads': {
  34. type: 'integer',
  35. defaultValue: '5',
  36. required: true,
  37. min: 1
  38. },
  39. 'check-integrity': {
  40. type: 'boolean',
  41. defaultValue: 'false',
  42. required: true
  43. },
  44. 'continue': {
  45. type: 'boolean',
  46. required: true
  47. },
  48. 'all-proxy': {
  49. type: 'string'
  50. },
  51. 'all-proxy-user': {
  52. type: 'string'
  53. },
  54. 'all-proxy-passwd': {
  55. type: 'string'
  56. },
  57. 'checksum': {
  58. type: 'string',
  59. pattern: '^(md5|sha-(1|224|256|384|512))=[a-zA-Z0-9]+$'
  60. },
  61. 'connect-timeout': {
  62. type: 'integer',
  63. suffix: 'Seconds',
  64. defaultValue: '60',
  65. required: true,
  66. min: 1,
  67. max: 600
  68. },
  69. 'dry-run': {
  70. type: 'boolean',
  71. defaultValue: 'false',
  72. required: true
  73. },
  74. 'lowest-speed-limit': {
  75. type: 'string',
  76. suffix: 'Bytes',
  77. defaultValue: '0',
  78. required: true,
  79. pattern: '^(0|[1-9]\\d*(K|k|M|m)?)$'
  80. },
  81. 'max-connection-per-server': {
  82. type: 'integer',
  83. defaultValue: '1',
  84. required: true,
  85. min: 1,
  86. max: 16
  87. },
  88. 'max-file-not-found': {
  89. type: 'integer',
  90. defaultValue: '0',
  91. required: true,
  92. min: 0
  93. },
  94. 'max-tries': {
  95. type: 'integer',
  96. defaultValue: '5',
  97. required: true,
  98. min: 0
  99. },
  100. 'min-split-size': {
  101. type: 'string',
  102. suffix: 'Bytes',
  103. defaultValue: '20M',
  104. required: true,
  105. pattern: '^(0|[1-9]\\d*(K|k|M|m)?)$'
  106. },
  107. 'netrc-path': {
  108. type: 'string',
  109. readonly: true,
  110. defaultValue: '$(HOME)/.netrc'
  111. },
  112. 'no-netrc': {
  113. type: 'boolean',
  114. required: true
  115. },
  116. 'no-proxy': {
  117. type: 'text',
  118. split: ',',
  119. showCount: true
  120. },
  121. 'out': {
  122. type: 'string'
  123. },
  124. 'proxy-method': {
  125. type: 'option',
  126. options: ['get', 'tunnel'],
  127. defaultValue: 'get',
  128. required: true
  129. },
  130. 'remote-time': {
  131. type: 'boolean',
  132. defaultValue: 'false',
  133. required: true
  134. },
  135. 'reuse-uri': {
  136. type: 'boolean',
  137. defaultValue: 'true',
  138. required: true
  139. },
  140. 'retry-wait': {
  141. type: 'integer',
  142. suffix: 'Seconds',
  143. defaultValue: '0',
  144. required: true,
  145. min: 0,
  146. max: 600
  147. },
  148. 'server-stat-of': {
  149. type: 'string'
  150. },
  151. 'server-stat-timeout': {
  152. type: 'integer',
  153. suffix: 'Seconds',
  154. readonly: true,
  155. defaultValue: '86400'
  156. },
  157. 'split': {
  158. type: 'integer',
  159. defaultValue: '5',
  160. required: true,
  161. min: 1
  162. },
  163. 'stream-piece-selector': {
  164. type: 'option',
  165. options: ['default', 'inorder', 'random', 'geom'],
  166. defaultValue: 'default',
  167. required: true
  168. },
  169. 'timeout': {
  170. type: 'integer',
  171. suffix: 'Seconds',
  172. defaultValue: '60',
  173. required: true,
  174. min: 1,
  175. max: 600
  176. },
  177. 'uri-selector': {
  178. type: 'option',
  179. options: ['inorder', 'feedback', 'adaptive'],
  180. defaultValue: 'feedback',
  181. required: true
  182. },
  183. 'check-certificate': {
  184. type: 'boolean',
  185. readonly: true,
  186. defaultValue: 'true'
  187. },
  188. 'http-accept-gzip': {
  189. type: 'boolean',
  190. defaultValue: 'false',
  191. required: true
  192. },
  193. 'http-auth-challenge': {
  194. type: 'boolean',
  195. defaultValue: 'false',
  196. required: true
  197. },
  198. 'http-no-cache': {
  199. type: 'boolean',
  200. defaultValue: 'false',
  201. required: true
  202. },
  203. 'http-user': {
  204. type: 'string'
  205. },
  206. 'http-passwd': {
  207. type: 'string'
  208. },
  209. 'http-proxy': {
  210. type: 'string'
  211. },
  212. 'http-proxy-user': {
  213. type: 'string'
  214. },
  215. 'http-proxy-passwd': {
  216. type: 'string'
  217. },
  218. 'https-proxy': {
  219. type: 'string'
  220. },
  221. 'https-proxy-user': {
  222. type: 'string'
  223. },
  224. 'https-proxy-passwd': {
  225. type: 'string'
  226. },
  227. 'referer': {
  228. type: 'string'
  229. },
  230. 'enable-http-keep-alive': {
  231. type: 'boolean',
  232. defaultValue: 'true',
  233. required: true
  234. },
  235. 'enable-http-pipelining': {
  236. type: 'boolean',
  237. defaultValue: 'false',
  238. required: true
  239. },
  240. 'header': {
  241. type: 'text',
  242. split: '\n',
  243. submitFormat: 'array',
  244. showCount: true
  245. },
  246. 'save-cookies': {
  247. type: 'string'
  248. },
  249. 'use-head': {
  250. type: 'boolean',
  251. defaultValue: 'false',
  252. required: true
  253. },
  254. 'user-agent': {
  255. type: 'string',
  256. defaultValue: 'aria2/$VERSION'
  257. },
  258. 'ftp-user': {
  259. type: 'string',
  260. defaultValue: 'anonymous'
  261. },
  262. 'ftp-passwd': {
  263. type: 'string',
  264. defaultValue: 'ARIA2USER@'
  265. },
  266. 'ftp-pasv': {
  267. type: 'boolean',
  268. defaultValue: 'true',
  269. required: true
  270. },
  271. 'ftp-proxy': {
  272. type: 'string'
  273. },
  274. 'ftp-proxy-user': {
  275. type: 'string'
  276. },
  277. 'ftp-proxy-passwd': {
  278. type: 'string'
  279. },
  280. 'ftp-type': {
  281. type: 'option',
  282. options: ['binary', 'ascii'],
  283. defaultValue: 'binary',
  284. required: true
  285. },
  286. 'ftp-reuse-connection': {
  287. type: 'boolean',
  288. defaultValue: 'true',
  289. required: true
  290. },
  291. 'ssh-host-key-md': {
  292. type: 'string'
  293. },
  294. 'show-files': {
  295. type: 'boolean',
  296. readonly: true
  297. },
  298. 'bt-detach-seed-only': {
  299. type: 'boolean',
  300. readonly: true,
  301. defaultValue: 'false'
  302. },
  303. 'bt-enable-hook-after-hash-check': {
  304. since: '1.19.3',
  305. type: 'boolean',
  306. defaultValue: 'true',
  307. required: true
  308. },
  309. 'bt-enable-lpd': {
  310. type: 'boolean',
  311. defaultValue: 'false',
  312. required: true
  313. },
  314. 'bt-exclude-tracker': {
  315. type: 'text',
  316. split: ',',
  317. showCount: true
  318. },
  319. 'bt-external-ip': {
  320. type: 'string'
  321. },
  322. 'bt-force-encryption': {
  323. type: 'boolean',
  324. defaultValue: 'false',
  325. required: true
  326. },
  327. 'bt-hash-check-seed': {
  328. type: 'boolean',
  329. defaultValue: 'true',
  330. required: true
  331. },
  332. 'bt-load-saved-metadata': {
  333. since: '1.33.0',
  334. type: 'boolean',
  335. defaultValue: 'false',
  336. required: true
  337. },
  338. 'bt-max-open-files': {
  339. type: 'integer',
  340. defaultValue: '100',
  341. required: true,
  342. min: 1
  343. },
  344. 'bt-max-peers': {
  345. type: 'integer',
  346. defaultValue: '55',
  347. required: true,
  348. min: 0
  349. },
  350. 'bt-metadata-only': {
  351. type: 'boolean',
  352. defaultValue: 'false',
  353. required: true
  354. },
  355. 'bt-min-crypto-level': {
  356. type: 'option',
  357. options: ['plain', 'arc4'],
  358. defaultValue: 'plain',
  359. required: true
  360. },
  361. 'bt-prioritize-piece': {
  362. type: 'string'
  363. },
  364. 'bt-remove-unselected-file': {
  365. type: 'boolean',
  366. defaultValue: 'false',
  367. required: true
  368. },
  369. 'bt-require-crypto': {
  370. type: 'boolean',
  371. defaultValue: 'false',
  372. required: true
  373. },
  374. 'bt-request-peer-speed-limit': {
  375. type: 'string',
  376. suffix: 'Bytes',
  377. defaultValue: '50K',
  378. required: true,
  379. pattern: '^(0|[1-9]\\d*(K|k|M|m)?)$'
  380. },
  381. 'bt-save-metadata': {
  382. type: 'boolean',
  383. defaultValue: 'false',
  384. required: true
  385. },
  386. 'bt-seed-unverified': {
  387. type: 'boolean',
  388. defaultValue: 'false',
  389. required: true
  390. },
  391. 'bt-stop-timeout': {
  392. type: 'integer',
  393. suffix: 'Seconds',
  394. defaultValue: '0',
  395. required: true,
  396. min: 0
  397. },
  398. 'bt-tracker': {
  399. type: 'text',
  400. split: ',',
  401. showCount: true
  402. },
  403. 'bt-tracker-connect-timeout': {
  404. type: 'integer',
  405. suffix: 'Seconds',
  406. defaultValue: '60',
  407. required: true,
  408. min: 1,
  409. max: 600
  410. },
  411. 'bt-tracker-interval': {
  412. type: 'integer',
  413. suffix: 'Seconds',
  414. defaultValue: '0',
  415. required: true,
  416. min: 0
  417. },
  418. 'bt-tracker-timeout': {
  419. type: 'integer',
  420. suffix: 'Seconds',
  421. defaultValue: '60',
  422. required: true,
  423. min: 1,
  424. max: 600
  425. },
  426. 'dht-file-path': {
  427. type: 'string',
  428. readonly: true,
  429. defaultValue: '$HOME/.aria2/dht.dat'
  430. },
  431. 'dht-file-path6': {
  432. type: 'string',
  433. readonly: true,
  434. defaultValue: '$HOME/.aria2/dht6.dat'
  435. },
  436. 'dht-listen-port': {
  437. type: 'string',
  438. readonly: true,
  439. defaultValue: '6881-6999'
  440. },
  441. 'dht-message-timeout': {
  442. type: 'integer',
  443. suffix: 'Seconds',
  444. readonly: true,
  445. defaultValue: '10'
  446. },
  447. 'enable-dht': {
  448. type: 'boolean',
  449. readonly: true,
  450. defaultValue: 'true'
  451. },
  452. 'enable-dht6': {
  453. type: 'boolean',
  454. readonly: true
  455. },
  456. 'enable-peer-exchange': {
  457. type: 'boolean',
  458. defaultValue: 'true',
  459. required: true
  460. },
  461. 'follow-torrent': {
  462. type: 'option',
  463. options: ['true', 'false', 'mem'],
  464. defaultValue: 'true',
  465. required: true
  466. },
  467. 'listen-port': {
  468. type: 'integer',
  469. readonly: true,
  470. defaultValue: '6881-6999'
  471. },
  472. 'max-overall-upload-limit': {
  473. type: 'string',
  474. suffix: 'Bytes',
  475. defaultValue: '0',
  476. required: true,
  477. pattern: '^(0|[1-9]\\d*(K|k|M|m)?)$'
  478. },
  479. 'max-upload-limit': {
  480. type: 'string',
  481. suffix: 'Bytes',
  482. defaultValue: '0',
  483. required: true,
  484. pattern: '^(0|[1-9]\\d*(K|k|M|m)?)$'
  485. },
  486. 'peer-id-prefix': {
  487. type: 'string',
  488. readonly: true,
  489. defaultValue: 'A2-$MAJOR-$MINOR-$PATCH-'
  490. },
  491. 'peer-agent': {
  492. since: '1.33.0',
  493. type: 'string',
  494. defaultValue: 'aria2/$MAJOR.$MINOR.$PATCH',
  495. readonly: true
  496. },
  497. 'seed-ratio': {
  498. type: 'float',
  499. defaultValue: '1.0',
  500. required: true,
  501. min: 0
  502. },
  503. 'seed-time': {
  504. type: 'float',
  505. suffix: 'Minutes',
  506. required: true,
  507. min: 0
  508. },
  509. 'follow-metalink': {
  510. type: 'option',
  511. options: ['true', 'false', 'mem'],
  512. defaultValue: 'true',
  513. required: true
  514. },
  515. 'metalink-base-uri': {
  516. type: 'string'
  517. },
  518. 'metalink-language': {
  519. type: 'string'
  520. },
  521. 'metalink-location': {
  522. type: 'string'
  523. },
  524. 'metalink-os': {
  525. type: 'string'
  526. },
  527. 'metalink-version': {
  528. type: 'string'
  529. },
  530. 'metalink-preferred-protocol': {
  531. type: 'option',
  532. options: ['http', 'https', 'ftp', 'none'],
  533. defaultValue: 'none',
  534. required: true
  535. },
  536. 'metalink-enable-unique-protocol': {
  537. type: 'boolean',
  538. defaultValue: 'true',
  539. required: true
  540. },
  541. 'enable-rpc': {
  542. type: 'boolean',
  543. readonly: true,
  544. defaultValue: 'false'
  545. },
  546. 'pause-metadata': {
  547. type: 'boolean',
  548. defaultValue: 'false',
  549. required: true
  550. },
  551. 'rpc-allow-origin-all': {
  552. type: 'boolean',
  553. readonly: true,
  554. defaultValue: 'false'
  555. },
  556. 'rpc-listen-all': {
  557. type: 'boolean',
  558. readonly: true,
  559. defaultValue: 'false'
  560. },
  561. 'rpc-listen-port': {
  562. type: 'integer',
  563. readonly: true,
  564. defaultValue: '6800'
  565. },
  566. 'rpc-max-request-size': {
  567. type: 'string',
  568. suffix: 'Bytes',
  569. readonly: true,
  570. defaultValue: '2M'
  571. },
  572. 'rpc-save-upload-metadata': {
  573. type: 'boolean',
  574. defaultValue: 'true',
  575. required: true
  576. },
  577. 'rpc-secure': {
  578. type: 'boolean',
  579. readonly: true
  580. },
  581. 'allow-overwrite': {
  582. type: 'boolean',
  583. defaultValue: 'false',
  584. required: true
  585. },
  586. 'allow-piece-length-change': {
  587. type: 'boolean',
  588. defaultValue: 'false',
  589. required: true
  590. },
  591. 'always-resume': {
  592. type: 'boolean',
  593. defaultValue: 'true',
  594. required: true
  595. },
  596. 'async-dns': {
  597. type: 'boolean',
  598. defaultValue: 'true',
  599. required: true
  600. },
  601. 'auto-file-renaming': {
  602. type: 'boolean',
  603. defaultValue: 'true',
  604. required: true
  605. },
  606. 'auto-save-interval': {
  607. type: 'integer',
  608. suffix: 'Seconds',
  609. readonly: true,
  610. defaultValue: '60'
  611. },
  612. 'conditional-get': {
  613. type: 'boolean',
  614. defaultValue: 'false',
  615. required: true
  616. },
  617. 'conf-path': {
  618. type: 'string',
  619. readonly: true,
  620. defaultValue: '$HOME/.aria2/aria2.conf'
  621. },
  622. 'console-log-level': {
  623. type: 'option',
  624. options: ['debug', 'info', 'notice', 'warn', 'error'],
  625. readonly: true,
  626. defaultValue: 'notice'
  627. },
  628. 'content-disposition-default-utf8': {
  629. since: '1.31.0',
  630. type: 'boolean',
  631. defaultValue: 'false'
  632. },
  633. 'daemon': {
  634. type: 'boolean',
  635. readonly: true,
  636. defaultValue: 'false'
  637. },
  638. 'deferred-input': {
  639. type: 'boolean',
  640. readonly: true,
  641. defaultValue: 'false'
  642. },
  643. 'disable-ipv6': {
  644. type: 'boolean',
  645. readonly: true,
  646. defaultValue: 'false'
  647. },
  648. 'disk-cache': {
  649. type: 'string',
  650. suffix: 'Bytes',
  651. readonly: true,
  652. defaultValue: '16M'
  653. },
  654. 'download-result': {
  655. type: 'option',
  656. options: ['default', 'full', 'hide'],
  657. defaultValue: 'default',
  658. required: true
  659. },
  660. 'dscp': {
  661. type: 'string',
  662. readonly: true
  663. },
  664. 'rlimit-nofile': {
  665. type: 'string',
  666. readonly: true
  667. },
  668. 'enable-color': {
  669. type: 'boolean',
  670. readonly: true,
  671. defaultValue: 'true'
  672. },
  673. 'enable-mmap': {
  674. type: 'boolean',
  675. defaultValue: 'false',
  676. required: true
  677. },
  678. 'event-poll': {
  679. type: 'option',
  680. options: ['epoll', 'kqueue', 'port', 'poll', 'select'],
  681. readonly: true
  682. },
  683. 'file-allocation': {
  684. type: 'option',
  685. options: ['none', 'prealloc', 'trunc', 'falloc'],
  686. defaultValue: 'prealloc',
  687. required: true
  688. },
  689. 'force-save': {
  690. type: 'boolean',
  691. defaultValue: 'false',
  692. required: true
  693. },
  694. 'save-not-found': {
  695. since: '1.27.0',
  696. type: 'boolean',
  697. defaultValue: 'true',
  698. required: true
  699. },
  700. 'hash-check-only': {
  701. type: 'boolean',
  702. defaultValue: 'false',
  703. required: true
  704. },
  705. 'human-readable': {
  706. type: 'boolean',
  707. readonly: true,
  708. defaultValue: 'true'
  709. },
  710. 'keep-unfinished-download-result': {
  711. type: 'boolean',
  712. defaultValue: 'true',
  713. required: true
  714. },
  715. 'max-download-result': {
  716. type: 'integer',
  717. defaultValue: '1000',
  718. required: true,
  719. min: 0
  720. },
  721. 'max-mmap-limit': {
  722. since: '1.20.0',
  723. type: 'string',
  724. suffix: 'Bytes',
  725. defaultValue: '9223372036854775807',
  726. required: true,
  727. pattern: '^(0|[1-9]\\d*(K|k|M|m)?)$'
  728. },
  729. 'max-resume-failure-tries': {
  730. type: 'integer',
  731. defaultValue: '0',
  732. required: true,
  733. min: 0
  734. },
  735. 'min-tls-version': {
  736. type: 'option',
  737. options: ['SSLv3', 'TLSv1', 'TLSv1.1', 'TLSv1.2'],
  738. readonly: true,
  739. defaultValue: 'TLSv1'
  740. },
  741. 'log-level': {
  742. type: 'option',
  743. options: ['debug', 'info', 'notice', 'warn', 'error'],
  744. defaultValue: 'debug',
  745. required: true
  746. },
  747. 'optimize-concurrent-downloads': {
  748. since: '1.22.0',
  749. type: 'string',
  750. defaultValue: 'false'
  751. },
  752. 'piece-length': {
  753. type: 'string',
  754. suffix: 'Bytes',
  755. defaultValue: '1M',
  756. required: true,
  757. pattern: '^(0|[1-9]\\d*(M|m)?)$'
  758. },
  759. 'show-console-readout': {
  760. type: 'boolean',
  761. readonly: true,
  762. defaultValue: 'true'
  763. },
  764. 'summary-interval': {
  765. type: 'integer',
  766. suffix: 'Seconds',
  767. readonly: true,
  768. defaultValue: '60'
  769. },
  770. 'max-overall-download-limit': {
  771. type: 'string',
  772. suffix: 'Bytes',
  773. defaultValue: '0',
  774. required: true,
  775. pattern: '^(0|[1-9]\\d*(K|k|M|m)?)$'
  776. },
  777. 'max-download-limit': {
  778. type: 'string',
  779. suffix: 'Bytes',
  780. defaultValue: '0',
  781. required: true,
  782. pattern: '^(0|[1-9]\\d*(K|k|M|m)?)$'
  783. },
  784. 'no-conf': {
  785. type: 'boolean',
  786. readonly: true
  787. },
  788. 'no-file-allocation-limit': {
  789. type: 'string',
  790. suffix: 'Bytes',
  791. defaultValue: '5M',
  792. required: true,
  793. pattern: '^(0|[1-9]\\d*(K|k|M|m)?)$'
  794. },
  795. 'parameterized-uri': {
  796. type: 'boolean',
  797. defaultValue: 'false',
  798. required: true
  799. },
  800. 'quiet': {
  801. type: 'boolean',
  802. readonly: true,
  803. defaultValue: 'false'
  804. },
  805. 'realtime-chunk-checksum': {
  806. type: 'boolean',
  807. defaultValue: 'true',
  808. required: true
  809. },
  810. 'remove-control-file': {
  811. type: 'boolean',
  812. required: true
  813. },
  814. 'save-session': {
  815. type: 'string'
  816. },
  817. 'save-session-interval': {
  818. type: 'integer',
  819. suffix: 'Seconds',
  820. readonly: true,
  821. defaultValue: '0'
  822. },
  823. 'socket-recv-buffer-size': {
  824. since: '1.19.3',
  825. type: 'string',
  826. suffix: 'Bytes',
  827. readonly: true,
  828. defaultValue: '0'
  829. },
  830. 'stop': {
  831. type: 'integer',
  832. suffix: 'Seconds',
  833. readonly: true,
  834. defaultValue: '0'
  835. },
  836. 'truncate-console-readout': {
  837. type: 'boolean',
  838. readonly: true,
  839. defaultValue: 'true'
  840. }
  841. }).constant('aria2GlobalAvailableOptions', {
  842. // Aria2 Setting Page Defination EXAMPLE:
  843. // 'category key': [
  844. // 'option key 1', 'option key 2', // more options if possible
  845. // ]
  846. basicOptions: [
  847. 'dir', 'log', 'max-concurrent-downloads', 'check-integrity', 'continue'
  848. ],
  849. httpFtpSFtpOptions: [
  850. 'all-proxy', 'all-proxy-user', 'all-proxy-passwd', 'connect-timeout', 'dry-run', 'lowest-speed-limit',
  851. 'max-connection-per-server', 'max-file-not-found', 'max-tries', 'min-split-size', 'netrc-path', 'no-netrc',
  852. 'no-proxy', 'proxy-method', 'remote-time', 'reuse-uri', 'retry-wait', 'server-stat-of',
  853. 'server-stat-timeout', 'split', 'stream-piece-selector', 'timeout', 'uri-selector'
  854. ],
  855. httpOptions: [
  856. 'check-certificate', 'http-accept-gzip', 'http-auth-challenge', 'http-no-cache', 'http-user',
  857. 'http-passwd', 'http-proxy', 'http-proxy-user', 'http-proxy-passwd', 'https-proxy', 'https-proxy-user',
  858. 'https-proxy-passwd', 'referer', 'enable-http-keep-alive', 'enable-http-pipelining', 'header',
  859. 'save-cookies', 'use-head', 'user-agent'
  860. ],
  861. ftpSFtpOptions: [
  862. 'ftp-user', 'ftp-passwd', 'ftp-pasv', 'ftp-proxy', 'ftp-proxy-user', 'ftp-proxy-passwd',
  863. 'ftp-type', 'ftp-reuse-connection', 'ssh-host-key-md'
  864. ],
  865. btOptions: [
  866. 'bt-detach-seed-only', 'bt-enable-hook-after-hash-check', 'bt-enable-lpd', 'bt-exclude-tracker',
  867. 'bt-external-ip', 'bt-force-encryption', 'bt-hash-check-seed', 'bt-load-saved-metadata', 'bt-max-open-files', 'bt-max-peers',
  868. 'bt-metadata-only', 'bt-min-crypto-level', 'bt-prioritize-piece', 'bt-remove-unselected-file',
  869. 'bt-require-crypto', 'bt-request-peer-speed-limit', 'bt-save-metadata', 'bt-seed-unverified',
  870. 'bt-stop-timeout', 'bt-tracker', 'bt-tracker-connect-timeout', 'bt-tracker-interval', 'bt-tracker-timeout',
  871. 'dht-file-path', 'dht-file-path6', 'dht-listen-port', 'dht-message-timeout', 'enable-dht', 'enable-dht6',
  872. 'enable-peer-exchange', 'follow-torrent', 'listen-port', 'max-overall-upload-limit', 'max-upload-limit',
  873. 'peer-id-prefix', 'peer-agent', 'seed-ratio', 'seed-time'
  874. ],
  875. metalinkOptions: [
  876. 'follow-metalink', 'metalink-base-uri', 'metalink-language', 'metalink-location', 'metalink-os',
  877. 'metalink-version', 'metalink-preferred-protocol', 'metalink-enable-unique-protocol'
  878. ],
  879. rpcOptions: [
  880. 'enable-rpc', 'pause-metadata', 'rpc-allow-origin-all', 'rpc-listen-all', 'rpc-listen-port',
  881. 'rpc-max-request-size', 'rpc-save-upload-metadata', 'rpc-secure'
  882. ],
  883. advancedOptions: [
  884. 'allow-overwrite', 'allow-piece-length-change', 'always-resume', 'async-dns', 'auto-file-renaming',
  885. 'auto-save-interval', 'conditional-get', 'conf-path', 'console-log-level', 'content-disposition-default-utf8', 'daemon',
  886. 'deferred-input', 'disable-ipv6', 'disk-cache', 'download-result', 'dscp', 'rlimit-nofile', 'enable-color', 'enable-mmap',
  887. 'event-poll', 'file-allocation', 'force-save', 'save-not-found', 'hash-check-only', 'human-readable',
  888. 'keep-unfinished-download-result', 'max-download-result', 'max-mmap-limit', 'max-resume-failure-tries',
  889. 'min-tls-version', 'log-level', 'optimize-concurrent-downloads', 'piece-length', 'show-console-readout',
  890. 'summary-interval', 'max-overall-download-limit', 'max-download-limit', 'no-conf',
  891. 'no-file-allocation-limit', 'parameterized-uri', 'quiet', 'realtime-chunk-checksum', 'remove-control-file',
  892. 'save-session', 'save-session-interval', 'socket-recv-buffer-size', 'stop', 'truncate-console-readout'
  893. ]
  894. }).constant('aria2QuickSettingsAvailableOptions', {
  895. globalSpeedLimitOptions: [
  896. 'max-overall-download-limit', 'max-overall-upload-limit'
  897. ]
  898. }).constant('aria2TaskAvailableOptions', {
  899. // Aria2 Task Option Defination EXAMPLE:
  900. // {
  901. // key: 'option key',
  902. // category: 'global|http|bittorrent',
  903. // [canShow: 'new|active|waiting|paused',] // possible to show in specific status, supporting multiple choice. if not set, always show
  904. // [canUpdate: 'new|active|waiting|paused',] // possible to write in specific status, supporting multiple choice. if not set, always writable
  905. // [showHistory: true|false,] // show history under the input box, only supporting "string" type. if not set, this is set to false
  906. // }
  907. taskOptions: [
  908. {
  909. key: 'dir',
  910. category: 'global',
  911. canUpdate: 'new',
  912. showHistory: true
  913. },
  914. {
  915. key: 'out',
  916. category: 'http',
  917. canUpdate: 'new'
  918. },
  919. {
  920. key: 'allow-overwrite',
  921. category: 'global',
  922. canShow: 'new'
  923. },
  924. {
  925. key: 'max-download-limit',
  926. category: 'global'
  927. },
  928. {
  929. key: 'max-upload-limit',
  930. category: 'bittorrent'
  931. },
  932. {
  933. key: 'split',
  934. category: 'http',
  935. canUpdate: 'new|waiting|paused'
  936. },
  937. {
  938. key: 'min-split-size',
  939. category: 'http',
  940. canUpdate: 'new|waiting|paused'
  941. },
  942. {
  943. key: 'max-connection-per-server',
  944. category: 'http',
  945. canUpdate: 'new|waiting|paused'
  946. },
  947. {
  948. key: 'lowest-speed-limit',
  949. category: 'http',
  950. canUpdate: 'new|waiting|paused'
  951. },
  952. {
  953. key: 'stream-piece-selector',
  954. category: 'http',
  955. canUpdate: 'new|waiting|paused'
  956. },
  957. {
  958. key: 'http-user',
  959. category: 'http',
  960. canUpdate: 'new|waiting|paused'
  961. },
  962. {
  963. key: 'http-passwd',
  964. category: 'http',
  965. canUpdate: 'new|waiting|paused'
  966. },
  967. {
  968. key: 'all-proxy',
  969. category: 'http',
  970. canUpdate: 'new|waiting|paused'
  971. },
  972. {
  973. key: 'all-proxy-user',
  974. category: 'http',
  975. canUpdate: 'new|waiting|paused'
  976. },
  977. {
  978. key: 'all-proxy-passwd',
  979. category: 'http',
  980. canUpdate: 'new|waiting|paused'
  981. },
  982. {
  983. key: 'checksum',
  984. category: 'http'
  985. },
  986. {
  987. key: 'referer',
  988. category: 'http',
  989. canUpdate: 'new'
  990. },
  991. {
  992. key: 'header',
  993. category: 'http',
  994. canUpdate: 'new'
  995. },
  996. {
  997. key: 'bt-max-peers',
  998. category: 'bittorrent'
  999. },
  1000. {
  1001. key: 'bt-request-peer-speed-limit',
  1002. category: 'bittorrent'
  1003. },
  1004. {
  1005. key: 'bt-remove-unselected-file',
  1006. category: 'bittorrent'
  1007. },
  1008. {
  1009. key: 'bt-stop-timeout',
  1010. category: 'bittorrent',
  1011. canUpdate: 'new|waiting|paused'
  1012. },
  1013. {
  1014. key: 'bt-tracker',
  1015. category: 'bittorrent',
  1016. canUpdate: 'new|waiting|paused'
  1017. },
  1018. {
  1019. key: 'seed-ratio',
  1020. category: 'bittorrent',
  1021. canUpdate: 'new|waiting|paused'
  1022. },
  1023. {
  1024. key: 'seed-time',
  1025. category: 'bittorrent',
  1026. canUpdate: 'new|waiting|paused'
  1027. },
  1028. {
  1029. key: 'conditional-get',
  1030. category: 'global',
  1031. canShow: 'new'
  1032. },
  1033. {
  1034. key: 'file-allocation',
  1035. category: 'global',
  1036. canShow: 'new'
  1037. },
  1038. {
  1039. key: 'parameterized-uri',
  1040. category: 'global',
  1041. canShow: 'new'
  1042. },
  1043. {
  1044. key: 'force-save',
  1045. category: 'global'
  1046. }
  1047. ]
  1048. });
  1049. }());