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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
Close
Hashes for sysproxy-0.1.2-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5af537a486b096221ba777a2801e7c7d4d3fd8c752529f067a9044a244a29367 |
|
MD5 | a6459b8efafbd9dcc263d49b3d604852 |
|
BLAKE2b-256 | 6dd78252a79edf9ee97ccf83642c38369e087913e1834f3dc2ef8b99527ecf88 |
Close
Hashes for sysproxy-0.1.2-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98a27aff35eb004532cbd43d099e2639ce769e2105fb85ca0900fc6223a7cf7c |
|
MD5 | 33a8ceb1b24dab9623865062103e7f9c |
|
BLAKE2b-256 | ac13418d523d2f7d76f7886a01d7d77dd27d07c455db5dad6e9fcf431c500272 |
Close
Hashes for sysproxy-0.1.2-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a06e9c78239ad88d994d442edcba925c5a58b011606c85537057ed698243cb3 |
|
MD5 | 65ffb3ad000b3b97d39a32947626f5b2 |
|
BLAKE2b-256 | 1dd48937ad24a8a1615273c5f70cf8a1b46bd97a697b655d8f51f001fe7b2e3d |
Close
Hashes for sysproxy-0.1.2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16281c1410a63a7d8d502672bf50312f7be7d1f8ad66490c8c009893f7dc56bd |
|
MD5 | 4a644074a02bae4556f8231511e8e1e7 |
|
BLAKE2b-256 | b0af2369adc4d2a020c86ed38d2cf04a7e50eade0c555a83ecac9ad84f14de55 |
Close
Hashes for sysproxy-0.1.2-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2a3b7f77c497cb70cb30130459fd53cc3b0988b00bab1a6f348f8511413d3f7 |
|
MD5 | e0dd6e9a12e313b64f0456618f4ec337 |
|
BLAKE2b-256 | 3c7356a320b2652841b8195b52f38d2f4ee4c4e8b52aa8b2a8ec39a729321236 |
Close
Hashes for sysproxy-0.1.2-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f9917f59c9a587c8912f9c5f6f09bca1bd636878d3aeae4532e6df72da663b1 |
|
MD5 | 7ec343660a1ca5565e2af17705436eea |
|
BLAKE2b-256 | 859e485278a9109ca5471fcb4b89397b4c5dbb3ad78a94e6ba6df9bb3c4c57a7 |
Close
Hashes for sysproxy-0.1.2-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbd62e196afb0284c312be9c2633796466accb041c37bbaad8a0244f8b3984b5 |
|
MD5 | 51fc6d002c07aa8b0da30a707a9e751b |
|
BLAKE2b-256 | c278dfed88623ff755464d2f72d4d1f7436b5c9cd05e1810a45749ad025a4437 |