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
File details
Details for the file pysingboxconverter-0.5.0.dev0.tar.gz
.
File metadata
- Download URL: pysingboxconverter-0.5.0.dev0.tar.gz
- Upload date:
- Size: 30.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 261922dde98f480b3861491362811dfdf75ac5eb34f276e4223d5280410f0787 |
|
MD5 | e51e2aa6bb0c7540538a9e0b8068a12b |
|
BLAKE2b-256 | 79808f4780e1a065d94d94b4cb333215031f78a85ac3a20cce9991de045a2b2e |
File details
Details for the file PySingBoxConverter-0.5.0.dev0-py3-none-any.whl
.
File metadata
- Download URL: PySingBoxConverter-0.5.0.dev0-py3-none-any.whl
- Upload date:
- Size: 46.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5966d482cc5d0ae8a7e57e876edfa6cc63d02b668307ee23260bbfa90d4f2951 |
|
MD5 | 2e2bde56cf9ee922f08a46f45581c0a0 |
|
BLAKE2b-256 | f58c4fcfbabee139a4ce2e834f7cdb9e0bdeee5f3a906aba1dedcf5d074f6064 |