Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mtproto_proxy
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
mtproto_proxy
Commits
8b2e3906
Commit
8b2e3906
authored
May 30, 2018
by
Sergey Prokhorov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix timeout state switch
parent
d2fab355
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
3 deletions
+15
-3
README.md
README.md
+7
-0
mtp_handler.erl
src/mtp_handler.erl
+4
-3
mtproto_proxy.app.src
src/mtproto_proxy.app.src
+4
-0
No files found.
README.md
View file @
8b2e3906
...
@@ -42,6 +42,13 @@ Stop proxy started in background
...
@@ -42,6 +42,13 @@ Stop proxy started in background
./_build/default/rel/mtp_proxy/bin/mtp_proxy stop
./_build/default/rel/mtp_proxy/bin/mtp_proxy stop
```
```
Settings
--------
See
`src/mtproto_proxy.app.src`
.
Secret key will be printed on start.
Helpers
Helpers
-------
-------
...
...
src/mtp_handler.erl
View file @
8b2e3906
...
@@ -230,9 +230,10 @@ handle_upstream_header(Endpoint, UpCodec, S) ->
...
@@ -230,9 +230,10 @@ handle_upstream_header(Endpoint, UpCodec, S) ->
EndpointStr
=
inet
:
ntoa
(
Endpoint
),
EndpointStr
=
inet
:
ntoa
(
Endpoint
),
lager
:
info
(
"Connected to
~s
:
~p
"
,
[
EndpointStr
,
443
]),
lager
:
info
(
"Connected to
~s
:
~p
"
,
[
EndpointStr
,
443
]),
ok
=
gen_tcp
:
send
(
Sock
,
<<
239
>>
),
ok
=
gen_tcp
:
send
(
Sock
,
<<
239
>>
),
{
ok
,
S
#state
{
stage
=
tunnel
,
{
ok
,
switch_timer
(
S
#state
{
stage
=
tunnel
,
down_sock
=
Sock
,
down_sock
=
Sock
,
up_codec
=
UpCodec
}};
up_codec
=
UpCodec
},
hibernate
)};
{
error
,
_
Reason
}
=
Err
->
{
error
,
_
Reason
}
=
Err
->
Err
Err
end
.
end
.
...
...
src/mtproto_proxy.app.src
View file @
8b2e3906
...
@@ -11,6 +11,10 @@
...
@@ -11,6 +11,10 @@
stdlib
stdlib
]},
]},
{env,[
{env,[
{init_timeout_sec, 60},
{hibernate_timeout_sec, 60},
{ready_timeout_sec, 1200},
{ip, {0, 0, 0, 0}},
{ip, {0, 0, 0, 0}},
{ports, [{mtp_handler, 4430}]},
{ports, [{mtp_handler, 4430}]},
{num_acceptors, 60},
{num_acceptors, 60},
...
...
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