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
09e8a332
Commit
09e8a332
authored
May 21, 2008
by
Lei Zhang
Committed by
Alexandre Julliard
May 22, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added ProxyEnable / ProxyServer handling.
parent
089221fc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
0 deletions
+60
-0
nsembed.c
dlls/mshtml/nsembed.c
+60
-0
No files found.
dlls/mshtml/nsembed.c
View file @
09e8a332
...
...
@@ -301,6 +301,65 @@ static void set_lang(nsIPrefBranch *pref)
ERR
(
"SetCharPref failed: %08x
\n
"
,
nsres
);
}
static
void
set_proxy
(
nsIPrefBranch
*
pref
)
{
char
proxy
[
512
];
char
*
proxy_port
;
int
proxy_port_num
;
DWORD
enabled
=
0
,
res
,
size
,
type
;
HKEY
hkey
;
nsresult
nsres
;
static
const
WCHAR
proxy_keyW
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
'\\'
,
'I'
,
'n'
,
't'
,
'e'
,
'r'
,
'n'
,
'e'
,
't'
,
' '
,
'S'
,
'e'
,
't'
,
't'
,
'i'
,
'n'
,
'g'
,
's'
,
0
};
res
=
RegOpenKeyW
(
HKEY_CURRENT_USER
,
proxy_keyW
,
&
hkey
);
if
(
res
!=
ERROR_SUCCESS
)
return
;
size
=
sizeof
(
enabled
);
res
=
RegQueryValueExA
(
hkey
,
"ProxyEnable"
,
0
,
&
type
,
(
LPBYTE
)
&
enabled
,
&
size
);
if
(
res
!=
ERROR_SUCCESS
||
type
!=
REG_DWORD
||
enabled
==
0
)
{
RegCloseKey
(
hkey
);
return
;
}
size
=
sizeof
(
proxy
);
res
=
RegQueryValueExA
(
hkey
,
"ProxyServer"
,
0
,
&
type
,
(
LPBYTE
)
proxy
,
&
size
);
RegCloseKey
(
hkey
);
if
(
res
!=
ERROR_SUCCESS
||
type
!=
REG_SZ
)
return
;
proxy_port
=
strchr
(
proxy
,
':'
);
if
(
!
proxy_port
)
return
;
*
proxy_port
=
0
;
proxy_port_num
=
atoi
(
proxy_port
+
1
);
TRACE
(
"Setting proxy to %s, port %d
\n
"
,
debugstr_a
(
proxy
),
proxy_port_num
);
nsres
=
nsIPrefBranch_SetIntPref
(
pref
,
"network.proxy.type"
,
1
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"SetIntPref network.proxy.type failed: %08x
\n
"
,
nsres
);
nsres
=
nsIPrefBranch_SetCharPref
(
pref
,
"network.proxy.http"
,
proxy
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"SetCharPref network.proxy.http failed: %08x
\n
"
,
nsres
);
nsres
=
nsIPrefBranch_SetIntPref
(
pref
,
"network.proxy.http_port"
,
proxy_port_num
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"SetIntPref network.proxy.http_port failed: %08x
\n
"
,
nsres
);
nsres
=
nsIPrefBranch_SetCharPref
(
pref
,
"network.proxy.ssl"
,
proxy
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"SetCharPref network.proxy.ssl failed: %08x
\n
"
,
nsres
);
nsres
=
nsIPrefBranch_SetIntPref
(
pref
,
"network.proxy.ssl_port"
,
proxy_port_num
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"SetIntPref network.proxy.ssl_port failed: %08x
\n
"
,
nsres
);
}
static
void
set_bool_pref
(
nsIPrefBranch
*
pref
,
const
char
*
pref_name
,
BOOL
val
)
{
nsresult
nsres
;
...
...
@@ -347,6 +406,7 @@ static void set_profile(void)
}
set_lang
(
pref
);
set_proxy
(
pref
);
set_bool_pref
(
pref
,
"security.warn_entering_secure"
,
FALSE
);
set_bool_pref
(
pref
,
"security.warn_submit_insecure"
,
FALSE
);
...
...
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