Sign inSign up

lsposed/rss-to-telegram

By lsposed

•Updated almost 3 years ago

rss订阅推送 RSS Subscription Push

Image
0

1.0K

lsposed/rss-to-telegram repository overview

rss订阅推送

# Please read https://github.com/Rongronggg9/RSS-to-Telegram-Bot/blob/master/docs/deployment-guide.md for more details.
version: '3.6'

services:
  main:
    image: lsposed/rss-to-telegram:dev 
    container_name: telegra_rsstt  # need to be unique
    volumes:
      - ./config:/app/config
    environment:
      - TOKEN=  # get it from @BotFather
      - MANAGER=  # get it from @userinfobot

# ↓------ To disable sending via Telegraph, comment out this area ------↓ #
# Get Telegraph API access tokens: https://api.telegra.ph/createAccount?short_name=RSStT&author_name=Generated%20by%20RSStT&author_url=https%3A%2F%2Fgithub.com%2FRongronggg9%2FRSS-to-Telegram-Bot
# Refresh the page every time you get a new token.
# If you have a lot of subscriptions, make sure to get at least 5 tokens.
#                            ↓ Replace with your access tokens ↓
      - TELEGRAPH_TOKEN=
        b377b0
        220216
        dac056
        3ac268
        20d546
# ↑------ To disable sending via Telegraph, comment out this area ------↑ #

# Please read https://github.com/Rongronggg9/RSS-to-Telegram-Bot/blob/master/docs/advanced-settings.md for more details.
# ↓------ Advanced settings ------↓ #
      #- MULTIUSER=0  # default: 1
      #- CRON_SECOND=30  # 0-59, default: 0
      #- DATABASE_URL=postgres://username:password@host:port/db_name  # default: sqlite://path/to/config/db.sqlite3
      #- API_ID=1025907  # get it from https://core.telegram.org/api/obtaining_api_id
      #- API_HASH=452b0359b988148995f22ff0f4229750  # get it from https://core.telegram.org/api/obtaining_api_id
      #- IMG_RELAY_SERVER=https://wsrv.nl/?url=  # default: https://rsstt-img-relay.rongrong.workers.dev/
      #- IMAGES_WESERV_NL=https://t0.nl/  # default: https://wsrv.nl/
      #- USER_AGENT=Mozilla/5.0 (Android 12; Mobile; rv:68.0) Gecko/68.0 Firefox/96.0  # default: RSStT/2.2 RSS Reader
      #- IPV6_PRIOR=1  # default: 0
      #- T_PROXY=socks5://172.17.0.1:1080  # Proxy used to connect to the Telegram API
      #- R_PROXY=socks5://172.17.0.1:1080  # Proxy used to fetch feeds
      #- PROXY_BYPASS_PRIVATE=1  # default: 0
      #- PROXY_BYPASS_DOMAINS=example.com;example.net
      #- HTTP_TIMEOUT=30  # default: 12
      #- HTTP_CONCURRENCY=0  # default: 1024
      #- HTTP_CONCURRENCY_PER_HOST=0  # default: 16
      #- TABLE_TO_IMAGE=1  # default: 0
      #- TRAFFIC_SAVING=1  # default: 0
      #- LAZY_MEDIA_VALIDATION=1  # default: 0
      #- MANAGER_PRIVILEGED=1  # default: 0
      #- NO_UVLOOP=1  # default: 0
      #- MULTIPROCESSING=1  # default: 0
      #- DEBUG=1  # debug logging, default: 0
# ↑------ Advanced settings ------↑ #
    networks:
      - mynetworks
    logging:
      driver: "json-file"
      options:
        max-size: "50m"
    restart: always
    # mem_limit: 100m
    # cpus: 0.2
    
networks:
  mynetworks:
    external: true

⁠Advanced Settings

⁠Env variables

⁠Required
KeyDescriptionExample
TOKENYour bot token. Get it from @BotFather⁠1234567890:A1BCd2EF3gH45IJK6lMN7oPqr8ST9UvWX0Yz0
MANAGERYour Telegram user ID. Get it from @userinfobot⁠1234567890
⁠API settings
KeyDescriptionExampleDefault
API_IDYour Telegram API ID⁠1025907(predefined)
API_HASHYour Telegram API hash⁠452b0359b988148995f22ff0f4229750(predefined)
TELEGRAPH_TOKENTelegraph API access token. Get here⁠. 1⁠1a23b456c78de90f1a23b456c78de90f1a23b456c78de90f1a23b456c78d 2⁠
⁠Network settings
KeyDescriptionExampleDefault
T_PROXYProxy used to connect to the Telegram API 3⁠socks5://172.17.0.1:1080
R_PROXYProxy used to fetch feeds 3⁠socks5://172.17.0.1:1080
PROXY_BYPASS_PRIVATEBypass proxy for private IPs or not?10
PROXY_BYPASS_DOMAINSBypass proxy for listed domainsexample.com;example.net 2⁠
USER_AGENTUser-AgentMozilla/5.0RSStT/$VERSION RSS Reader
IPV6_PRIOREnforce fetching feeds over IPv6 firstly or not? 4⁠10
TRAFFIC_SAVINGEnable network traffic saving mode or not? 5⁠10
LAZY_MEDIA_VALIDATIONLet Telegram DC to validate media or not? 6⁠10
HTTP_TIMEOUTHTTP request timeout in seconds6012
HTTP_CONCURRENCYHTTP request concurrency overall (0=unlimited)01024
HTTP_CONCURRENCY_PER_HOSTHTTP request concurrency per host (0=unlimited)016
⁠Misc settings
KeyDescriptionExampleDefault
MULTIUSEREnable multi-user feature or not?01
CRON_SECONDRun the feed monitoring task at the n-th second of each minute? (0-59)300
IMG_RELAY_SERVERMedia relay server URLhttps://wsrv.nl/?url=https://rsstt-img-relay.rongrong.workers.dev/
IMAGES_WESERV_NLhttps://github.com/weserv/images⁠ instancehttps://t0.nl/https://wsrv.nl/
DATABASE_URLDatabase URL 7⁠postgres://user:[email protected]:5432/tablesqlite://path/to/config/db.sqlite3
TABLE_TO_IMAGEConvert tables to image (causing higher CPU load) or just drop them?10
MANAGER_PRIVILEGEDAllow the bot manager to manipulate any users' subscriptions or not? 8⁠10
NO_UVLOOPNever enable uvloop (even if it is found) or not?10
MULTIPROCESSINGEnable multiprocessing (up to min(3, CPU_COUNT)) or not? 9⁠10
DEBUGEnable debug logging or not?10

⁠Manager options

Manager options are options stored in the database. The bot manager can change it by using the /set_option command.

KeyDescriptionExampleDefault
default_intervalDefault feed monitoring interval 10⁠1510
minimal_intervalMinimal feed monitoring interval 11⁠ 12⁠105
user_sub_limitSubscription number limit for ordinary user 13⁠ 12⁠150-1 (unlimited)
channel_or_group_sub_limitSubscription number limit for channel or group 13⁠ 12⁠150-1 (unlimited)
sub_limit_reached_messageAdditional message attached to the limit reached warninghttps://t.me/RSStT_Channel/58

————

⁠高级设置

⁠环境变量

⁠必需的
键描述示例
TOKEN您的机器人令牌。从@BotFather⁠获取1234567890:A1BCd2EF3gH45IJK6lMN7oPqr8ST9UvWX0Yz0
MANAGER您的Telegram用户ID。从@userinfobot⁠获取1234567890
⁠API设置
键描述示例默认值
API_ID您的Telegram API ID⁠1025907(预定义)
API_HASH您的Telegram API哈希⁠452b0359b988148995f22ff0f4229750(预定义)
TELEGRAPH_TOKENTelegraph API访问令牌。在此处获取⁠。 1⁠1a23b456c78de90f1a23b456c78de90f1a23b456c78de90f1a23b456c78d 2⁠
⁠网络设置
键描述示例默认值
T_PROXY用于连接到Telegram API的代理 3⁠socks5://172.17.0.1:1080
R_PROXY用于获取feeds的代理 3⁠socks5://172.17.0.1:1080
PROXY_BYPASS_PRIVATE是否为私有IP地址绕过代理?10
PROXY_BYPASS_DOMAINS绕过代理的域名列表example.com;example.net 2⁠
USER_AGENT用户代理Mozilla/5.0RSStT/$VERSION RSS Reader
IPV6_PRIOR是否强制首先使用IPv6获取feeds? 4⁠10
TRAFFIC_SAVING是否启用网络流量节省模式? 5⁠10
LAZY_MEDIA_VALIDATION是否由Telegram DC验证媒体? 6⁠10
HTTP_TIMEOUTHTTP请求超时时间(秒)6012
HTTP_CONCURRENCY总体的HTTP请求并发数(0=无限制)01024
HTTP_CONCURRENCY_PER_HOST每个主机的HTTP请求并发数(0=无限制)016
⁠杂项设置
键描述示例默认值
MULTIUSER是否启用多用户功能?01
CRON_SECOND在每分钟的第n秒运行feed监控任务?(0-59)300
IMG_RELAY_SERVER媒体中继服务器URLhttps://wsrv.nl/?url=https://rsstt-img-relay.rongrong.workers.dev/
IMAGES_WESERV_NLhttps://github.com/weserv/images实例⁠https://t0.nl/https://wsrv.nl/
DATABASE_URL数据库URL 7⁠postgres://user:[email protected]:5432/tablesqlite://path/to/config/db.sqlite3
TABLE_TO_IMAGE将表格转换为图片(导致更高的CPU负载)还是丢弃它们?10
MANAGER_PRIVILEGED是否允许机器人管理员操纵任何用户的订阅? 8⁠10
NO_UVLOOP是否永远不启用uvloop(即使找到)?10
MULTIPROCESSING是否启用多进程(最多min(3, CPU_COUNT))? 9⁠10
DEBUG是否启用调试日志?10

⁠管理员选项

管理员选项是存储在数据库中的选项。机器人管理员可以使用/set_option命令更改它。

键描述示例默认值
default_interval默认的feed监控间隔 10⁠1510
minimal_interval用户可以为订阅设置的最小监控间隔 11⁠ 12⁠105
user_sub_limit普通用户的订阅数量限制 13⁠ 12⁠150-1 (无限制)
channel_or_group_sub_limit频道或群组的订

阅数量限制 13⁠ 12⁠ | 150 | -1 (无限制) | | sub_limit_reached_message | 与达到限制的警告附加的额外消息 | https://t.me/RSStT_Channel/58 | |

⁠Footnotes

  1. Refresh the page every time you get a new token. If you have a lot of subscriptions, make sure to get at least 5 tokens. ↩⁠ ↩2⁠

  2. Can be a list, separated by ;, ,, (space), (linebreak), or (tab) ↩⁠ ↩2⁠ ↩3⁠ ↩4⁠

  3. If you would like to use a proxy in a docker container, but your proxy is in your host machine, the hostname should be 172.17.0.1 (Linux) or host.docker.internal (macOS/Windows). Note: your proxy program should also listen to it. ↩⁠ ↩2⁠ ↩3⁠ ↩4⁠

  4. Use with caution. Enabling it will enforce the bot to try to fetch feeds over IPv6 (fallback to IPv4 if failed), which may be helpful if your IPv4 address gets banned by some feed providers. If it is disabled (by default), the bot will still try to fetch feeds over IPv4 and IPv6, but there is no clear priority. You should firstly ensure that the bot has IPv6 connectivity, especially if run in docker. ↩⁠ ↩2⁠

  5. Use with caution. May cause media validating and sending slightly unreliable. Meanwhile, effectively disable webpage title detection for <iframe> tags, instead, the title will always be URL hostname. ↩⁠ ↩2⁠

  6. Use with caution. Help cut down network traffic further. If enabled, RSStT no longer fetches media and validates it. Effectively disable long-pic detection and partially disable icon detection. ↩⁠ ↩2⁠

  7. Ref: https://tortoise-orm.readthedocs.io/en/latest/databases.html⁠. Note that Railway.app will automatically fill this env variable. ↩⁠ ↩2⁠

  8. Use with caution. If enabled, the bot manager can bypass the permission check before manipulating any users'/channels'/groups' subscriptions. The command format is like /sub @username, /sub +9999999999 (ordinary user) or /sub -1009999999999 (channel/group). Should only be used temporarily and be disabled after finishing the manipulation. This option is considered safe for bot users since the bot manager can always manipulate their subscriptions by manipulating the database manually. ↩⁠ ↩2⁠

  9. Only valid when there are more than 1 CPU core, otherwise the process count is always 1. Enabling multiprocessing may help improve the performance on multicore CPUs if there are tons of subscriptions but consumes more memory. If your VPS comes with multiple cores but the performance of each is poor, you may want to enable this feature. ↩⁠ ↩2⁠

  10. After a user subscribes to a feed, the default monitoring interval is applied. ↩⁠ ↩2⁠

  11. The minimal monitoring interval a user can set for a subscription. ↩⁠ ↩2⁠

  12. The bot manager will not be limited by this value. ↩⁠ ↩2⁠ ↩3⁠ ↩4⁠ ↩5⁠ ↩6⁠

  13. Once reached the limit, no more subscriptions can be created. However, existing subscriptions will not be removed even if reaching the limit. As a bot manager, you can enable MANAGER_PRIVILEGED mode to manually unsubscribe their subscriptions. ↩⁠ ↩2⁠ ↩3⁠ ↩4⁠

Tag summary

Content type

Image

Digest

sha256:483f74ea0…

Size

142.5 MB

Last updated

almost 3 years ago

docker pull lsposed/rss-to-telegram