SingBox converter, Python
Project description
SingBox Converter
The code are refactored from Toperlock/sing-box-subscribe See Documentation.
How to install
pip install PySingBoxConverter
Use in commandline
Create a providers.json
from providers-example.json
:
cp providers-example.json providers.json
vi providers.json
Then run
singbox_convert
Use in python code systematically
import json
from singbox_converter import SingBoxConverter
with open("/path/to/providers.json", "rb") as f:
config = json.loads(f.read())
converter = SingBoxConverter(
providers_config=config,
template="/path/to/template",
fetch_sub_ua="clash.meta",
# fetch_sub_fallback_ua="clash",
# export_config_folder="",
# export_config_name="my_config.json",
# auto_fix_empty_outbound=True,
)
converter.export_config(
# path="/path/to/output/config"
)
Thanks
Credit goes to Toperlock/sing-box-subscribe.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for PySingBoxConverter-0.3.1.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6654c595230a9b1a3ebe3857c58feae7a201634884d14a12fda73fc2756445fc |
|
MD5 | d0de08eabb22f56a9fabcbe19f9e7192 |
|
BLAKE2b-256 | a6538d8e484fcaf379150a781078954c44defc1057cfebef7624d52e54323a44 |
Close
Hashes for PySingBoxConverter-0.3.1.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1db91dceffb1c59042ce56f99b753c74e9ac62bd6d4eeaf870850f198b6e9a33 |
|
MD5 | 201211d3575368eb188b9eadb5ccf09f |
|
BLAKE2b-256 | cf4022bd67fddba0e97d082b6b656d5fc445485db62e0635673874da937d276e |