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.2.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e30ec7f3ed839f0f9cd46338ec622edc48ce7bcc787a4ef50a370769493e234 |
|
MD5 | cc120ccafce15cd88b59b7a45d73a083 |
|
BLAKE2b-256 | aa4e7a11c814ab760a7aff57eaddf95d67d274d6dc446ede0c30cf7ed0181232 |
Close
Hashes for PySingBoxConverter-0.4.2.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28013160e3ae04ef64ebeaf5ee7a4ec08ff231a4ae6bbeb14721e1fdf3b4d017 |
|
MD5 | 1f8f7bce623a7cf0c7f05d47e76148b5 |
|
BLAKE2b-256 | 8b010cc74ee7ed691c50606038eeaac457276a32a6eaedff00d0a8eab29506f0 |