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.
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.1.tar.gz
(3.7 kB
view hashes)
Built Distributions
Close
Hashes for sysproxy-0.1.1-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 125ac16c4e9b63fb43a5b148f6d8e8a86977d88363319ccbb49620701b7aaf6e |
|
MD5 | 49e50c92e1e06f29b6de47028b6ab572 |
|
BLAKE2b-256 | 52d792d5a19273e431a3576714bd3d519f33087630830ee1219cd90b262b7fde |
Close
Hashes for sysproxy-0.1.1-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fa61749c66f08808c4df316ce99f0a1d718d52fe6971040a0ef8b079c5c0877 |
|
MD5 | 986ff199520e1867178c5f712ccb9a29 |
|
BLAKE2b-256 | 16ba9afcbabff5f5c1a5ab70886970d640896e0a7f690b88f3c294da6d1b2fc8 |
Close
Hashes for sysproxy-0.1.1-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4225e5781740c6307388589b67d30615ec113595ff52969c571cb8350d5e260 |
|
MD5 | da9b1d2ed170539fdf5e9e289420e790 |
|
BLAKE2b-256 | 7d2d6a846b6a239c8e4fd5ec528bcb2045af87b075afa5194c772082707719ad |
Close
Hashes for sysproxy-0.1.1-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f7b322845ad1a8dcea90197b765decc04de18de30b677a301ea9480b63eff46f |
|
MD5 | b4e4b38a9dfd26a15da09dcfe15017ed |
|
BLAKE2b-256 | b11c2bdb9915102ae8fbff02abd81633056478f67feb417f61838b42b96c4abe |
Close
Hashes for sysproxy-0.1.1-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 852c6b8b20e775aab8a1669d6c8dc4ec171cb423e3554c513ed9e2b77c3a1970 |
|
MD5 | 70a07286c32155a2690743b1941532ee |
|
BLAKE2b-256 | b22bf3306c1ad8762827eaeb969dc82387cd0023e9c7d278b14637e770fd2c50 |
Close
Hashes for sysproxy-0.1.1-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37821a103e10d1a6dcb4bc787b87186190bca916f4dab8c8b245ab65acce9086 |
|
MD5 | fddf24c8abdd4e894a91c2ce28bb9ef5 |
|
BLAKE2b-256 | 22174b5b2f5fe5b1ab1b9f608be6b777d5727a6d2855f5625549e60f82e523c3 |