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
9b24fdfd
Commit
9b24fdfd
authored
Oct 18, 2017
by
Deomid Ryabkov
Committed by
Cesanta Bot
Oct 19, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reformat mongoose
PUBLISHED_FROM=5202fa46a6a834bde35168ba566d3dce7c48f453
parent
8313896a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
mongoose.c
mongoose.c
+4
-4
mongoose.h
mongoose.h
+6
-6
No files found.
mongoose.c
View file @
9b24fdfd
...
@@ -3266,9 +3266,9 @@ extern const struct mg_iface_vtable mg_socks_iface_vtable;
...
@@ -3266,9 +3266,9 @@ extern const struct mg_iface_vtable mg_socks_iface_vtable;
extern
const
struct
mg_iface_vtable
mg_default_iface_vtable
;
extern
const
struct
mg_iface_vtable
mg_default_iface_vtable
;
const
struct
mg_iface_vtable
*
mg_ifaces
[]
=
{
const
struct
mg_iface_vtable
*
mg_ifaces
[]
=
{
&
mg_default_iface_vtable
,
&
mg_default_iface_vtable
,
#if MG_ENABLE_TUN
#if MG_ENABLE_TUN
&
mg_tun_iface_vtable
,
&
mg_tun_iface_vtable
,
#endif
#endif
};
};
...
@@ -12833,7 +12833,7 @@ static void mg_socks5_handshake(struct mg_connection *c) {
...
@@ -12833,7 +12833,7 @@ static void mg_socks5_handshake(struct mg_connection *c) {
}
}
mbuf_remove
(
r
,
2
+
r
->
buf
[
1
]);
mbuf_remove
(
r
,
2
+
r
->
buf
[
1
]);
mg_send
(
c
,
reply
,
sizeof
(
reply
));
mg_send
(
c
,
reply
,
sizeof
(
reply
));
c
->
flags
|=
MG_F_USER_1
;
/* Mark handshake done */
c
->
flags
|=
MG_F_USER_1
;
/* Mark handshake done */
}
}
}
}
...
@@ -12863,7 +12863,7 @@ static void serv_ev_handler(struct mg_connection *c, int ev, void *ev_data) {
...
@@ -12863,7 +12863,7 @@ static void serv_ev_handler(struct mg_connection *c, int ev, void *ev_data) {
}
else
if
(
ev
==
MG_EV_RECV
)
{
}
else
if
(
ev
==
MG_EV_RECV
)
{
relay_data
(
c
);
relay_data
(
c
);
}
else
if
(
ev
==
MG_EV_CONNECT
)
{
}
else
if
(
ev
==
MG_EV_CONNECT
)
{
int
res
=
*
(
int
*
)
ev_data
;
int
res
=
*
(
int
*
)
ev_data
;
if
(
res
!=
0
)
LOG
(
LL_ERROR
,
(
"connect error: %d"
,
res
));
if
(
res
!=
0
)
LOG
(
LL_ERROR
,
(
"connect error: %d"
,
res
));
}
}
}
}
...
...
mongoose.h
View file @
9b24fdfd
...
@@ -6061,16 +6061,16 @@ enum mg_socks_handshake_method {
...
@@ -6061,16 +6061,16 @@ enum mg_socks_handshake_method {
/* SOCKS5 commands */
/* SOCKS5 commands */
enum
mg_socks_command
{
enum
mg_socks_command
{
MG_SOCKS_CMD_CONNECT
=
1
,
/* Command: CONNECT */
MG_SOCKS_CMD_CONNECT
=
1
,
/* Command: CONNECT */
MG_SOCKS_CMD_BIND
=
2
,
/* Command: BIND */
MG_SOCKS_CMD_BIND
=
2
,
/* Command: BIND */
MG_SOCKS_CMD_UDP_ASSOCIATE
=
3
,
/* Command: UDP ASSOCIATE */
MG_SOCKS_CMD_UDP_ASSOCIATE
=
3
,
/* Command: UDP ASSOCIATE */
};
};
/* SOCKS5 address types */
/* SOCKS5 address types */
enum
mg_socks_address_type
{
enum
mg_socks_address_type
{
MG_SOCKS_ADDR_IPV4
=
1
,
/* Address type: IPv4 */
MG_SOCKS_ADDR_IPV4
=
1
,
/* Address type: IPv4 */
MG_SOCKS_ADDR_DOMAIN
=
3
,
/* Address type: Domain name */
MG_SOCKS_ADDR_DOMAIN
=
3
,
/* Address type: Domain name */
MG_SOCKS_ADDR_IPV6
=
4
,
/* Address type: IPv6 */
MG_SOCKS_ADDR_IPV6
=
4
,
/* Address type: IPv6 */
};
};
/* SOCKS5 response codes */
/* SOCKS5 response codes */
...
...
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