You are not logged in.
Pages: 1
Fiddler is a wonderful debug tools which could catch every winhttp/winitnet call , and when it startsup , it could set winhttp proxy automatically. so it is very convenient on momort c/s communication debugging.
but now in the SynCrtSock.pas , it will bypass the system proxy
procedure TWinHTTP.InternalConnect(ConnectionTimeOut,SendTimeout,ReceiveTimeout: DWORD);
begin
if fProxyName='' then
// add https://msdn.microsoft.com/en-us/library/windows/desktop/aa384122 ?
OpenType := WINHTTP_ACCESS_TYPE_NO_PROXY else
OpenType := WINHTTP_ACCESS_TYPE_NAMED_PROXY;
fSession := WinHttpOpen(pointer(Ansi7ToUnicode(fUserAgent)), OpenType,
pointer(Ansi7ToUnicode(fProxyName)), pointer(Ansi7ToUnicode(fProxyByPass)), 0);
and MSDN ( https://msdn.microsoft.com/en-us/librar … s.85).aspx ) told us : WINHTTP_ACCESS_TYPE_DEFAULT_PROXY -- this option is deprecated on Windows 8.1 and newer. Use WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY instead.
so I wonder if it is possible to change the implemention here to : if client >8.1 then use WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY . it could help coding&debuging a lot.
Offline
just submit a pullrequest on github
Offline
I've modified it a little (to remove SynCommons dependency), and included it.
See https://github.com/synopse/mORMot/commi … b294bf8a0e
Thanks for sharing!
Offline
Option WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY replases WINHTTP_ACCESS_TYPE_DEFAULT_PROXY, but not WINHTTP_ACCESS_TYPE_NO_PROXY!
So, if you want to change behavor when fProxyName is empty, you should use WINHTTP_ACCESS_TYPE_DEFAULT_PROXY for windows version < 8.1:
if (OSVersionInfo.dwMajorVersion>=6) and (OSVersionInfo.dwMinorVersion>=3) then
OpenType := WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY else // Windows 8.1 and newer
OpenType := WINHTTP_ACCESS_TYPE_DEFAULT_PROXY else // Windows 8 and older
OpenType := WINHTTP_ACCESS_TYPE_NAMED_PROXY;
Offline
@zed
IIRC it is not the same.
WINHTTP_ACCESS_TYPE_DEFAULT_PROXY does not inherit browser proxy settings.
We kept the previous behavior, i.e. WINHTTP_ACCESS_TYPE_NO_PROXY and an explicit proxy credential, for Windows 8 or older.
Offline
thank you ab, for so quick response and continuous passion on mormot !
Offline
Pages: 1