Skip to content

Latest commit

 

History

32 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sysproxy

Deploy PyPI

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 versions
Windows x64 3.6-3.14
Windows ARM64 3.11-3.14

Free-threaded Python 3.13 and 3.14 wheels are also built and tested. Each wheel job runs the daemon lifecycle and interpreter-finalization checks in sample/sample.py before a tagged release can be published.

About

Python binding for shadowsocks sysproxy utility.

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages