mirror of
https://github.com/cesanta/mongoose.git
synced 2025-01-14 09:48:01 +08:00
Reformat mongoose
PUBLISHED_FROM=5202fa46a6a834bde35168ba566d3dce7c48f453
This commit is contained in:
parent
8313896a85
commit
9b24fdfd1d
@ -3266,9 +3266,9 @@ extern const struct mg_iface_vtable mg_socks_iface_vtable;
|
||||
extern const struct mg_iface_vtable mg_default_iface_vtable;
|
||||
|
||||
const struct mg_iface_vtable *mg_ifaces[] = {
|
||||
&mg_default_iface_vtable,
|
||||
&mg_default_iface_vtable,
|
||||
#if MG_ENABLE_TUN
|
||||
&mg_tun_iface_vtable,
|
||||
&mg_tun_iface_vtable,
|
||||
#endif
|
||||
};
|
||||
|
||||
@ -12833,7 +12833,7 @@ static void mg_socks5_handshake(struct mg_connection *c) {
|
||||
}
|
||||
mbuf_remove(r, 2 + r->buf[1]);
|
||||
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) {
|
||||
} else if (ev == MG_EV_RECV) {
|
||||
relay_data(c);
|
||||
} 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));
|
||||
}
|
||||
}
|
||||
|
12
mongoose.h
12
mongoose.h
@ -6061,16 +6061,16 @@ enum mg_socks_handshake_method {
|
||||
|
||||
/* SOCKS5 commands */
|
||||
enum mg_socks_command {
|
||||
MG_SOCKS_CMD_CONNECT = 1, /* Command: CONNECT */
|
||||
MG_SOCKS_CMD_BIND = 2, /* Command: BIND */
|
||||
MG_SOCKS_CMD_UDP_ASSOCIATE = 3, /* Command: UDP ASSOCIATE */
|
||||
MG_SOCKS_CMD_CONNECT = 1, /* Command: CONNECT */
|
||||
MG_SOCKS_CMD_BIND = 2, /* Command: BIND */
|
||||
MG_SOCKS_CMD_UDP_ASSOCIATE = 3, /* Command: UDP ASSOCIATE */
|
||||
};
|
||||
|
||||
/* SOCKS5 address types */
|
||||
enum mg_socks_address_type {
|
||||
MG_SOCKS_ADDR_IPV4 = 1, /* Address type: IPv4 */
|
||||
MG_SOCKS_ADDR_DOMAIN = 3, /* Address type: Domain name */
|
||||
MG_SOCKS_ADDR_IPV6 = 4, /* Address type: IPv6 */
|
||||
MG_SOCKS_ADDR_IPV4 = 1, /* Address type: IPv4 */
|
||||
MG_SOCKS_ADDR_DOMAIN = 3, /* Address type: Domain name */
|
||||
MG_SOCKS_ADDR_IPV6 = 4, /* Address type: IPv6 */
|
||||
};
|
||||
|
||||
/* SOCKS5 response codes */
|
||||
|
Loading…
x
Reference in New Issue
Block a user