- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 838
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an HttpProxyClient for use with the various protocol clients #847
Comments
Is SslOnConnect is for port 993 (assuming the server uses standard ports). Try specifying StartTlsWhenAvailable instead. |
The port is 993. Without the proxy configuration it works fine |
After connecting your socket, try just creating and using an SslStream on top of it like this: var network = new NetworkStream (mySocket, false);
var ssl = new SslStream (network, true);
ssl.AuthenticateAsClient (_appModel.Server); Does that throw any exceptions? |
I'm not sure how HTTP proxies work, but are you sure you're supposed to use HTTP/1.0 instead of HTTP/1.1? |
Unexpected packet format suggests to me that the port you are actually connecting to doesn't actually support SSL. |
I have the same problem. Is there a simple option to just use a WebProxy with MailKit ? |
@Safirion I would recommend starting with what @biasc has and trying to figure out why SslStream.AUthenticateAsClient() is failing because once you figure that out, then using an HTTP proxy is solved. The WebProxy API doesn't actually implement a way of connecting through a proxy, it only holds information about a proxy URI and the credentials it would need. In other words, it looks useless for solving your problem. |
@jstedfast Yes of course, but when a solution will be find for this problem, then it would be possible to implement a support of WebProxy directly in the library, no ? |
@Safirion I have used this code |
Try the MyGet package once it's published by the build bots (next 30 minutes or so?) and use (Note: the main MailKit github page provides download links to official NuGet release packages as well as MyGet CI builds) |
@jstedfast I have already tested the |
yes |
Fantastic, thanks! |
@jstedfast When is the 2.1.5 release scheduled? |
Hoping to fix a few more issues first. Making releases chews up a lot of my free time, so I like to spread them out and collect as many fixes as possible before rolling the next release. |
Describe the bug
I have successfully tested the mailkit imap class with 2 differents imap account (outlook and gmail) without using proxy
I am not able to connect to our http proxy in any mode, i don't have a socks proxy.
The connection to the proxy is Ok but when i call the connect method i have the error posted below.
This is the code i have used.
What i am doing wrong?
To Reproduce
Screenshots

Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: