aria2Options.js 31 KB

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