When I was developing the telegram bot, I wrote the code locally and uploaded it to the server for testing. Because Telegram's Setwebhook URL is on the line. This is the same as the Access server configuration for the development of micro-credit public numbers.
Of course, this is not much of a development efficiency.
There are some tools for port mapping on the web, such as Ngrok, but SSH itself takes such a tool.
Assuming I telegram Webhook address is Https://www.111cn.net/telegram, the server is running on port 3344, and the local development environment is running on the localhost:3344 address, run the following command:
Ssh-r 3344:localhost:3344 admin@zfanw.com
You can then complete the remote port forwarding to the local. In this way, the data telegram to the Https://www.zfanw.com/telegram address POST will be forwarded to my local localhost:3344.
Wait, how do you break the forwarding? First, the SSH connection is not stable and can easily be broken off. If you are lucky, enter
Exit
Enter to exit.
Of course, we can also press CTRL-C to force the exit.