From b641a1888f954592c7d30eb84a0f8c5517536f30 Mon Sep 17 00:00:00 2001 From: "Kay Marquardt (Gnadelwartz)" Date: Sun, 12 Jul 2020 18:19:50 +0200 Subject: [PATCH] fix blocked / recover doc --- README.html | 11 ++++++----- README.md | 15 +++++++++------ README.txt | 26 ++++++++++++++------------ 3 files changed, 29 insertions(+), 23 deletions(-) diff --git a/README.html b/README.html index e1ae4dd..837713e 100644 --- a/README.html +++ b/README.html @@ -247,15 +247,16 @@ It features background tasks and interactive chats, and can serve as an interfac send_message "$(getConfigKey "botadmin")" "$(df -h)"

For more information see Expert Use

Blocked by telegram?

-

This may happen if to many wrong requests are sent to api.telegram.org, e.g. using a wrong token or not existing API calls. If you have a fixed IP you can ask telegram service to unblock your ip or change your IP. If you are running a tor proxy on your server you may uncomment the BASHBOT_CURL_ARGS line in 'mycommands.sh'

-

You can test if younare blockeds by running curl or wget manually:

+

This may happen if to many or wrong requests are sent to api.telegram.org, e.g. using a invalid token or not existing API calls. If the block stay for longer time you can ask telegram service to unblock your IP-Adress.

+

You can check with curl or wget if you are blocked by Telegram:

curl -m 10  https://api.telegram.org/bot
 #curl: (28) Connection timed out after 10001 milliseconds
 
 wget -t 1 -T 10 https://api.telegram.org/bot
 #Connecting to api.telegram.org (api.telegram.org)|46.38.243.234|:443... failed: Connection timed out.
-

Since Version 0.98 bashbot can recover from broken connection to Telegram (aka blocked). therefore you must provide the function bashbotBlockRecover() in mycommands.sh. There you can check e.g. if your connection is working, change IP or simply wait some time.

-

If everything seems OK return 0 for retry or any non 0 value for abort.

+

Since Version 0.96 bashbot offers the option to recover from broken connections (aka blocked). Therefore you can provide a function named bashbotBlockRecover() in mycommands.sh. If the function exists it is called everytime when a broken connection is detected.

+

Possible actions are: Check if network is working, change IP or simply wait some time.

+

If everything seems OK return 0 for retry or any non 0 value to give up.

# called when bashbot sedn command failed because we can not connect to telegram
 # return 0 to retry, return non 0 to give up
 bashbotBlockRecover() {
@@ -267,6 +268,6 @@ It features background tasks and interactive chats, and can serve as an interfac
 

@Gnadelwartz

That's it!

If you feel that there's something missing or if you found a bug, feel free to submit a pull request!

-

$$VERSION$$ v0.99-dev2-1-gef4d21f

+

$$VERSION$$ v0.99-dev2-5-g4d5b792

diff --git a/README.md b/README.md index 622bb1a..6f8ad0f 100644 --- a/README.md +++ b/README.md @@ -222,9 +222,10 @@ For more information see [Expert Use](doc/8_custom.md) ### Blocked by telegram? -This may happen if to many wrong requests are sent to api.telegram.org, e.g. using a wrong token or not existing API calls. If you have a fixed IP you can ask telegram service to unblock your ip or change your IP. If you are running a tor proxy on your server you may uncomment the ```BASHBOT_CURL_ARGS``` line in 'mycommands.sh' +This may happen if to many or wrong requests are sent to api.telegram.org, e.g. using a invalid token or not existing API calls. +If the block stay for longer time you can ask telegram service to unblock your IP-Adress. -You can test if younare blockeds by running curl or wget manually: +You can check with curl or wget if you are blocked by Telegram: ```bash curl -m 10 https://api.telegram.org/bot #curl: (28) Connection timed out after 10001 milliseconds @@ -233,10 +234,12 @@ wget -t 1 -T 10 https://api.telegram.org/bot #Connecting to api.telegram.org (api.telegram.org)|46.38.243.234|:443... failed: Connection timed out. ``` -Since Version 0.98 bashbot can recover from broken connection to Telegram (aka blocked). therefore you must provide the function -`bashbotBlockRecover()` in `mycommands.sh`. There you can check e.g. if your connection is working, change IP or simply wait some time. +Since Version 0.96 bashbot offers the option to recover from broken connections (aka blocked). Therefore you can provide a function +named `bashbotBlockRecover()` in `mycommands.sh`. If the function exists it is called everytime when a broken connection is detected. -If everything seems OK return 0 for retry or any non 0 value for abort. +Possible actions are: Check if network is working, change IP or simply wait some time. + +If everything seems OK return 0 for retry or any non 0 value to give up. ```bash # called when bashbot sedn command failed because we can not connect to telegram @@ -256,4 +259,4 @@ bashbotBlockRecover() { If you feel that there's something missing or if you found a bug, feel free to submit a pull request! -#### $$VERSION$$ v0.99-dev2-1-gef4d21f +#### $$VERSION$$ v0.99-dev2-5-g4d5b792 diff --git a/README.txt b/README.txt index 5d58bfd..418493a 100644 --- a/README.txt +++ b/README.txt @@ -304,13 +304,12 @@ For more information see [Expert Use](doc/8_custom.md) ### Blocked by telegram? -This may happen if to many wrong requests are sent to api.telegram.org, e.g. -using a wrong token or not existing API calls. If you have a fixed IP you can -ask telegram service to unblock your ip or change your IP. If you are running a -tor proxy on your server you may uncomment the ```BASHBOT_CURL_ARGS``` line in -'mycommands.sh' +This may happen if to many or wrong requests are sent to api.telegram.org, e.g. +using a invalid token or not existing API calls. +If the block stay for longer time you can ask telegram service to unblock your +IP-Adress. -You can test if younare blockeds by running curl or wget manually: +You can check with curl or wget if you are blocked by Telegram: ```bash curl -m 10 https://api.telegram.org/bot #curl: (28) Connection timed out after 10001 milliseconds @@ -320,12 +319,15 @@ wget -t 1 -T 10 https://api.telegram.org/bot failed: Connection timed out. ``` -Since Version 0.98 bashbot can recover from broken connection to Telegram (aka -blocked). therefore you must provide the function -`bashbotBlockRecover()` in `mycommands.sh`. There you can check e.g. if your -connection is working, change IP or simply wait some time. +Since Version 0.96 bashbot offers the option to recover from broken connections +(aka blocked). Therefore you can provide a function +named `bashbotBlockRecover()` in `mycommands.sh`. If the function exists it is +called everytime when a broken connection is detected. -If everything seems OK return 0 for retry or any non 0 value for abort. +Possible actions are: Check if network is working, change IP or simply wait +some time. + +If everything seems OK return 0 for retry or any non 0 value to give up. ```bash # called when bashbot sedn command failed because we can not connect to telegram @@ -346,4 +348,4 @@ bashbotBlockRecover() { If you feel that there's something missing or if you found a bug, feel free to submit a pull request! -#### $$VERSION$$ v0.99-dev2-1-gef4d21f +#### $$VERSION$$ v0.99-dev2-5-g4d5b792