Skip to main content

Clash subscription customizer

Project description

Clash订阅定制器/Clash Subscription Customizer

screenshot.jpg

支持的功能

  • 自定义所有Clash配置项:

    port, socks-port, redir-port, tproxy-port, mixed-port, allow-lan, bind-address, mode, log-level, ipv6, external-controller, external-ui, secret, interface-name, routing-mark, hosts, profile, dns等

  • 支持远程配置,兼容subconverter远程配置中的ruleset, custom_proxy_group, enable_rule_generatoroverwrite_original_rules

使用

通过pip安装

pip install -U sub-customizer
# 或者同时安装API依赖
pip install -U sub-customizer[api]

启动http服务

sub-customizer serve  # 默认127.0.0.1:57890
sub-customizer serve --host 0.0.0.0 --port 5789  # 自定义地址和端口

docker

dockerfile在docker目录下,内容如下:

FROM python:3.12-slim

RUN apt-get update
RUN pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple && \
    pip install -U sub-customizer[api]

WORKDIR /opt/sub-customizer

CMD ["sub-customizer", "serve", "--host", "0.0.0.0", "--port", "57890"]
# build镜像
docker build -t sub-customizer:latest -f Dockerfile .

# 运行
docker run --name sub-customizer -d -p 57890:57890 sub-customizer:latest

打开http://127.0.0.1:57890/customizer/sub_customizer 使用即可。

TODO

  • 支持聚合多个订阅中的节点

为什么不使用subconverter

subconverter提供了很多功能,主要包括订阅转换,自定义规则等等。但是对于我或者很多人来说并不需要那些,我所需要的仅仅是能够对多个机场订阅更新时自动应用使同一套代理规则(如对oaifree和linuxdo使用直连),并且简单易配置

除了兼容subconverter远程配置中的ruleset, custom_proxy_group, enable_rule_generatoroverwrite_original_rules之外,其他项直接读取并覆盖原订阅配置文件。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sub_customizer-0.1.2.tar.gz (27.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sub_customizer-0.1.2-py3-none-any.whl (26.6 kB view details)

Uploaded Python 3

File details

Details for the file sub_customizer-0.1.2.tar.gz.

File metadata

  • Download URL: sub_customizer-0.1.2.tar.gz
  • Upload date:
  • Size: 27.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for sub_customizer-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ad52898d0d10cb6f5bf20de43be9a4c6b62b1dc857a7d4596f13eac14c6c407a
MD5 902cbf452877ddbb55531ca69721d0d7
BLAKE2b-256 d7d403870f6f57bd25e9c325e713515420c8921fae0fcca31ea7c0afad6a33d7

See more details on using hashes here.

File details

Details for the file sub_customizer-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: sub_customizer-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 26.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.7

File hashes

Hashes for sub_customizer-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c16ab5f18552a44ebbb65bde2121b6b42e4cc1ce2ed47f0d075e4d3ef351f5d0
MD5 3b0c6a7b844d34f17f67070388cae224
BLAKE2b-256 cd0ebc4f2b3277c8445a1bb3f4bcc25bd064b4248c87c14d7682a27b3a4a11d0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page