Crates.io | tact-client |
lib.rs | tact-client |
version | 0.4.3 |
created_at | 2025-06-29 07:04:58.563724+00 |
updated_at | 2025-08-11 12:07:47.434753+00 |
description | TACT (Trusted Application Content Transfer) HTTP client for Blizzard's NGDP |
homepage | https://github.com/wowemulation-dev/cascette-rs |
repository | https://github.com/wowemulation-dev/cascette-rs |
max_upload_size | |
id | 1730471 |
size | 203,796 |
HTTP client for Blizzard's TACT (Trusted Application Content Transfer) protocol.
Add this to your Cargo.toml
:
[dependencies]
tact-client = "0.3"
tokio = { version = "1", features = ["full"] }
http://{region}.patch.battle.net:1119
us
, eu
, kr
, cn
, tw
https://{region}.version.battle.net/v2/products
Endpoint | Description | Response Format |
---|---|---|
/{product}/versions |
Version manifest with build configs | Pipe-delimited table with headers |
/{product}/cdns |
CDN configuration and hosts | Pipe-delimited table with CDN URLs |
/{product}/bgdl |
Background downloader manifest | Pipe-delimited table (often empty) |
The v2 protocol provides the same endpoints as v1:
/{product}/versions
- Same format as v1/{product}/cdns
- Same format as v1/{product}/bgdl
- Same format as v1Note: TACT v2 appears to be a proxy to v1 endpoints, returning identical data formats.
Region!STRING:0|BuildConfig!HEX:16|CDNConfig!HEX:16|KeyRing!HEX:16|BuildId!DEC:4|VersionsName!String:0|ProductConfig!HEX:16
## seqn = 3020098
us|e359107662e72559b4e1ab721b157cb0|48c7c7dfe4ea7df9dac22f6937ecbf47|3ca57fe7319a297346440e4d2a03a0cd|61559|11.1.7.61559|53020d32e1a25648c8e1eafd5771935f
Name!STRING:0|Path!STRING:0|Hosts!STRING:0|Servers!STRING:0|ConfigPath!STRING:0
## seqn = 2241282
us|tpr/wow|blzddist1-a.akamaihd.net level3.blizzard.com us.cdn.blizzard.com|http://blzddist1-a.akamaihd.net/?maxhosts=4...|tpr/configs/data
use tact_client::{HttpClient, ProtocolVersion, Region};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Create client (V2 is the default)
let client = HttpClient::new(Region::US, ProtocolVersion::V2)?;
// Or use the Default implementation
let client = HttpClient::default();
// Fetch versions
let response = client.get_versions("wow").await?;
let versions_data = response.text().await?;
// Fetch CDN configuration
let response = client.get_cdns("wow").await?;
let cdn_data = response.text().await?;
Ok(())
}
The client provides typed parsing functions for structured data access:
use tact_client::{HttpClient, parse_versions, parse_cdns, Region};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = HttpClient::default();
// Fetch and parse versions
let response = client.get_versions("wow").await?;
let versions_data = response.text().await?;
let versions = parse_versions(&versions_data)?;
// Access typed fields
for version in &versions {
println!("Region: {}", version.region);
println!("Build: {} ({})", version.build_id, version.versions_name);
println!("Build Config: {}", version.build_config);
}
// Fetch and parse CDN configuration
let response = client.get_cdns("wow").await?;
let cdn_data = response.text().await?;
let cdns = parse_cdns(&cdn_data)?;
for cdn in &cdns {
println!("Region: {}", cdn.name);
println!("CDN Hosts: {:?}", cdn.hosts);
println!("CDN Servers: {:?}", cdn.servers);
}
Ok(())
}
The TACT client supports two protocol versions:
http://{region}.patch.battle.net:1119
)https://{region}.version.battle.net/v2/products
)// V2 is the default
let client = HttpClient::new(Region::US, ProtocolVersion::V2)?;
// Or explicitly use V1 if needed
let client = HttpClient::new(Region::US, ProtocolVersion::V1)?;
Tested and working products:
wow
- World of Warcraftwow_classic
- WoW Classicwowt
- WoW Testwow_beta
- WoW Betaagent
- Battle.net Agentbna
- Battle.net Apppro
- Overwatchs2
- StarCraft IId3
- Diablo 3hero
- Heroes of the Stormhsb
- Hearthstonew3
- Warcraft III/{hash[0:2]}/{hash[2:4]}/{hash}
This project is dual-licensed under either:
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
This crate is part of the cascette-rs
project, providing tools for World of Warcraft
emulation development.