Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
89d40b3d
Commit
89d40b3d
authored
May 06, 2014
by
Hans Leidekker
Committed by
Alexandre Julliard
May 06, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Add support for retrieving the proxy automatic configuration URL on Mac OS X.
parent
5b56624a
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
1 deletion
+55
-1
Makefile.in
dlls/wininet/Makefile.in
+1
-1
internet.c
dlls/wininet/internet.c
+54
-0
No files found.
dlls/wininet/Makefile.in
View file @
89d40b3d
...
...
@@ -3,7 +3,7 @@ MODULE = wininet.dll
IMPORTLIB
=
wininet
IMPORTS
=
mpr shlwapi shell32 user32 advapi32
DELAYIMPORTS
=
secur32 crypt32 cryptui
EXTRALIBS
=
$(SOCKET_LIBS)
$(Z_LIBS)
EXTRALIBS
=
$(
CORESERVICES_LIBS)
$(
SOCKET_LIBS)
$(Z_LIBS)
C_SRCS
=
\
cookie.c
\
...
...
dlls/wininet/internet.c
View file @
89d40b3d
...
...
@@ -56,6 +56,15 @@
#endif
#include <assert.h>
#ifdef HAVE_CORESERVICES_CORESERVICES_H
#define GetCurrentThread MacGetCurrentThread
#define LoadResource MacLoadResource
#include <CoreServices/CoreServices.h>
#undef GetCurrentThread
#undef LoadResource
#undef DPRINTF
#endif
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
...
...
@@ -2389,6 +2398,33 @@ BOOL WINAPI InternetReadFileExW(HINTERNET hFile, LPINTERNET_BUFFERSW lpBuffer,
return
res
==
ERROR_SUCCESS
;
}
static
BOOL
get_proxy_autoconfig_url
(
char
*
buf
,
DWORD
buflen
)
{
#ifdef HAVE_CORESERVICES_CORESERVICES_H
CFDictionaryRef
settings
=
CFNetworkCopySystemProxySettings
();
const
void
*
ref
;
BOOL
ret
=
FALSE
;
if
(
!
settings
)
return
FALSE
;
if
(
!
(
ref
=
CFDictionaryGetValue
(
settings
,
kCFNetworkProxiesProxyAutoConfigURLString
)))
{
CFRelease
(
settings
);
return
FALSE
;
}
if
(
CFStringGetCString
(
ref
,
buf
,
buflen
,
kCFStringEncodingASCII
))
{
TRACE
(
"returning %s
\n
"
,
debugstr_a
(
buf
)
);
ret
=
TRUE
;
}
CFRelease
(
settings
);
return
ret
;
#else
FIXME
(
"no support on this platform
\n
"
);
return
FALSE
;
#endif
}
static
DWORD
query_global_option
(
DWORD
option
,
void
*
buffer
,
DWORD
*
size
,
BOOL
unicode
)
{
/* FIXME: This function currently handles more options than it should. Options requiring
...
...
@@ -2472,16 +2508,20 @@ static DWORD query_global_option(DWORD option, void *buffer, DWORD *size, BOOL u
}
case
INTERNET_OPTION_PER_CONNECTION_OPTION
:
{
char
url
[
INTERNET_MAX_URL_LENGTH
+
1
];
INTERNET_PER_CONN_OPTION_LISTW
*
con
=
buffer
;
INTERNET_PER_CONN_OPTION_LISTA
*
conA
=
buffer
;
DWORD
res
=
ERROR_SUCCESS
,
i
;
proxyinfo_t
pi
;
BOOL
have_url
;
LONG
ret
;
TRACE
(
"Getting global proxy info
\n
"
);
if
((
ret
=
INTERNET_LoadProxySettings
(
&
pi
)))
return
ret
;
have_url
=
get_proxy_autoconfig_url
(
url
,
sizeof
(
url
));
FIXME
(
"INTERNET_OPTION_PER_CONNECTION_OPTION stub
\n
"
);
if
(
*
size
<
sizeof
(
INTERNET_PER_CONN_OPTION_LISTW
))
{
...
...
@@ -2499,6 +2539,9 @@ static DWORD query_global_option(DWORD option, void *buffer, DWORD *size, BOOL u
optionW
->
Value
.
dwValue
=
PROXY_TYPE_PROXY
;
else
optionW
->
Value
.
dwValue
=
PROXY_TYPE_DIRECT
;
if
(
have_url
)
/* native includes PROXY_TYPE_DIRECT even if PROXY_TYPE_PROXY is set */
optionW
->
Value
.
dwValue
|=
PROXY_TYPE_DIRECT
|
PROXY_TYPE_AUTO_PROXY_URL
;
break
;
case
INTERNET_PER_CONN_PROXY_SERVER
:
...
...
@@ -2516,7 +2559,18 @@ static DWORD query_global_option(DWORD option, void *buffer, DWORD *size, BOOL u
break
;
case
INTERNET_PER_CONN_AUTOCONFIG_URL
:
if
(
!
have_url
)
optionW
->
Value
.
pszValue
=
NULL
;
else
if
(
unicode
)
optionW
->
Value
.
pszValue
=
heap_strdupAtoW
(
url
);
else
optionA
->
Value
.
pszValue
=
heap_strdupA
(
url
);
break
;
case
INTERNET_PER_CONN_AUTODISCOVERY_FLAGS
:
optionW
->
Value
.
dwValue
=
AUTO_PROXY_FLAG_ALWAYS_DETECT
;
break
;
case
INTERNET_PER_CONN_AUTOCONFIG_SECONDARY_URL
:
case
INTERNET_PER_CONN_AUTOCONFIG_RELOAD_DELAY_MINS
:
case
INTERNET_PER_CONN_AUTOCONFIG_LAST_DETECT_TIME
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment