Repository navigation
feat(mtproto): add an MTProto backend driven by telemt #120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
261fe5c
feat(proto): add MTPROTO backend type and Masque and Mtproto proxy me…
T3ST3ST3R0N 4c147e0
feat(mtproto): add telemt MTProto backend
T3ST3ST3R0N ca7c724
fix(mtproto): harden rendered telemt config and skip invalid users
T3ST3ST3R0N f9bca96
fix(mtproto): force stderr logging and reject web listeners
T3ST3ST3R0N a2c71b8
fix(mtproto): supervise telemt 3.5.14 safely across start, crash and …
T3ST3ST3R0N abd6cd9
fix(mtproto): detach telemt startup from request deadlines
T3ST3ST3R0N c0ec733
fix(mtproto): apply user changes without per-user reads and confirm r…
T3ST3ST3R0N 47cd161
fix(mtproto): confirm hot reloads with a marker user instead of the r…
T3ST3ST3R0N 0afe951
fix(mtproto): settle hot reloads independently of callers and clear s…
T3ST3ST3R0N 71b16bb
fix(mtproto): account traffic per stat family without double counting
T3ST3ST3R0N 8099149
fix(mtproto): carry exact traffic across a stats source switch
T3ST3ST3R0N 5d9b826
build(mtproto): ship pinned telemt 3.5.14 in the node image
T3ST3ST3R0N af0fc33
fix(mtproto): read telemt 3.5.14's answer to a user delete
T3ST3ST3R0N 1f79fb5
fix(mtproto): reject a render telemt cannot read without waiting 30 s
T3ST3ST3R0N c67617e
fix(mtproto): do not SIGHUP telemt before it handles the signal
T3ST3ST3R0N f69d559
test(mtproto): cover telemt 3.5.14 lifecycle, reload and removal end …
T3ST3ST3R0N 77cf000
refactor(mtproto): keep mtproto.go to the backend struct and drop dea…
T3ST3ST3R0N 03f8529
chore(mtproto): fix the Windows test build and document telemt limits
T3ST3ST3R0N d036914
fix(mtproto): send the first SIGHUP once telemt handles it
T3ST3ST3R0N 759f480
fix(mtproto): restart telemt whose API hangs during a reload
T3ST3ST3R0N b48561d
test(mtproto): cover Shutdown during a full apply in the marker wait
T3ST3ST3R0N 730ac6a
test(controller): cover a slow MTProto Start outliving its caller
T3ST3ST3R0N 7e69e36
fix(mtproto): let Disconnect abort a telemt start in progress
T3ST3ST3R0N 9ff6ae0
test(controller): restart telemt when an MTProto Start changes the co…
T3ST3ST3R0N 087134d
test: pin the node answers the panel relies on for MTProto
T3ST3ST3R0N 2eb22c8
fix(mtproto): mark sync errors of a busy or restarting telemt as retr…
T3ST3ST3R0N b301cd3
fix(controller): answer retry-later sync errors as unavailable
T3ST3ST3R0N d631cb4
refactor(mtproto): render the telemt config with go-toml/v2
T3ST3ST3R0N 0ca58f2
refactor(mtproto): use omitzero for the telemt user requests
T3ST3ST3R0N 8cfb762
fix(mtproto): reject include keys at any depth of the panel config
T3ST3ST3R0N 4579899
feat(mtproto): accept telemt WEB listeners and vhosts behind a privat…
T3ST3ST3R0N fe4db93
feat(mtproto): render one telemt WEB profile per user
T3ST3ST3R0N 7936ac0
fix(mtproto): apply user changes by render when WEB profiles are in use
T3ST3ST3R0N 198b3ee
fix(mtproto): render web.limits.max_profiles within telemt's memory e…
T3ST3ST3R0N 4e5b496
test(mtproto): cover WEB decoy, profiles and empty start against tele…
T3ST3ST3R0N d9ce5a8
test(mtproto): check WEB profiles in telemt's running config
T3ST3ST3R0N 12a86af
docs(mtproto): explain WEB mode and an example HTTPS front
T3ST3ST3R0N 9350e71
docs(mtproto): add tls_domain to the WEB example config
T3ST3ST3R0N 26cff9a
fix(mtproto): match telemt's decoy origin rule and keep decoys off te…
T3ST3ST3R0N 91e8198
fix(mtproto): check WEB profile totals and base paths before telemt does
T3ST3ST3R0N 67ef7fe
Merge branch 'dev' into feat/mtproto
T3ST3ST3R0N a5cc90d
Merge branch 'dev' into feat/mtproto
T3ST3ST3R0N File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| package backend | ||
|
|
||
| import "errors" | ||
|
|
||
| // RetryLaterError marks a user sync error that comes from the backend's | ||
| // state, not from the users sent: the backend is busy with an earlier | ||
| // change, its core is restarting, or it was shut down. The node answers it as | ||
| // unavailable (gRPC Unavailable, HTTP 503) with the same text, so a client | ||
| // retries the batch later instead of splitting it to find a user to blame. | ||
| type RetryLaterError struct { | ||
| Err error | ||
| } | ||
|
|
||
| func (e *RetryLaterError) Error() string { return e.Err.Error() } | ||
|
|
||
| func (e *RetryLaterError) Unwrap() error { return e.Err } | ||
|
|
||
| // RetryLater marks err as a RetryLaterError; nil stays nil. | ||
| func RetryLater(err error) error { | ||
| if err == nil { | ||
| return nil | ||
| } | ||
| return &RetryLaterError{Err: err} | ||
| } | ||
|
|
||
| // IsRetryLater reports whether err, or an error it wraps, is a | ||
| // RetryLaterError. | ||
| func IsRetryLater(err error) bool { | ||
| var retryLater *RetryLaterError | ||
| return errors.As(err, &retryLater) | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.