wget2 icon indicating copy to clipboard operation
wget2 copied to clipboard

Can it be compiled with wintls?

Open rzhy1 opened this issue 1 year ago • 7 comments

Can it be compiled with wintls? When wget.exe and aria2c.exe adopt wintls, the download speed is significantly faster in Windows, I wonder if this is possible for wget2.exe? Related link for wget: https://github.com/lifenjoiner/wget-for-windows

rzhy1 avatar Jul 20 '24 06:07 rzhy1

Can it be compiled with wintls?

I assume you mean to interface with schannel.h? libcurl can use SChannel, so it would be possible in Wget/Wget2 too. Ref. the Virtual TLS layer in libcurl.

When wget.exe and aria2c.exe adopt wintls, the download speed is significantly faster in Windows,

How have you proven this? Using curl.exe with a set CURL_SSL_BACKEND=schannel, is IMO no faster than e.g. openssl, mbedtls etc.

gvanem avatar Jul 20 '24 08:07 gvanem

You can download wget(openssl) here : https://eternallybored.org/misc/wget/1.21.4/64/wget.exe

You can download wget(wintls) here: https://github.com/lifenjoiner/wget-for-windows/actions/runs/10006982087/artifacts/1718800350

Now you can download the same link and compare their download speeds, provided they are both on Windows.

rzhy1 avatar Jul 20 '24 09:07 rzhy1

Windows Defender blocks the latter .zip-file!

gvanem avatar Jul 20 '24 10:07 gvanem

The wget (wintls) compiled by someone else that doesn't have a virus, you can temporarily disable Windows Defender and try again.

rzhy1 avatar Jul 20 '24 10:07 rzhy1

wget2 naively supports wolfssl as an alternative ssl engine you might want to try compiling with that to see how it compares.

mitchcapper avatar Aug 11 '24 06:08 mitchcapper

There are some other benefits with SChannel like that Windows automatically chases TLS certificates from Windows Updates.

nanonyme avatar Sep 24 '24 10:09 nanonyme

Well wget2 has something of a pluggable SSL engine and has 3 full implementations. It is near complete rewrite of wget though. Your best bet to adding a 4th (and one that is single platform where others already work) would be to write the ssl module for it and see if wget2 will accept it (as they then also take on having to maintain it).

See the files image in the libwget folder for the existing implementations for reference.

mitchcapper avatar Sep 24 '24 19:09 mitchcapper