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

ipv6 support? #11

Open
SmOkEnksp opened this issue Apr 3, 2019 · 13 comments
Open

ipv6 support? #11

SmOkEnksp opened this issue Apr 3, 2019 · 13 comments

Comments

@SmOkEnksp
Copy link

No description provided.

@seriyps
Copy link
Owner

seriyps commented Apr 3, 2019 via email

@SmOkEnksp
Copy link
Author

idk telegram use ipv6 or not, so maybe for first on client-to-proxy

@SmOkEnksp
Copy link
Author

i think both would be nice

@seriyps
Copy link
Owner

seriyps commented Apr 4, 2019

But do you have any reason to want to have it? As far as I know, ipv6 is not supported in Iran and works not very well in Russia.
Do you have any particular usecase for it?

@SmOkEnksp
Copy link
Author

Do you have any particular usecase for it?
i have two servers where installed ipv6, and i know DPI bad working on ipv6.
anyway in 2019 support ipv6 is good.

@seriyps
Copy link
Owner

seriyps commented Aug 7, 2019

I will try to add this soon. Sorry for the late response!

seriyps added a commit that referenced this issue Aug 8, 2019
seriyps added a commit that referenced this issue Aug 8, 2019
@seriyps
Copy link
Owner

seriyps commented Aug 8, 2019

Well, I implemented IPv6 for client connections (Telegram client-to-proxy), see https://github.com/seriyps/mtproto_proxy#ipv6 . Not sure if will add proxy-to-telegram-server in a foreseen future.

seriyps added a commit that referenced this issue Aug 8, 2019
@seriyps seriyps mentioned this issue Aug 14, 2019
@danyhm
Copy link

danyhm commented Oct 2, 2019

But do you have any reason to want to have it? As far as I know, ipv6 is not supported in Iran and works not very well in Russia.
Do you have any particular usecase for it?

hello @seriyps
thank you very much for your hard work. I was using the alex python version but I heard yours is better so I switched today.

the main reason was that I saw you support IPv6 but after installing and following the instruction I could not get it to work. I'm pretty sure I had setup ipv6 correctly because I tested another mtproto proxy called mtoxy and it worked perfectly. bad thing is that it did not support fake tls.

IPv6 is partially supported in Iran (I know Irancell and Rightel operators both support it. don't know about others).

the great thing about IPv6 is that nowadays most VPS providers provide huge blocks of Ipv6 so if one gets blocked we can easily add another without paying anything. (my VPS provider has given me /64 netmask which is enough for the whole middle east even if they block 1 IP per day per person.)

So I would say adding good IPv6 support is very essential.

@seriyps
Copy link
Owner

seriyps commented Oct 2, 2019

@danyhm ipv6 is supported now, but only for connections from clients to proxy. Not proxy to telegram server. See https://github.com/seriyps/mtproto_proxy#ipv6.

So, if you will set it up as it says in docs, your proxy server will connect to telegram servers by ipv4, but your clients will be able to connect by both ipv6 and ipv4.

@danyhm
Copy link

danyhm commented Oct 2, 2019

@seriyps
I did as the https://github.com/seriyps/mtproto_proxy#ipv6 said but could not connect from ipv6 address. how can I troubleshoot this?

@seriyps
Copy link
Owner

seriyps commented Oct 3, 2019

@danyhm can you do /opt/mtp_proxy/bin/mtp_proxy eval 'ranch:info().'? Also, it might be easier to discuss in Telegram: https://t.me/erlang_mtproxy

@danyhm
Copy link

danyhm commented Oct 3, 2019

@seriyps
yes I can, I joined the group will discuss it there

@romanad
Copy link

romanad commented Feb 24, 2025

Dear Support Team,

I am attempting to enable IPv6 connectivity for the MTProto-Proxy server in both local and Docker environments. Below are the details of my setups and the issues I’m encountering:

  1. Local Setup
    I added the following block to config/prod-sys.config to enable an IPv6 listener:
     #{name => mtp_handler_all_ipv6,
       listen_ip => "::", 
       port => 1443,
       secret => <<"d0d6e111bada5511fcce9584deadbeef">>,
       tag => <<"dcbe8f1493fa4cd9ab300891c0b5b326">>}

and then: sudo make update-sysconfig && sudo systemctl reload mtproto-proxy

this is what I get in crash.log

2025-02-24 19:58:28 =SUPERVISOR REPORT====
     Supervisor: {local,mtp_down_conn_sup}
     Context:    child_terminated
     Reason:     downstream_socket_closed
     Offender:   [{pid,<0.832.0>},{id,mtp_down_conn},{mfargs,{mtp_down_conn,start_link,undefined}},{restart_type,temporary},{significant,false},{shutdown,2000},{child_type,worker}]
  1. Docker setup
    The file /opt/mtp_proxy/releases/0.1.0/sys.config is different comparing to local setup file, the part with listener is commented out, but when I add same blocks from local setup, and I keep getting

error in config file "/opt/mtp_proxy/releases/0.1.0/sys.config" (2): bad term
so could you please inform is it possible to enable IPv6 in container setup and if it is - how.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants