Comments (4)
Please try the below way in a new console application and see you can do it or not?
HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(Url);
request.AllowAutoRedirect = true;
WebProxy myProxy = new WebProxy("www.myserver.com/proxy/can.pac", true);
myProxy.Credentials = new NetworkCredential("user", "password");
request.Proxy = myProxy;
HttpWebResponse response = (HttpWebResponse)Request.GetResponse();
Thanks.
from downloader.
now i get this error
System.Net.WebException: 'The remote server returned an error: (421) Misdirected Request.'
this is my pac url
http://raw.githubusercontent.com/ghost1372/HandySub/master/Proxy/can.pac
if you set in internet options you can access youtube and other websites
but I found that any program created with .NET Core suffers from these problems and errors. There are no problems with the .NET Framework
from downloader.
This is a .NET issue and no related to the Downloader
library. Because I try to use this proxy with HttpClient or HttpWebRequest in .Net Core and get some errors.
I tried the below options in Downloader or HttpClient or pure HttpWebRequest:
Proxy = new WebProxy() {
Address = new Uri("https://raw.githubusercontent.com/ghost1372/HandySub/master/Proxy/can.pac"),
UseDefaultCredentials = false,
Credentials = System.Net.CredentialCache.DefaultNetworkCredentials,
BypassProxyOnLocal = true
}
So the httpClient get an error: System.NotSupportedException: Only the 'http' scheme is allowed for proxies.
I search this error and seem this issue is from .NET Core
and many browsers only support http
proxies, https
proxies are not yet widely supported.
Please see Unable to connect to HTTPS endpoint through WebProxy issue of .NET Core
.
Note: your proxy address is not real http
and redirected on https
and if you set the http
on the proxy address you get an error:
The remote server returned an error: (404) Not Found.
Please test your proxy address on HttpClient
or HttpWebRequest
and if that has no issue so the downloader must be working correctly.
from downloader.
This is a .NET issue and no related to the
Downloader
library. Because I try to use this proxy with HttpClient or HttpWebRequest in .Net Core and get some errors.
I tried the below options in Downloader or HttpClient or pure HttpWebRequest:Proxy = new WebProxy() { Address = new Uri("https://raw.githubusercontent.com/ghost1372/HandySub/master/Proxy/can.pac"), UseDefaultCredentials = false, Credentials = System.Net.CredentialCache.DefaultNetworkCredentials, BypassProxyOnLocal = true }So the httpClient get an error:
System.NotSupportedException: Only the 'http' scheme is allowed for proxies.
I search this error and seem this issue is from.NET Core
and many browsers only supporthttp
proxies,https
proxies are not yet widely supported.
Please see Unable to connect to HTTPS endpoint through WebProxy issue of.NET Core
.Note: your proxy address is not real
http
and redirected onhttps
and if you set thehttp
on the proxy address you get an error:
The remote server returned an error: (404) Not Found.
Please test your proxy address onHttpClient
orHttpWebRequest
and if that has no issue so the downloader must be working correctly.
Yes, unfortunately, the problem is with .NET Core, anyway, thank you.
from downloader.
Related Issues (20)
- The calling thread cannot access this object because another thread owns it HOT 1
- ExceptionHelper.CertificateValidationCallBack() is never called when compiling for android HOT 3
- Chunk displaying no progress yet still downloads. HOT 1
- No error when server responds with 404 HOT 1
- Occasional resume error and inaccurate download progress HOT 2
- Whether the download can be resumed from where the last download was not completed HOT 3
- ipv6 Download error the ssl connection could not be established, see inner exception HOT 2
- RobiniaDocs API Explorer
- how to download stream or api link?
- Large file download blocks other download tasks. HOT 3
- Attempting to download the same file to the local directory with same name doesnt overwrite/replace HOT 2
- Downloader support socks5 proxy HOT 3
- getting error when download completed! HOT 11
- The 67th Line in this file“Downloader/src/Downloader /ChunkDownloader.cs ” is not need HOT 1
- The CancelTaskAsync interface of IDownloadService causes the program to freeze. HOT 1
- Inquiry Regarding Repository Usage for Efficient Download of Small Files in .NET HOT 1
- I need to implement happy eyeballs for IPV4 IPV6 dual stack protocol HOT 2
- Resume download after restart program
- DownloadStatus is Failed but no exception is thrown HOT 2
- README is a bit misleading about Content-Length for getting file length
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from downloader.