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
28f5b17e
Commit
28f5b17e
authored
Jan 25, 2019
by
vvaltman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mtproto: by default do not open stats port
parent
b9950a18
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
mtproto-proxy.c
mtproto/mtproto-proxy.c
+9
-1
No files found.
mtproto/mtproto-proxy.c
View file @
28f5b17e
...
...
@@ -62,6 +62,7 @@
#include "mtproto-config.h"
#include "common/tl-parse.h"
#include "engine/engine.h"
#include "engine/engine-net.h"
#ifndef COMMIT
#define COMMIT "unknown"
...
...
@@ -2123,6 +2124,7 @@ void usage (void) {
exit
(
2
);
}
server_functions_t
mtproto_front_functions
;
int
f_parse_option
(
int
val
)
{
char
*
colon
,
*
ptr
;
switch
(
val
)
{
...
...
@@ -2174,6 +2176,10 @@ int f_parse_option (int val) {
ping_interval
=
PING_INTERVAL
;
}
break
;
case
2000
:
engine_set_http_fallback
(
&
ct_http_server
,
&
http_methods_stats
);
mtproto_front_functions
.
flags
&=
~
ENGINE_NO_PORT
;
break
;
case
'S'
:
case
'P'
:
{
...
...
@@ -2216,6 +2222,7 @@ int f_parse_option (int val) {
}
void
mtfront_prepare_parse_options
(
void
)
{
parse_option
(
"http-stats"
,
no_argument
,
0
,
2000
,
"allow http server to answer on stats queries"
);
parse_option
(
"mtproto-secret"
,
required_argument
,
0
,
'S'
,
"16-byte secret in hex mode"
);
parse_option
(
"proxy-tag"
,
required_argument
,
0
,
'P'
,
"16-byte proxy tag in hex mode to be passed along with all forwarded queries"
);
parse_option
(
"max-special-connections"
,
required_argument
,
0
,
'C'
,
"sets maximal number of accepted client connections per worker"
);
...
...
@@ -2328,7 +2335,8 @@ server_functions_t mtproto_front_functions = {
.
FullVersionStr
=
FullVersionStr
,
.
ShortVersionStr
=
"mtproxy"
,
.
parse_function
=
mtfront_parse_function
,
.
http_functions
=
&
http_methods_stats
.
flags
=
ENGINE_NO_PORT
//.http_functions = &http_methods_stats
};
int
main
(
int
argc
,
char
*
argv
[])
{
...
...
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