Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mongoose
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
esp
mongoose
Commits
0a0ea36a
Commit
0a0ea36a
authored
Nov 24, 2014
by
Sergey Lyubka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix examples/proxy_server build
parent
72ed9547
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
12 deletions
+2
-12
proxy_server.c
examples/proxy_server/proxy_server.c
+2
-12
No files found.
examples/proxy_server/proxy_server.c
View file @
0a0ea36a
...
@@ -160,20 +160,13 @@ static void setopt(struct mg_server *s, const char *opt, const char *val) {
...
@@ -160,20 +160,13 @@ static void setopt(struct mg_server *s, const char *opt, const char *val) {
}
}
int
main
(
int
argc
,
char
*
argv
[])
{
int
main
(
int
argc
,
char
*
argv
[])
{
const
char
*
cert
=
NULL
,
*
ca_cert
=
NULL
,
*
port
=
"2014"
;
const
char
*
port
=
"2014"
,
*
dump
=
NULL
,
*
root
=
"proxy_web_root"
;
const
char
*
mitm
=
NULL
,
*
dump
=
NULL
,
*
root
=
"proxy_web_root"
;
int
i
;
int
i
;
// Parse command line options
// Parse command line options
for
(
i
=
1
;
i
<
argc
;
i
++
)
{
for
(
i
=
1
;
i
<
argc
;
i
++
)
{
if
(
strcmp
(
argv
[
i
],
"-ca_cert"
)
==
0
&&
i
+
1
<
argc
)
{
if
(
strcmp
(
argv
[
i
],
"-port"
)
==
0
&&
i
+
1
<
argc
)
{
ca_cert
=
argv
[
++
i
];
}
else
if
(
strcmp
(
argv
[
i
],
"-cert"
)
==
0
&&
i
+
1
<
argc
)
{
cert
=
argv
[
++
i
];
}
else
if
(
strcmp
(
argv
[
i
],
"-port"
)
==
0
&&
i
+
1
<
argc
)
{
port
=
argv
[
++
i
];
port
=
argv
[
++
i
];
}
else
if
(
strcmp
(
argv
[
i
],
"-mitm"
)
==
0
&&
i
+
1
<
argc
)
{
mitm
=
argv
[
++
i
];
}
else
if
(
strcmp
(
argv
[
i
],
"-root"
)
==
0
&&
i
+
1
<
argc
)
{
}
else
if
(
strcmp
(
argv
[
i
],
"-root"
)
==
0
&&
i
+
1
<
argc
)
{
root
=
argv
[
++
i
];
root
=
argv
[
++
i
];
}
else
if
(
strcmp
(
argv
[
i
],
"-dump"
)
==
0
&&
i
+
1
<
argc
)
{
}
else
if
(
strcmp
(
argv
[
i
],
"-dump"
)
==
0
&&
i
+
1
<
argc
)
{
...
@@ -191,10 +184,7 @@ int main(int argc, char *argv[]) {
...
@@ -191,10 +184,7 @@ int main(int argc, char *argv[]) {
setopt
(
s_server
,
"enable_proxy"
,
"yes"
);
setopt
(
s_server
,
"enable_proxy"
,
"yes"
);
setopt
(
s_server
,
"document_root"
,
root
);
setopt
(
s_server
,
"document_root"
,
root
);
setopt
(
s_server
,
"listening_port"
,
port
);
setopt
(
s_server
,
"listening_port"
,
port
);
setopt
(
s_server
,
"ssl_certificate"
,
cert
);
setopt
(
s_server
,
"ssl_ca_certificate"
,
ca_cert
);
setopt
(
s_server
,
"hexdump_file"
,
dump
);
setopt
(
s_server
,
"hexdump_file"
,
dump
);
setopt
(
s_server
,
"ssl_mitm_certs"
,
mitm
);
// Start two SSE pushing threads
// Start two SSE pushing threads
mg_start_thread
(
sse_pusher_thread_func
,
(
void
*
)
"sse_pusher_thread_1"
);
mg_start_thread
(
sse_pusher_thread_func
,
(
void
*
)
"sse_pusher_thread_1"
);
...
...
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