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
b0fffa3b
Commit
b0fffa3b
authored
Jul 18, 2019
by
levlam
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not change window clamp dy default in TLS-mode,
parent
08657089
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
mtproto-proxy.c
mtproto/mtproto-proxy.c
+15
-10
No files found.
mtproto/mtproto-proxy.c
View file @
b0fffa3b
...
@@ -107,11 +107,11 @@ const char FullVersionStr[] = VERSION_STR " compiled at " __DATE__ " " __TIME__
...
@@ -107,11 +107,11 @@ const char FullVersionStr[] = VERSION_STR " compiled at " __DATE__ " " __TIME__
#define MAX_MTFRONT_NB ((NB_max * 3) >> 2)
#define MAX_MTFRONT_NB ((NB_max * 3) >> 2)
#endif
#endif
double
ping_interval
=
PING_INTERVAL
;
static
double
ping_interval
=
PING_INTERVAL
;
int
window_clamp
=
DEFAULT_WINDOW_CLAMP
;
static
int
window_clamp
;
#define PROXY_MODE_OUT 2
#define PROXY_MODE_OUT 2
int
proxy_mode
;
static
int
proxy_mode
;
#define IS_PROXY_IN 0
#define IS_PROXY_IN 0
#define IS_PROXY_OUT 1
#define IS_PROXY_OUT 1
...
@@ -2085,11 +2085,15 @@ static int secret_count;
...
@@ -2085,11 +2085,15 @@ static int secret_count;
void
mtfront_pre_loop
(
void
)
{
void
mtfront_pre_loop
(
void
)
{
int
i
,
enable_ipv6
=
engine_check_ipv6_enabled
()
?
SM_IPV6
:
0
;
int
i
,
enable_ipv6
=
engine_check_ipv6_enabled
()
?
SM_IPV6
:
0
;
tcp_maximize_buffers
=
1
;
tcp_maximize_buffers
=
1
;
if
(
window_clamp
==
0
&&
domain_count
==
0
)
{
window_clamp
=
DEFAULT_WINDOW_CLAMP
;
}
if
(
!
workers
)
{
if
(
!
workers
)
{
for
(
i
=
0
;
i
<
http_ports_num
;
i
++
)
{
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
));
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
));
// assert (setsockopt (http_sfd[i], IPPROTO_TCP, TCP_MAXSEG, (int[]){1410}, sizeof (int)) >= 0);
// assert (setsockopt (http_sfd[i], IPPROTO_TCP, TCP_MAXSEG, (int[]){1410}, sizeof (int)) >= 0);
// assert (setsockopt (http_sfd[i], IPPROTO_TCP, TCP_NODELAY, (int[]){1}, sizeof (int)) >= 0);
// assert (setsockopt (http_sfd[i], IPPROTO_TCP, TCP_NODELAY, (int[]){1}, sizeof (int)) >= 0);
if
(
window_clamp
)
{
listening_connection_job_t
LC
=
Events
[
http_sfd
[
i
]].
data
;
listening_connection_job_t
LC
=
Events
[
http_sfd
[
i
]].
data
;
assert
(
LC
);
assert
(
LC
);
CONN_INFO
(
LC
)
->
window_clamp
=
window_clamp
;
CONN_INFO
(
LC
)
->
window_clamp
=
window_clamp
;
...
@@ -2097,6 +2101,7 @@ void mtfront_pre_loop (void) {
...
@@ -2097,6 +2101,7 @@ void mtfront_pre_loop (void) {
vkprintf
(
0
,
"error while setting window size for socket #%d to %d: %m
\n
"
,
http_sfd
[
i
],
window_clamp
);
vkprintf
(
0
,
"error while setting window size for socket #%d to %d: %m
\n
"
,
http_sfd
[
i
],
window_clamp
);
}
}
}
}
}
// create_all_outbound_connections ();
// create_all_outbound_connections ();
}
}
}
}
...
...
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