Python bindings for shadowsocks sysproxy utility.
Project description
sysproxy
Python bindings for shadowsocks sysproxy utility. This is a Windows-only package.
Install
pip install sysproxy
API
>>> import sysproxy
>>> sysproxy.off() # Turn proxy settings off.
True
>>> sysproxy.pac('pac_url') # Turn proxy settings on with PAC.
True
>>> sysproxy.set('127.0.0.1:10809', '127.*;10.*;172.16.*') # Turn proxy settings on with server and bypass.
True
>>> sysproxy.daemon_off() # Turn proxy daemon off.
True
>>> sysproxy.daemon_on_() # Turn proxy daemon on. You should launch this function in a Python thread.
sysproxy daemon
When sysproxy daemon turned on, it executes a window-less WINAPI event loop that captures WM_QUERYENDSESSION
message,
which is sent when Windows is about to shutdown. When the message arrives, the daemon calls off()
, which turns proxy
settings off.
As mentioned above, sysproxy.daemon_on_()
will block current Python execution, so you should launch it in a Python
thread.
Tested Platform
sysproxy works on all reasonable Windows platform with all Python version(Python 3).
Below are tested build in github actions.
Platform | Python 3.6-Python 3.11 |
---|---|
windows-2019 | :heavy_check_mark: |
windows-2022 | :heavy_check_mark: |
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sysproxy-0.1.3.tar.gz
(4.8 kB
view hashes)
Built Distributions
Close
Hashes for sysproxy-0.1.3-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5fffd408e97e4db4b60551b3846a2fc14b9a16f86f2d1073d1a91d9cbadc0cc |
|
MD5 | 1463366ec3df77f28389151f83dfb484 |
|
BLAKE2b-256 | ad79a1e013553c0eb70ecb7089451093a6fff84801f7c8b14a8d38b37ace78a1 |
Close
Hashes for sysproxy-0.1.3-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 310ca7be2fd345742f516d0f2f43108a4b7e2b2bf0203ca68789ee8f537f6752 |
|
MD5 | efd2e5dc6c189e262a97f7a0d6a72401 |
|
BLAKE2b-256 | a40cbafd862f54e5c4219a229c73688bcd1a37ef0373fdc0e2939915f76c8194 |
Close
Hashes for sysproxy-0.1.3-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11e7e1a4f71cb999551eec5ca21359d09607fc0c92bc773331ce9ff6a57a15f1 |
|
MD5 | 58d391c1ddf80108801cd79df7452b0e |
|
BLAKE2b-256 | f70c85aba31909c746125486a20da6471363b9586ab5b239f97e906ebff987ca |
Close
Hashes for sysproxy-0.1.3-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1129f27150bb4b0ccf4dc504e0fbd81b742ffaa8ffada47f855b3ee919b32d36 |
|
MD5 | 3cdf7c96bcf84f55fb0c5eb73186eb16 |
|
BLAKE2b-256 | 1a5311db0b753f4afd755a3bf52c13d517a5b9714368a3d59a835577ecc09e81 |
Close
Hashes for sysproxy-0.1.3-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6bbb41e9de148b34822eecc7d3f151397f5b5fb4d047dd69fc168a28d14702e5 |
|
MD5 | 9cc1f47c8c9ffa2258c5132cedae88f8 |
|
BLAKE2b-256 | aa594ac990c59f918d8c906064f2a97c2614a833d9e395768eb89e52c18c3958 |
Close
Hashes for sysproxy-0.1.3-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d91e95da66f243277e8c1cccc4b7fa915eea18416412e4a001bd53ca87cfa667 |
|
MD5 | 3906b0088b5ba193e1d56087513e2f3e |
|
BLAKE2b-256 | 09d9147c2fac6a11ffd3449a15b5506520d34ecbdc2e968e5aade88336bb1a61 |
Close
Hashes for sysproxy-0.1.3-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a770f7ff9af925bf82669c8aedd1633fe46b12a8578ab1f3096824921732e3eb |
|
MD5 | 9914d90725a3a9c28cb7b614a7151625 |
|
BLAKE2b-256 | cfce0a34295c32c57a7cc3c0a5b4a609312153cf7204a53fe5e9f763199e6212 |