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 -t 1 -o config1.json
Use in python code systematically
from singbox_converter import SingBoxConverter
converter = SingBoxConverter(
providers_config="/path/to/providers.json",
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,
)
print(converter.singbox_config)
converter.export_config(
path="/path/to/output/config",
# nodes_only=True
)
Thanks
Credit goes to:
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.4.4.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 416670cc96f2b77a61e12c2f9675aba0e383281d0f7b1fb4019554ff3f6faceb |
|
MD5 | a19c70e604f43654caf15deee0d07f43 |
|
BLAKE2b-256 | 5024e5adbe6a3570d0a1157745b0681bc2030d253d2563489be5e3d23605c3cb |
Close
Hashes for PySingBoxConverter-0.4.4.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93cc5e38f4badf75d9c029ad59d96d499ae9119d15f47ea1f855c8c3ba061b0b |
|
MD5 | ca240fe56573982b2e5655d1a851557c |
|
BLAKE2b-256 | 3be3d3399d56a64b6f588217413abb59f1a036b643d61eeeda86fe69e81d73f0 |