Skip to content

Commit

Permalink
Merge pull request #7 from Seaoftrees08/dev
Browse files Browse the repository at this point in the history
Support TLS1.2 1.3
  • Loading branch information
Seaoftrees08 committed Jul 21, 2023
2 parents 2325669 + 02388e4 commit e8c4e7e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ You can get this software from [releases](https://github.com/Seaoftrees08/Spigot
> The download link has been changed.
# Updates
- 2023/07/21 (v1.3)
- FIX: Support TLS1.2, 1.3.
- 2023/03/31 (v1.2)
- FIX: Fixed a spelling error in "latest"
- 2023/03/31 (v1.1)
Expand Down
2 changes: 1 addition & 1 deletion src/SpigotBuilder/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/SpigotBuilder/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ private void button1_Click(object sender, EventArgs e)
dc.Headers.Add("pragma", "no-cache");
dc.Headers.Add("cache-control", "no-cache");
dc.Headers.Add("upgrade-insecure-requests", "1");
dc.Headers.Add("user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36");
dc.Headers.Add("user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36");
dc.Headers.Add("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9");
dc.Headers.Add("sec-fetch-site", "none");
dc.Headers.Add("sec-fetch-mode", "navigate");
Expand Down Expand Up @@ -210,7 +210,7 @@ private async void VersionUpdate()
try
{
//get spigot json list
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
WebClient wc = new WebClient();
wc.Headers.Add("method", "GET");
wc.Headers.Add("authority", "hub.spigotmc.org");
Expand All @@ -219,7 +219,7 @@ private async void VersionUpdate()
wc.Headers.Add("pragma", "no-cache");
wc.Headers.Add("cache-control", "no-cache");
wc.Headers.Add("upgrade-insecure-requests", "1");
wc.Headers.Add("user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36");
wc.Headers.Add("user-agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36");
wc.Headers.Add("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9");
wc.Headers.Add("sec-fetch-site", "none");
wc.Headers.Add("sec-fetch-mode", "navigate");
Expand Down

0 comments on commit e8c4e7e

Please sign in to comment.