Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
MTProxy2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
MTProxy2
Commits
e1acd116
Commit
e1acd116
authored
Jul 18, 2019
by
levlam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not maximize TCP buffers in TLS-mode.
parent
b0fffa3b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
19 deletions
+5
-19
mtproto-proxy.c
mtproto/mtproto-proxy.c
+5
-3
net-connections.c
net/net-connections.c
+0
-12
net-events.c
net/net-events.c
+0
-4
No files found.
mtproto/mtproto-proxy.c
View file @
e1acd116
...
...
@@ -2084,10 +2084,12 @@ static int secret_count;
void
mtfront_pre_loop
(
void
)
{
int
i
,
enable_ipv6
=
engine_check_ipv6_enabled
()
?
SM_IPV6
:
0
;
if
(
domain_count
==
0
)
{
tcp_maximize_buffers
=
1
;
if
(
window_clamp
==
0
&&
domain_count
==
0
)
{
if
(
window_clamp
==
0
)
{
window_clamp
=
DEFAULT_WINDOW_CLAMP
;
}
}
if
(
!
workers
)
{
for
(
i
=
0
;
i
<
http_ports_num
;
i
++
)
{
init_listening_tcpv6_connection
(
http_sfd
[
i
],
&
ct_tcp_rpc_ext_server_mtfront
,
&
ext_rpc_methods
,
enable_ipv6
|
SM_LOWPRIO
|
SM_NOQACK
|
(
max_special_connections
?
SM_SPECIAL
:
0
));
...
...
net/net-connections.c
View file @
e1acd116
...
...
@@ -333,17 +333,6 @@ static inline void cond_disable_qack (socket_connection_job_t C) {
}
/* }}} */
/* {{{ cork
static inline void cond_reset_cork (connection_job_t c) {
if (c->flags & C_NOQACK) {
vkprintf (2, "disable TCP_CORK for %d\n", c->fd);
assert (setsockopt (c->fd, IPPROTO_TCP, TCP_CORK, (int[]){0}, sizeof (int)) >= 0);
vkprintf (2, "enable TCP_CORK for %d\n", c->fd);
assert (setsockopt (c->fd, IPPROTO_TCP, TCP_CORK, (int[]){1}, sizeof (int)) >= 0);
}
}
}}} */
/* {{{ CPU PART OF CONNECTION */
...
...
@@ -759,7 +748,6 @@ connection_job_t alloc_new_connection (int cfd, conn_target_job_t CTJ, listening
vkprintf
(
2
,
"window clamp for socket #%d is %d, receive buffer is %d
\n
"
,
cfd
,
t1
,
t2
);
}
}
}
alloc_new_socket_connection
(
C
);
...
...
net/net-events.c
View file @
e1acd116
...
...
@@ -568,7 +568,6 @@ int server_socket (int port, struct in_addr in_addr, int backlog, int mode) {
maximize_sndbuf
(
socket_fd
,
0
);
maximize_rcvbuf
(
socket_fd
,
0
);
setsockopt
(
socket_fd
,
SOL_IP
,
IP_RECVERR
,
&
flags
,
sizeof
(
flags
));
}
else
{
setsockopt
(
socket_fd
,
SOL_SOCKET
,
SO_REUSEADDR
,
&
flags
,
sizeof
(
flags
));
if
(
tcp_maximize_buffers
)
{
...
...
@@ -689,7 +688,6 @@ int client_socket (in_addr_t in_addr, int port, int mode) {
}
return
socket_fd
;
}
int
client_socket_ipv6
(
const
unsigned
char
in6_addr_ptr
[
16
],
int
port
,
int
mode
)
{
...
...
@@ -731,7 +729,6 @@ int client_socket_ipv6 (const unsigned char in6_addr_ptr[16], int port, int mode
}
return
socket_fd
;
}
unsigned
get_my_ipv4
(
void
)
{
...
...
@@ -899,4 +896,3 @@ const char *show_ipv6 (const unsigned char ipv6[16]) {
ptr
+=
conv_ipv6_internal
((
const
unsigned
short
*
)
ipv6
,
ptr
)
+
1
;
return
res
;
}
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