ROUTE MAP

Navigate

LANGUAGE
English中文
github.com/jiayuxuan123/TurboDL

Engineering manual

One repository file per page, rendered from the same source as GitHub. Use the directory on the left for structure; each page keeps its source and raw-file exits.

Every page here is a file

This table is the whole of the documentation set: the repository path on the left, the page it becomes on the right. Build the site and the two are rendered from the same source, so a change to either side shows up on the other.

docs/ → site

README.mdProject README
docs/plugins/README.mdPlugin authoring guide
docs/plugins/CONVENTION.mdDevelopment convention
docs/plugins/MARKET.mdPublishing & discovery
turbo-plugin-js/README.mdWriting a JavaScript plugin
turbo-plugin-js/ARCHITECTURE.mdJS loader architecture
—Manifest reference
LICENSELicense (MIT)
docs/legal/THIRD-PARTY.mdThird-party components
docs/legal/PRIVACY.mdPrivacy
docs/legal/TERMS.mdTerms of use

Pages without a translation fall back to the other language and say so at the top.

Start here

The whole thing is one dependency, one config object, one submit call. Pause, resume, cancel, batch and diagnostics are on the same client.

Kotlin
// build.gradle.kts
dependencies {
    implementation("dev.turbodl:turbodl-core:0.4.1.0")
}

// Kotlin
val client = TurboClient(TurboConfig(maxConnectionsPerTask = 16))
val id = client.submit(DownloadRequest(url, File("out.bin")))
val result = client.await(id)
shell
java -jar turbodl-cli-all.jar <url> -o out.bin -c 64
java -jar turbodl-cli-all.jar <url> --json       # NDJSON
java -jar turbodl-cli-all.jar --batch tasks.txt  # one URL per line
turbodl --json · stdout
{"type":"start","url":"<url>","output":"out.bin"}
{"type":"timing","stage":"metadata","t_ms":184,"probe_ms":96,"resume":""}
{"type":"progress","state":"downloading","downloaded":222732288,"total":358411469,"percent":62,"speed":19503514,"connections":16,"eta_ms":7020}
{"type":"completed","url":"<url>","file":"out.bin","bytes":358411469,"sha256":"0f3a…"}
{"type":"summary","total":1,"failed":0}

The whole config surface

42 active public fields, plus 2 deprecated compatibility field. This table is generated from TurboConfig.kt at build time; deprecated entries are labelled and are not runtime controls.

Show all 44 public fields

TurboConfig.kt · public fields

maxConnectionsPerTaskInt · 16
maxConcurrentTasksInt · 3
maxTotalConnectionsInt · 0
globalSpeedLimitBytesPerSecLong · 0
maxRetriesInt · 5
dynamicSegmentationBoolean · true
tailAssistBoolean · true
tailAssistMinBytesLong · 256L * 1024
maxSplitsPerSegmentInt · 2
overlapMergeBoolean · deprecated, ignored by the current engine
bufferedSegmentWriteBoolean · false
minSegmentSizeLong · 64L * 1024
blockSizeLong · 16L * 1024 * 1024
segmentsPerConnectionInt · 4
maxSegmentsPerTaskInt · 0
backpressureConsecutiveFailuresInt · 4
proxyProxyMode · ProxyMode.Direct
dnsDnsMode · DnsMode.System
trustAllCertsBoolean · false
connectTimeoutMsLong · 15_000
readTimeoutMsLong · 30_000
maxIdleConnectionsInt · 256
forceHttp1Boolean · true
httpVersionPolicyHttpVersionPolicy · HttpVersionPolicy.UNSET
maxConnectionsPerHostInt · 0
keepAliveSecondsLong · 300
workDirjava.io.File? · null
warmUpConnectionsBoolean · true
warmUpConnectionCountInt · 0
slowStartBoolean · true
slowStartInitialInt · 0
adaptiveConcurrencyBoolean · true
warmUpMaxParallelInt · 4
skipProbeWhenSizeKnownBoolean · true
trustWeakValidatorBoolean · false
ioBufferSizeInt · 1024 * 1024
ioBufferTotalBudgetBytesInt · 32 * 1024 * 1024
useDirectIoBuffersBoolean · defaultUseDirectIoBuffers()
progressIntervalMsLong · 200
probeTimeoutMsLong · 6_000
probeRetriesInt · 1
stallTimeoutMsLong · 45_000
maxStallRecoveriesInt · deprecated, ignored by the current engine
warmUpTimeoutMsLong · 8_000

Defaults are read from source. The deprecated overlapMerge field remains only for source compatibility.

What a plugin manifest looks like

A plugin is a JAR plus this file. The reference page lists every field, its type, whether it is required, and the allowed values.

turbodl-plugin.json

{
  "manifestVersion": "1.0",
  "id": "parser.example",
  "name": "Example parser",
  "description": "Turns example:// links into download requests.",
  "version": "0.1.0",
  "author": "you",
  "homepage": "https://github.com/you/turbodl-plugin-example",
  "license": "MIT",
  "category": "turbodl-parser",
  "capabilities": [
    "dev.turbodl.cap.parser"
  ],
  "protocols": [
    "example"
  ],
  "turbodl": {
    "apiMajor": 1,
    "requiredApiVersion": "1.0.0"
  },
  "entry": {
    "language": "kotlin",
    "pluginClass": "com.example.ExamplePlugin"
  },
  "extensionPoints": [
    "turbo.linkParser"
  ]
}

The same file the manifest reference renders, so the two pages cannot disagree.

Documentation

Project README

What TurboDL is, what it does, how to add it to a project, and the API surface — the repository's own README.

Plugin authoring guide

How to write a plugin and get it loaded: the interfaces, the categories, and the lifecycle you must respect.

Development convention

The compatibility rulebook: what counts as a stable API, how versions are negotiated, naming, and the safety rules a plugin may not bend.

Publishing & discovery

There is no registry to sign up to. Plugins are discovered through a GitHub topic plus a manifest — this is the whole convention.

Writing a JavaScript plugin

The `host`/`plugin` ABI, the three primitives everything is built on, and what a script is deliberately not allowed to do.

JS loader architecture

Why the loader is shaped the way it is: runtime/context ownership, the unload sequence, and the host-side boundaries.

Manifest reference

Every field of turbodl-plugin.json, generated from the JSON Schema that validates it.

Terms & policies

License (MIT)

MIT, plus four supplemental clauses that keep plugins independent works. Verbatim, not summarised.

Third-party components

Which libraries ship with TurboDL, under what license, and which projects supplied ideas without supplying code.

Privacy

What leaves your machine when you use TurboDL — and the list of things that never do.

Terms of use

Responsibility, warranty, third-party plugins, and the name — the parts a license does not spell out.

Architecture

Three rules decide every design question in this project:

  1. core works alone. turbodl-core is a complete engine with zero plugin dependency; plugins are strictly additive.
  2. the kernel is only mechanism. It knows no protocol — lifecycle, cleanup, event bus, service registry, extension points, version handshake, diagnostics.
  3. dependency direction is strict. runtime → core, never the reverse.