Python bindings for shadowsocks sysproxy utility.
Project description
sysproxy
Python bindings for shadowsocks sysproxy utility. This is a Windows-only package.
API
>>> import sysproxy
>>> sysproxy.off() # Turn proxy settings off
True # Returns True if success. False otherwise
>>> sysproxy.pac('pac_url') # Turn proxy settings on with PAC
True # Returns True if success. False otherwise
>>> sysproxy.set('127.0.0.1:10809', '127.*;10.*;172.16.*') # Turn proxy settings on with server and bypass
True # Returns True if success. False otherwise
>>> sysproxy.daemon_off() # Turn proxy daemon off
True # Returns True if success. False otherwise
>>> sysproxy.daemon_on_() # Turn proxy daemon on. You should launch this function in a Python thread.
Install
pip install sysproxy
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.
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.0.tar.gz
(3.9 kB
view hashes)
Built Distributions
Close
Hashes for sysproxy-0.1.0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c25aad147bf485e92aaad872e6b174743d852b347288a9fb3ab6772ef8aea744 |
|
MD5 | 2f936c043e0c75dba14b6a14267537c3 |
|
BLAKE2b-256 | 9682e8b3eef7cb67114c740ca8b410cd2bf3e106a48cd65ce7d40fb0442ce2c1 |
Close
Hashes for sysproxy-0.1.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 328acd9b5a1a7bbe329669c81b3bb599a29b37ef90069d3e05be96b1cd2bd16f |
|
MD5 | 19156de3ebd291179fdba31c24dfe9f8 |
|
BLAKE2b-256 | f81d4b201a3f0c4b16ff117cc86078517ccd8177e57cb390415e8c22ee64931a |
Close
Hashes for sysproxy-0.1.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4689aa2a6095aef630efc3fe3fc1f823a805b20f2e6be215db9e0caa4dce08b |
|
MD5 | 1fa299bbb17394fb36506d9d2cffc93b |
|
BLAKE2b-256 | c5a0479df912779e0949407a5b8537a7454099cc0325e02a2c5d4ca6c5a85707 |
Close
Hashes for sysproxy-0.1.0-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 524c4553b103d03c2c00ac55f21614a3c1cc433a5242e213471092c020c05bd5 |
|
MD5 | 609057b96149613568e806ae4db28e4b |
|
BLAKE2b-256 | 8a247b6a0400cbdace6043679e34631b8859ffff922ccd3ea2133a1c63dff35a |
Close
Hashes for sysproxy-0.1.0-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76bd9fc2f7f4e85fb39823e94cb1aa5d4d42b69628500d0599f8a06be687ac85 |
|
MD5 | 293ae6cd91d2077a89b4434878e5bafd |
|
BLAKE2b-256 | c28c3f4b70204a2895989b7d1c0af9ff27a118ec790c560ae5ef471df1b1eaa8 |
Close
Hashes for sysproxy-0.1.0-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a67ece4236fd5fc3d64498ea4d05a47894bce0cedc87392d56e75e57857e36e3 |
|
MD5 | d8d714658ba2955a2220bb9115c49c8f |
|
BLAKE2b-256 | 81d6712cb31ec58d3a9bd5bc8810410f0d2e14a11a7f0545c8da91108f72ddb9 |