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.3.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7ab7d01609fdf3ecd9fb31d6b78d2e011587e0708a6be9f614157801d0603f9 |
|
MD5 | 779857cd38fc73c54eadb65e9ec6e785 |
|
BLAKE2b-256 | 129d570f73e3a85834f41de315cfea3c6f82201bd87b233b0382862adf822950 |
Close
Hashes for PySingBoxConverter-0.4.3.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a27dcbbd2d59869c7feb57063827f43a47479016ba2127fe5cbcee416eb776a |
|
MD5 | 32d7dee752b828d53ccaaaf08e472009 |
|
BLAKE2b-256 | b1b4abd380603489dd05a30dc5b4197b0e896a597ad5d87aea33815e93c1955d |