Skip to content
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

Experimental link doesn't work in Telegram desktop beta 1.7.15 #115

Closed
FreedomPrevails opened this issue Aug 9, 2019 · 14 comments

Comments

@FreedomPrevails
Copy link

commented Aug 9, 2019

I was trying to test the new experimental proxy method in Telegram desktop beta 1.7.15 but it says the proxy link -which is generated by mtprotoproxy- is invalid.
The normal link works fine.
Here are the links:

tg: tg://proxy?server=x.x.x.x&port=443&secret=ddc54a3eae90544e68a37cbe41c5d31442
tg: tg://proxy?server=x.x.x.x&port=443&secret=7sVKPq6QVE5oo3y%2BQcXTFEJnb29nbGUuY29t

I see other users have the same issue in other topic #113

@seriyps

This comment has been minimized.

Copy link

commented Aug 9, 2019

%2B is urlencoded +, but telegram only understands "urlsafe" version of base64: all + should be replaced with - and all / with _:

https://github.com/seriyps/mtproto_proxy/blob/c31ba04e5681a2991ce495a6c17e5fb94357daa7/src/mtp_fake_tls.erl#L78-L84

But it's better to be fixed in source code than manually later:

tls_secret_base64 = base64.b64encode(tls_secret)

base64.b64encode(tls_secret) should be replaced with base64.urlsafe_b64encode(tls_secret)

@FreedomPrevails

This comment has been minimized.

Copy link
Author

commented Aug 9, 2019

@seriyps Thanks ! replacing %2B with - resolved the issue. @alexbers

@HirbodBehnam

This comment has been minimized.

Copy link

commented Aug 9, 2019

BTW guys they released the version of the telergam that supports the fake TLS!
On Android it's version 5.10
On PC it's version 1.8

@hookzof

This comment has been minimized.

Copy link

commented Aug 9, 2019

BTW guys they released the version of the MTProto proxy that supports the fake TLS!
On Android it's version 5.10
On PC it's version 1.8

Confirm! Also works on latest iOS.

@pouryare

This comment has been minimized.

Copy link
Contributor

commented Aug 9, 2019

Is this feature need any module?
I can't even connect to the default secret.

@FreedomPrevails

This comment has been minimized.

Copy link
Author

commented Aug 9, 2019

If you are interested I have forked the repo and added TLS_ONLY option and fixed the TLS encoding bug :
https://github.com/FreedomPrevails/mtprotoproxy

@pouryare

This comment has been minimized.

Copy link
Contributor

commented Aug 9, 2019

@FreedomPrevails
I tried it but it doesn't work either.

@FreedomPrevails

This comment has been minimized.

Copy link
Author

commented Aug 9, 2019

@pouryare May be your IP is blocked or something else, you cant even connect to default secret. Your issue has nothing to do with TLS.

@pouryare

This comment has been minimized.

Copy link
Contributor

commented Aug 9, 2019

@FreedomPrevails
I can connect to non TLS.

@FreedomPrevails

This comment has been minimized.

Copy link
Author

commented Aug 9, 2019

@seriyps I found out something interesting, i fixed the function to base64.urlsafe_b64encode and it generates a secret which includes a - character. but ios version of telegram, doesnt accept the secret if it has the - char, I had to change it to + manually so it would accept the secret !
The android and desktop versions accept the secret with - char.

@alexbers

This comment has been minimized.

Copy link
Owner

commented Aug 11, 2019

it seems there is a bug in the ios client. Hope they will fix it

@FreedomPrevails

This comment has been minimized.

Copy link
Author

commented Aug 11, 2019

Yes, I opened an issue an Telegram-iOS github:
TelegramMessenger/Telegram-iOS#118

@medfan00

This comment has been minimized.

Copy link

commented Aug 13, 2019

After generating the secret and registering the bot in @MTProxybot it worked.

@FreedomPrevails

This comment has been minimized.

Copy link
Author

commented Aug 13, 2019

This issue is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.