Ylianst / MeshCentral

A complete web-based remote monitoring and management web site. Once setup you can install agents and perform remote desktop session to devices on the local network or over the Internet.
https://meshcentral.com
Apache License 2.0
3.84k stars 525 forks source link

configuration of telegram in private network #4697

Open paolor1965 opened 1 year ago

paolor1965 commented 1 year ago

Hi I have meshcentral server in private network with use of proxy: it is possible to extend the use of telegram by introducing the possibility of configuring an ad hoc proxy for telegram thanks

it is possible to make sure that the notification settings of the user are sent to the telegram account

thank you and hello

Ylianst commented 1 year ago

Just added Telegram proxy support, updated documentation here. This will be in MeshCentral v1.0.95. Config.json looks like this:

{
  "messaging": {
    "telegram": {
      "apiid": 0,
      "apihash": "00000000000000000000000",
      "session": "aaaaaaaaaaaaaaaaaaaaaaa",
      "useWSS": false,                                 // Important. Most proxies cannot use SSL.
      "proxy": {
        "ip": "123.123.123.123",                       // Proxy host (IP or hostname)
        "port": 123,                                   // Proxy port
        "MTProxy": false,                              // Whether it's an MTProxy or a normal Socks one
        "secret": "00000000000000000000000000000000",  // If used MTProxy then you need to provide a secret (or zeros).
        "socksType": 5,                                // If used Socks you can choose 4 or 5.
        "timeout": 2                                   // Timeout (in seconds) for connection,
      }
    }
  }
}

Once published, let me know if it works.

bravery-only commented 1 year ago

Thank you. I added the codes, but according to the picture, the message has not been added for me? Noty

paolor1965 commented 1 year ago

naively I had absolutely not thought about the fact that I have to have a socks proxy or an mtproxy at my disposal. I need to figure out how and where to activate one so that it is of stable use. Thanks for all

Ylianst commented 1 year ago

You asked for Telegram proxy support and did not have a proxy? In any case, hopefully this will work.

paolor1965 commented 1 year ago

Sorry, I have a university http / https proxy available, but I don't think it is also sock enabled. I'm setting up an mtproxy on a test machine that has internet access thanks again

bravery-only commented 1 year ago

After I entered the proxy ,server it does not run!! If I am connected with the same proxy in Telegram

Ylianst commented 1 year ago

@bravery-only Indicating the proxy does not work will not help anyone help. Open a new issue, place your entire config.json replacing any private data with XXXXX and if there is a "mesherrors.txt" file in "meshcentral-data", post the last few errors from the file. Again, just saying something does not work will not help at all.

dinger1986 commented 8 months ago

@si458 stale