Skip to content

Commit

Permalink
Aria下载器添加header
Browse files Browse the repository at this point in the history
  • Loading branch information
leiurayer committed May 9, 2022
1 parent 47ac54f commit aaf9775
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/DownKyi.Core/Aria2cNet/Client/Entity/AriaSendData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ public class AriaSendOption
[JsonProperty("dir")]
public string Dir { get; set; }

//[JsonProperty("header")]
//public string Header { get; set; }
[JsonProperty("header")]
public string Header { get; set; }

//[JsonProperty("use-head")]
//public string UseHead { get; set; }
[JsonProperty("use-head")]
public string UseHead { get; set; }

[JsonProperty("user-agent")]
public string UserAgent { get; set; }
Expand Down
6 changes: 3 additions & 3 deletions src/DownKyi/Services/Download/AriaDownloadService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1025,9 +1025,9 @@ private DownloadResult DownloadByAria(DownloadingItem downloading, List<string>
//HttpProxy = $"http://{Settings.GetAriaHttpProxy()}:{Settings.GetAriaHttpProxyListenPort()}",
Dir = path,
Out = localFileName,
//Header = $"cookie: {LoginHelper.GetLoginInfoCookiesString()}\nreferer: https://www.bilibili.com",
//UseHead = "true",
UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36",
Header = $"cookie: {LoginHelper.GetLoginInfoCookiesString()}\nreferer: https://www.bilibili.com",
UseHead = "true",
UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36",
};

// 如果设置了代理,则增加HttpProxy
Expand Down

0 comments on commit aaf9775

Please sign in to comment.