aria2Options.js 30 KB

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