Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

xkeen-subscription-watcher

Использование

xkeen-subscription-watcher <tag>=<url>

Можно передать несколько пар <tag>=<url>

Скрипт получает из переданных подписок прокси, генерирует конфиги 04_outbounds.<tag>.json.

Если конфиги изменились, выполняется xkeen -restart.

Установка

opkg install python3
curl -sSo /opt/sbin/xkeen-subscription-watcher https://raw.githubusercontent.com/tkukushkin/xkeen-subscription-watcher/refs/heads/master/src/xkeen_subscription_watcher/main.py
chmod +x /opt/sbin/xkeen-subscription-watcher
crontab -e

Добавляем что-то вроде:

0 * * * * /opt/sbin/xkeen-subscription-watcher <tag>=<url>

Убираем из 04_outbounds.json прокси, которые будут теперь генерироваться из подписок, иначе теги будут конфликтовать, оставляем например такое:

{
  "outbounds": [
    {
      "tag": "direct",
      "protocol": "freedom"
    },
    {
      "tag": "block",
      "protocol": "blackhole",
      "response": {
        "type": "HTTP"
      }
    }
  ]
}

В 05_routing.json добавляем конфигурацию balancers и burstObservatory для автоматического выбора лучшего прокси, далее в rules используем balancerTag вместо outboundTag, например:

{
  "routing": {
    "domainStrategy": "AsIs",
    "balancers": [
      {
        "tag": "proxy",
        "selector": ["<tag>"],
        "strategy": {
          "type": "leastPing"
        }
      }
    ],
    "rules": [
      {
        "inboundTag": ["socks", "http"],
        "balancerTag": "proxy"
      }
    ]
  },
  "burstObservatory": {
    "subjectSelector": ["<tag>"],
    "pingConfig": {}
  }
}

Разово запускаем команду из crontab, проверяем, что всё работает.

Metadata

Release files for xkeen-subscription-watcher 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xkeen-subscription-watcher 0.2.1
File Size Uploaded Provenance
xkeen_subscription_watcher-0.2.1.tar.gz 36.3 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for xkeen-subscription-watcher 0.2.1
File Interpreter ABI Platform
xkeen_subscription_watcher-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 44.0 kB

Release files / xkeen_subscription_watcher-0.2.1.tar.gz

Download URL xkeen_subscription_watcher-0.2.1.tar.gz
Size 36.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1c97f2275492b56a81b82e89e89dcf24c3c4ebfb4b72871c3d79a9a2c5f100d4
BLAKE2b-256 checksum
How to use checksums
28f4a2f8358e2bca5a83f1337426a3fd9d7c7956b5b2b3f1c5aa9e26dbcd0f3d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Release files / xkeen_subscription_watcher-0.2.1-py3-none-any.whl

Download URL xkeen_subscription_watcher-0.2.1-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8a61356abbc30c152e4a8bc7673d7dcaabe141e905b7956c2d1cd19e4e86f0c8
BLAKE2b-256 checksum
How to use checksums
354ce2d53399e8a94c1fa37c111b56c1a77de84a40b37adfe74aabd7ff01a748
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

Security for xkeen-subscription-watcher 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for xkeen_subscription_watcher-0.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 15, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page