diff --git a/DepotDownloader/CDNClientPool.cs b/DepotDownloader/CDNClientPool.cs index 2b4336c..7c065fb 100644 --- a/DepotDownloader/CDNClientPool.cs +++ b/DepotDownloader/CDNClientPool.cs @@ -129,7 +129,7 @@ namespace DepotDownloader { steamSession.RequestCDNAuthToken(appId, depotId, server.Host); - var cdnKey = string.Format("{0:D}:{1}", depotId, server.Host); + var cdnKey = string.Format("{0:D}:{1}", depotId, steamSession.ResolveCDNTopLevelHost(server.Host)); SteamApps.CDNAuthTokenCallback authTokenCallback; if (steamSession.CDNAuthTokens.TryGetValue(cdnKey, out authTokenCallback)) @@ -175,7 +175,7 @@ namespace DepotDownloader { steamSession.RequestCDNAuthToken(appId, depotId, server.Host); - var cdnKey = string.Format("{0:D}:{1}", depotId, server.Host); + var cdnKey = string.Format("{0:D}:{1}", depotId, steamSession.ResolveCDNTopLevelHost(server.Host)); SteamApps.CDNAuthTokenCallback authTokenCallback; if (steamSession.CDNAuthTokens.TryGetValue(cdnKey, out authTokenCallback)) diff --git a/DepotDownloader/ContentDownloader.cs b/DepotDownloader/ContentDownloader.cs index 978ce19..e685ec3 100644 --- a/DepotDownloader/ContentDownloader.cs +++ b/DepotDownloader/ContentDownloader.cs @@ -481,8 +481,8 @@ namespace DepotDownloader return null; } - if ( steam3 != null ) - steam3.RequestAppTicket( ( uint )depotId ); + // Skip requesting an app ticket + steam3.AppTickets[ depotId ] = null; ulong manifestID = GetSteam3DepotManifest( depotId, appId, branch ); if ( manifestID == INVALID_MANIFEST_ID && branch != "public" ) diff --git a/DepotDownloader/Steam3Session.cs b/DepotDownloader/Steam3Session.cs index 7ed4322..9c1cca1 100644 --- a/DepotDownloader/Steam3Session.cs +++ b/DepotDownloader/Steam3Session.cs @@ -313,8 +313,20 @@ namespace DepotDownloader }, () => { return completed; } ); } + public string ResolveCDNTopLevelHost(string host) + { + // SteamPipe CDN shares tokens with all hosts + if (host.EndsWith( ".steampipe.steamcontent.com" ) ) + { + return "steampipe.steamcontent.com"; + } + + return host; + } + public void RequestCDNAuthToken( uint appid, uint depotid, string host ) { + host = ResolveCDNTopLevelHost( host ); var cdnKey = string.Format( "{0:D}:{1}", depotid, host ); if ( CDNAuthTokens.ContainsKey( cdnKey ) || bAborted )