Skip to content

Commit

Permalink
better docs
Browse files Browse the repository at this point in the history
  • Loading branch information
litnialex committed Apr 2, 2024
1 parent 137bcef commit ce5cfc0
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 9 deletions.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -511,8 +511,8 @@ <h2 id="launch-by-your-own">Launch by your own</h2>
If you want to find out your telegram ID ask <a href="https://t.me/my_id_bot">@my_id_bot</a>.</p>
<h2 id="security-considerations">Security considerations</h2>
<p>Proxybot is designed with respect to personal privacy and security in mind.
Source code of the application is 100% open and free.
When proxybot is used as a service we take the responsability to run exactly the same code, which is published in the <a href="https://github.com/litnialex/telegram-proxybot">repository</a>.</p>
The source code of the bot is 100% open and free.
When you use our service to run proxybot we take the responsability to run exactly the same code, which is published in the <a href="https://github.com/litnialex/telegram-proxybot">repository</a>.</p>
<p><code>TOKEN</code> value is not stored anywhere in the database. Proxybot receives it as a part of the webhook URL and uses it only until finishing handling the incoming request.</p>
<h2 id="feedback">Feedback</h2>
<p>Contact <a href="https://t.me/devproxybot">@devproxybot</a> for any questions or feedback.</p>
Expand Down
15 changes: 10 additions & 5 deletions ru/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@

<h1>Домашняя</h1>

<p>Proxybot — это бот для <a href="https://www.telegram.org">Telegram</a>, который пересылает все входящие сообщения своему владельцу, или в telegram-группу выбранную владельцем.
<p>Proxybot — это бот для <a href="https://www.telegram.org">Телеграм</a>, который пересылает все входящие сообщения своему владельцу, или в telegram-группу выбранную владельцем.
Такая группа может быть и супергруппой с топиками.</p>
<p>Отправлять ответы через бот можно простой отправкой сообщения в чат.
Такие сообщения всегда отправляются последнему контакту в чате.
Expand All @@ -506,16 +506,21 @@ <h2 id="_1">Воспользуйтесь нашим сервисом.</h2>
предоплата не требуется.</p>
<p><em>Начать использовать proxybot проще простого</em></p>
<h2 id="proxybot">Запустите proxybot самостоятельно</h2>
<p>Proxybot может быть запущен как <a href="Telegram-Bot-Serverless.html">serverless функция</a> или как <a href="Telegram-Bot-Flask.html">приложение Flask</a>.</p>
<p>Proxybot может быть запущен как <a href="Telegram-Bot-Serverless.html">serverless функция</a>
или как <a href="Telegram-Bot-Flask.html">приложение Flask</a>.</p>
<p>В этом случае вам потребуется предоставить рабочее соединение с MongoDB.
Как вариант, для этого можно воспользоваться бесплатным предложением от <a href="https://www.mongodb.com/docs/atlas/">MongoDB Atlas</a>.</p>
<p>Переменная <code>TELEGRAM_ID</code> должна содержать ID аккаунта Telegram - "владелца proxybot".
Если вы хотите узнать свой ID в Telegram, спросите у <a href="https://t.me/my_id_bot">@my_id_bot</a></p>
Если вы хотите узнать свой ID в Telegram, спросите у <a href="https://t.me/my_id_bot">@my_id_bot</a>.</p>
<h2 id="_2">Безопасность</h2>
<p>Proxybot разработан с уважением к защите персональных данных и вниманием к вопросам безопасности.
Исходный код бота открыт и бесплатен на 100%.
Когда вы пользуетесь нашим сервисом для запуска proxybot, мы несём ответственность за выполнение в точности того же когда, что опубликован в <a href="https://github.com/litnialex/telegram-proxybot">репозитории</a>.</p>
<p>Значение <code>TOKEN</code> нигде в базе данных не сохраняется. Proxybot получает его как часть URL в webhook и использует его пока отрабатывает входящий запрос из Telegram.</p>
Когда вы пользуетесь нашим сервисом для запуска proxybot,
мы несём ответственность за выполнение в точности того же когда,
что опубликован в <a href="https://github.com/litnialex/telegram-proxybot">репозитории</a>.</p>
<p>Значение <code>TOKEN</code> нигде в базе данных не сохраняется.
Proxybot получает его как часть URL в webhook и использует его
пока отрабатывает входящий запрос из Telegram.</p>
<h2 id="_3">Поддержка</h2>
<p>Контакт для обратной связи и по любым вопросам - <a href="https://t.me/devproxybot">@devproxybot</a>.</p>

Expand Down
2 changes: 1 addition & 1 deletion ru/search/search_index.json

Large diffs are not rendered by default.

Binary file modified ru/sitemap.xml.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion search/search_index.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"index.html","title":"Home","text":"<p>Proxybot is a Telegram bot which forwards all incoming messages to the owner or into a telegram group, specified by the owner. This group can also be a supergroup with topics.</p> <p>Replies are done simply texting back in the chat. Such messages always go to the last contact in that chat. Of course, you can reply to any specific message in chat history by pressing \"Reply\" link in that message.</p> <p>Voice-messages, video-messages, files and any other media format supported by Telegram can be proxied in this manner.</p> <p>Proxybot assists teams and individuals in managing public communications through their personal Telegram accounts.</p>"},{"location":"index.html#use-proxybot-as-a-service","title":"Use proxybot as a service","text":"<p>This bot: @InitProxybot can launch your proxybot in the cloud within seconds.</p> <p>This is offered as a service from proxybot developer with an annual subscription fee of $20.</p> <p>You get 4 months of free usage, prepay is not required.</p> <p>It's extremely easy to start using proxybot.</p>"},{"location":"index.html#launch-by-your-own","title":"Launch by your own","text":"<p>Proxybot can be launched as a serverless function or as a Flask application.</p> <p>In this case you will need to provide a valid MongoDB connection. You may start with MongoDB Atlas free tier.</p> <p><code>TELEGRAM_ID</code> variable must contain the ID of the Telegram account assigned \"proxybot owner\" privilege, and only this account will be able to control bot via commands. If you want to find out your telegram ID ask @my_id_bot.</p>"},{"location":"index.html#security-considerations","title":"Security considerations","text":"<p>Proxybot is designed with respect to personal privacy and security in mind. Source code of the application is 100% open and free. When proxybot is used as a service we take the responsability to run exactly the same code, which is published in the repository.</p> <p><code>TOKEN</code> value is not stored anywhere in the database. Proxybot receives it as a part of the webhook URL and uses it only until finishing handling the incoming request.</p>"},{"location":"index.html#feedback","title":"Feedback","text":"<p>Contact @devproxybot for any questions or feedback.</p>"},{"location":"Telegram-Bot-Flask.html","title":"Run as a Flask application","text":"<p>To run proxybot as a Flask application you will need a valid SSL certificate for HTTPS, which may be a self-signed certificate.</p> <p>In example below we are creating a self-signed certificate valid for 10 years, and later it will be used in <code>setWebhook</code> method.</p> <pre><code>HOST=proxybot.example.com\nopenssl req -newkey rsa:2048 -sha256 -nodes -keyout ssl/privkey.pem -x509 -days 3650 -out ssl/cert.pem -subj \"/CN=${HOST}\"\n</code></pre> <p><code>HOST</code> variable must contain a real IP address or a fully qualified domain name for reaching the application from Telegram network.</p> <p>If SSL certificate and key are not found in ./ssl folder application will launch anycase, but will accept HTTP at port 8080. You must then use then another frontend web-server, like nginx, to accept HTTPS requests from Telegram network and pass them to the application.</p>"},{"location":"Telegram-Bot-Flask.html#run-with-docker","title":"Run with Docker","text":"<p>This command will launch pre-built proxybot docker container.</p> <pre><code>TELEGRAM_ID=1234123123\nDB_URI=\"mongodb+srv://***:**********@cluster0._______.mongodb.net/\"\ndocker run --rm -p 8080:8080 -p 8443:8443 -v ./ssl:/app/ssl \\\n -e TELEGRAM_ID=$TELEGRAM_ID -e DB_URI=$DB_URI litnialex/proxybot\n</code></pre>"},{"location":"Telegram-Bot-Flask.html#run-with-docker-compose","title":"Run with Docker Compose","text":"<p>You may choose to build <code>proxybot</code> container locally, as well as to start a standard <code>mongodb</code> container and set <code>DB_URI=mongodb://mongodb</code>. Check <code>docker-compose.yml</code> in repository root folder for details.</p> <p>Provide your variables in <code>.env</code> file. Check <code>.env.example</code> for the list of all accepted vars and their default values.</p> <p>Launch with command: </p> <pre><code>docker compose up\n</code></pre>"},{"location":"Telegram-Bot-Flask.html#register-the-webhook","title":"Register the webhook","text":"<p>The Telegram bot API method <code>setWebhook</code> must be called to start receiving updates from Telegram.</p> <pre><code>TOKEN=123456789:NeotobrAfMymceuwackTeunLiudsudjocoi\ncurl -F \"url=${HOST}:8443/bot${TOKEN}\" -F certificate=@ssl/cert.pem https://api.telegram.org/bot${TOKEN}/setWebhook\n</code></pre> <p>Additionally, you may define an API_SECRET variable to prevent unauthorized webhook calls. For that, define AP_SECRET variable and add <code>-F secret_token=${API_SECRET}</code> in last command.</p> <p>You may run multiple bots within the same application. Just repeat last step for each of your bots.</p>"},{"location":"Telegram-Bot-Serverless.html","title":"Run proxybot as a serverless function","text":"<p>Here is an example of how to launch proxybot in Google Cloud Functions with <code>gcloud</code> command:</p> <pre><code>TELEGRAM_ID=1234123123\nDB_URI=\"mongodb+srv://***:**********@cluster0._______.mongodb.net/\"\nREGION=europe-west1\ngcloud functions deploy --gen2 --region=$REGION --runtime=python310 \\\n --trigger-http --entry-point=entrypoint --allow-unauthenticated \\\n --set-env-vars=TELEGRAM_ID=$TELEGRAM_ID,DB_URI=$DB_URI \\\n --source=proxybot/ proxybot\n</code></pre> <p>This command, run from the repository root folder, will upload contents of <code>proxybot</code> subfolder as a function named <code>proxybot</code>.</p>"},{"location":"Telegram-Bot-Serverless.html#register-the-webhook","title":"Register the webhook","text":"<p>The Telegram bot API method <code>setWebhook</code> must be called to start receiving updates from Telegram.</p> <pre><code>CLOUD_URL=https://***********.cloudfunctions.net/proxybot\nTOKEN=123456789:NeotobrAfMymceuwackTeunLiudsudjocoi\ncurl -F \"url=${CLOUD_URL}/bot${TOKEN}\" https://api.telegram.org/bot${TOKEN}/setWebhook\n</code></pre> <p>Replace <code>TELEGRAM_ID</code>, <code>DB_URI</code>, <code>REGION</code>, <code>CLOUD_URL</code>, <code>TOKEN</code> variable values with your data.</p>"}]}
{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"index.html","title":"Home","text":"<p>Proxybot is a Telegram bot which forwards all incoming messages to the owner or into a telegram group, specified by the owner. This group can also be a supergroup with topics.</p> <p>Replies are done simply texting back in the chat. Such messages always go to the last contact in that chat. Of course, you can reply to any specific message in chat history by pressing \"Reply\" link in that message.</p> <p>Voice-messages, video-messages, files and any other media format supported by Telegram can be proxied in this manner.</p> <p>Proxybot assists teams and individuals in managing public communications through their personal Telegram accounts.</p>"},{"location":"index.html#use-proxybot-as-a-service","title":"Use proxybot as a service","text":"<p>This bot: @InitProxybot can launch your proxybot in the cloud within seconds.</p> <p>This is offered as a service from proxybot developer with an annual subscription fee of $20.</p> <p>You get 4 months of free usage, prepay is not required.</p> <p>It's extremely easy to start using proxybot.</p>"},{"location":"index.html#launch-by-your-own","title":"Launch by your own","text":"<p>Proxybot can be launched as a serverless function or as a Flask application.</p> <p>In this case you will need to provide a valid MongoDB connection. You may start with MongoDB Atlas free tier.</p> <p><code>TELEGRAM_ID</code> variable must contain the ID of the Telegram account assigned \"proxybot owner\" privilege, and only this account will be able to control bot via commands. If you want to find out your telegram ID ask @my_id_bot.</p>"},{"location":"index.html#security-considerations","title":"Security considerations","text":"<p>Proxybot is designed with respect to personal privacy and security in mind. The source code of the bot is 100% open and free. When you use our service to run proxybot we take the responsability to run exactly the same code, which is published in the repository.</p> <p><code>TOKEN</code> value is not stored anywhere in the database. Proxybot receives it as a part of the webhook URL and uses it only until finishing handling the incoming request.</p>"},{"location":"index.html#feedback","title":"Feedback","text":"<p>Contact @devproxybot for any questions or feedback.</p>"},{"location":"Telegram-Bot-Flask.html","title":"Run as a Flask application","text":"<p>To run proxybot as a Flask application you will need a valid SSL certificate for HTTPS, which may be a self-signed certificate.</p> <p>In example below we are creating a self-signed certificate valid for 10 years, and later it will be used in <code>setWebhook</code> method.</p> <pre><code>HOST=proxybot.example.com\nopenssl req -newkey rsa:2048 -sha256 -nodes -keyout ssl/privkey.pem -x509 -days 3650 -out ssl/cert.pem -subj \"/CN=${HOST}\"\n</code></pre> <p><code>HOST</code> variable must contain a real IP address or a fully qualified domain name for reaching the application from Telegram network.</p> <p>If SSL certificate and key are not found in ./ssl folder application will launch anycase, but will accept HTTP at port 8080. You must then use then another frontend web-server, like nginx, to accept HTTPS requests from Telegram network and pass them to the application.</p>"},{"location":"Telegram-Bot-Flask.html#run-with-docker","title":"Run with Docker","text":"<p>This command will launch pre-built proxybot docker container.</p> <pre><code>TELEGRAM_ID=1234123123\nDB_URI=\"mongodb+srv://***:**********@cluster0._______.mongodb.net/\"\ndocker run --rm -p 8080:8080 -p 8443:8443 -v ./ssl:/app/ssl \\\n -e TELEGRAM_ID=$TELEGRAM_ID -e DB_URI=$DB_URI litnialex/proxybot\n</code></pre>"},{"location":"Telegram-Bot-Flask.html#run-with-docker-compose","title":"Run with Docker Compose","text":"<p>You may choose to build <code>proxybot</code> container locally, as well as to start a standard <code>mongodb</code> container and set <code>DB_URI=mongodb://mongodb</code>. Check <code>docker-compose.yml</code> in repository root folder for details.</p> <p>Provide your variables in <code>.env</code> file. Check <code>.env.example</code> for the list of all accepted vars and their default values.</p> <p>Launch with command: </p> <pre><code>docker compose up\n</code></pre>"},{"location":"Telegram-Bot-Flask.html#register-the-webhook","title":"Register the webhook","text":"<p>The Telegram bot API method <code>setWebhook</code> must be called to start receiving updates from Telegram.</p> <pre><code>TOKEN=123456789:NeotobrAfMymceuwackTeunLiudsudjocoi\ncurl -F \"url=${HOST}:8443/bot${TOKEN}\" -F certificate=@ssl/cert.pem https://api.telegram.org/bot${TOKEN}/setWebhook\n</code></pre> <p>Additionally, you may define an API_SECRET variable to prevent unauthorized webhook calls. For that, define AP_SECRET variable and add <code>-F secret_token=${API_SECRET}</code> in last command.</p> <p>You may run multiple bots within the same application. Just repeat last step for each of your bots.</p>"},{"location":"Telegram-Bot-Serverless.html","title":"Run proxybot as a serverless function","text":"<p>Here is an example of how to launch proxybot in Google Cloud Functions with <code>gcloud</code> command:</p> <pre><code>TELEGRAM_ID=1234123123\nDB_URI=\"mongodb+srv://***:**********@cluster0._______.mongodb.net/\"\nREGION=europe-west1\ngcloud functions deploy --gen2 --region=$REGION --runtime=python310 \\\n --trigger-http --entry-point=entrypoint --allow-unauthenticated \\\n --set-env-vars=TELEGRAM_ID=$TELEGRAM_ID,DB_URI=$DB_URI \\\n --source=proxybot/ proxybot\n</code></pre> <p>This command, run from the repository root folder, will upload contents of <code>proxybot</code> subfolder as a function named <code>proxybot</code>.</p>"},{"location":"Telegram-Bot-Serverless.html#register-the-webhook","title":"Register the webhook","text":"<p>The Telegram bot API method <code>setWebhook</code> must be called to start receiving updates from Telegram.</p> <pre><code>CLOUD_URL=https://***********.cloudfunctions.net/proxybot\nTOKEN=123456789:NeotobrAfMymceuwackTeunLiudsudjocoi\ncurl -F \"url=${CLOUD_URL}/bot${TOKEN}\" https://api.telegram.org/bot${TOKEN}/setWebhook\n</code></pre> <p>Replace <code>TELEGRAM_ID</code>, <code>DB_URI</code>, <code>REGION</code>, <code>CLOUD_URL</code>, <code>TOKEN</code> variable values with your data.</p>"}]}
Binary file modified sitemap.xml.gz
Binary file not shown.

0 comments on commit ce5cfc0

Please sign in to comment.