-
Notifications
You must be signed in to change notification settings - Fork 0
Supported Formats
One entry point: typebit::links::parse_link(&str) -> Result<DownloadLink>.
Run cargo run --example parse_links to see all of them live.
magnet:?xt=urn:btih:<40-hex or 32-base32>&dn=...&tr=...&x.pe=...
Also accepts urn:btmh:1220<64-hex> (v2 multihash, BEP-53) and
urn:sha1:<32-base32> (web-seed magnet). Delegates to typebit::magnet.
ed2k://|file|<name>|<size>|<md4-hex>|/ single file
ed2k://|file|<name>|<size>|<md4-hex>|/|s=host:port|/ + servers
ed2k://|file|<name>|<size>|<md4-hex>|h=<aich-hex>|/ + AICH (SHA-1)
The file identity is MD4 (crypto::md4, RFC 1320 verified). TypeBit models
the file and can verify downloaded bytes; the eMule transport is a
roadmap item — real eD2k downloads need the eMule network.
thunder://<base64(AA <real-url> ZZ)>
crypto::base64 unwraps the AA…ZZ wrapper to the real HTTP/FTP URL.
qqdl://<base64(url)>
flashget://[FLASHGET]<base64>[/FLASHGET]
Both decode to a plain URL.
ipfs://<CIDv0|CIDv1>[/sub/path]
ipns://<name-or-CID>[/sub/path]
- CIDv0:
Qm…base58, must be0x12 0x20 + 32 bytes(SHA-256) - CIDv1: multibase
b/B(base32) orz(base58), varint version/codec/multihash - IPNS names may be CIDs or DNSLink domains (e.g.
docs.ipfs.tech)
Content is fetched via an HTTP gateway: IpfsLink::gateway_url("https://ipfs.io").
bitswap is not implemented yet.
kad://<hex-or-base32-id>[@host:port]
kad://<id>|host:port
Numeric endpoints only (the core has no DNS); host names are rejected.
Any plain URL. Optionally content-addressed: pair it with a ContentId
(SHA-1 / MD4 / SHA-256 + size) and verify after download.
https://pan.baidu.com/s/<code>?pwd=<extract>
https://pan.xunlei.com/s/<code>?pwd=<extract>
These are authenticated services. TypeBit parses and models them
(DownloadLink::BaiduPan / XunleiPan) so your UI can display and queue
them, but fetching requires a host-injected session (cookies) driving the
vendor API. There is no anonymous download path — anyone who claims
otherwise is lying.
| scheme | variant | needs credentials? |
|---|---|---|
magnet: |
BitTorrent |
no |
ed2k:// |
Ed2k |
no (needs eMule net) |
thunder:// |
Thunder |
no |
qqdl:// |
Qqdl |
no |
flashget:// |
Flashget |
no |
ipfs:// ipns://
|
Ipfs |
no (needs gateway) |
kad:// |
Kad |
no |
http(s):// ftp://
|
Url |
no |
pan.baidu.com |
BaiduPan |
yes |
pan.xunlei.com |
XunleiPan |
yes |