sysproxy


Namesysproxy JSON
Version 0.1.4 PyPI version JSON
download
home_pagehttps://github.com/LorenEteval/sysproxy
SummaryPython bindings for shadowsocks sysproxy utility.
upload_time2024-12-23 15:08:52
maintainerNone
docs_urlNone
authorLoren Eteval
requires_pythonNone
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # sysproxy

[![Deploy PyPI](https://github.com/LorenEteval/sysproxy/actions/workflows/deploy-pypi.yml/badge.svg?branch=main)](https://github.com/LorenEteval/sysproxy/actions/workflows/deploy-pypi.yml)

Python bindings for shadowsocks sysproxy utility. This is a Windows-only package.

## Install

```
pip install sysproxy
```

## API

```pycon
>>> 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](https://github.com/LorenEteval/sysproxy/actions).

| Platform     | Python 3.6-Python 3.11 |
|--------------|:----------------------:|
| windows-2019 |   :heavy_check_mark:   |
| windows-2022 |   :heavy_check_mark:   |

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/LorenEteval/sysproxy",
    "name": "sysproxy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Loren Eteval",
    "author_email": "loren.eteval@proton.me",
    "download_url": "https://files.pythonhosted.org/packages/31/99/1114a157fe6f258e63ad18dd0317ef15564c669a29033280544078ddf0a9/sysproxy-0.1.4.tar.gz",
    "platform": null,
    "description": "# sysproxy\r\n\r\n[![Deploy PyPI](https://github.com/LorenEteval/sysproxy/actions/workflows/deploy-pypi.yml/badge.svg?branch=main)](https://github.com/LorenEteval/sysproxy/actions/workflows/deploy-pypi.yml)\r\n\r\nPython bindings for shadowsocks sysproxy utility. This is a Windows-only package.\r\n\r\n## Install\r\n\r\n```\r\npip install sysproxy\r\n```\r\n\r\n## API\r\n\r\n```pycon\r\n>>> import sysproxy\r\n>>> sysproxy.off() # Turn proxy settings off.\r\nTrue\r\n>>> sysproxy.pac('pac_url') # Turn proxy settings on with PAC.\r\nTrue\r\n>>> sysproxy.set('127.0.0.1:10809', '127.*;10.*;172.16.*') # Turn proxy settings on with server and bypass.\r\nTrue\r\n>>> sysproxy.daemon_off() # Turn proxy daemon off.\r\nTrue\r\n>>> sysproxy.daemon_on_() # Turn proxy daemon on. You should launch this function in a Python thread.\r\n```\r\n\r\n## sysproxy daemon\r\n\r\nWhen sysproxy daemon turned on, it executes a window-less WINAPI event loop that captures `WM_QUERYENDSESSION` message,\r\nwhich is sent when Windows is about to shutdown. When the message arrives, the daemon calls `off()`, which turns proxy\r\nsettings off.\r\n\r\nAs mentioned above, `sysproxy.daemon_on_()` will block current Python execution, so you should launch it in a Python\r\nthread.\r\n\r\n## Tested Platform\r\n\r\nsysproxy works on all reasonable Windows platform with all Python version(Python 3).\r\n\r\nBelow are tested build in [github actions](https://github.com/LorenEteval/sysproxy/actions).\r\n\r\n| Platform     | Python 3.6-Python 3.11 |\r\n|--------------|:----------------------:|\r\n| windows-2019 |   :heavy_check_mark:   |\r\n| windows-2022 |   :heavy_check_mark:   |\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python bindings for shadowsocks sysproxy utility.",
    "version": "0.1.4",
    "project_urls": {
        "Homepage": "https://github.com/LorenEteval/sysproxy"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7757bad0d02b18a8ebdfbdcdb25b295ee5b34b874a123e532a3260fb5fc60eeb",
                "md5": "2ad5724b9d002af3eb890207496b1786",
                "sha256": "e60864e559657f540d42794025120a106ba46e0a161cb543f3fe0b1938ca9d28"
            },
            "downloads": -1,
            "filename": "sysproxy-0.1.4-cp310-cp310-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "2ad5724b9d002af3eb890207496b1786",
            "packagetype": "bdist_wheel",
            "python_version": "cp310",
            "requires_python": null,
            "size": 54982,
            "upload_time": "2024-12-23T15:08:34",
            "upload_time_iso_8601": "2024-12-23T15:08:34.053373Z",
            "url": "https://files.pythonhosted.org/packages/77/57/bad0d02b18a8ebdfbdcdb25b295ee5b34b874a123e532a3260fb5fc60eeb/sysproxy-0.1.4-cp310-cp310-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "48603656d9ebe52ee00727012be00ef4e816cc119934607f293ef66f08584a64",
                "md5": "bae6b5cdb8c84bab8df914abeef11fd1",
                "sha256": "7df3de2f740273be7ac8474b58ebec3388319a673e4b2576583a1a281d7d5378"
            },
            "downloads": -1,
            "filename": "sysproxy-0.1.4-cp311-cp311-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "bae6b5cdb8c84bab8df914abeef11fd1",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": null,
            "size": 56107,
            "upload_time": "2024-12-23T15:08:36",
            "upload_time_iso_8601": "2024-12-23T15:08:36.714342Z",
            "url": "https://files.pythonhosted.org/packages/48/60/3656d9ebe52ee00727012be00ef4e816cc119934607f293ef66f08584a64/sysproxy-0.1.4-cp311-cp311-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "da12756f786fedd999e7bf7f633bbc9d2f56fff1f4c89971e7a0008fadd04b25",
                "md5": "f052119b39a992214b058e8537304a28",
                "sha256": "db902a9557adad01713e77da3b4d006c411a1c12192e40aca0e7dc6e5d721a4c"
            },
            "downloads": -1,
            "filename": "sysproxy-0.1.4-cp312-cp312-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "f052119b39a992214b058e8537304a28",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": null,
            "size": 56126,
            "upload_time": "2024-12-23T15:08:39",
            "upload_time_iso_8601": "2024-12-23T15:08:39.253819Z",
            "url": "https://files.pythonhosted.org/packages/da/12/756f786fedd999e7bf7f633bbc9d2f56fff1f4c89971e7a0008fadd04b25/sysproxy-0.1.4-cp312-cp312-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "32bf3e254befb690eb6963266df3ac0a7f2a4bc8e03007c40015d0d9280ef77e",
                "md5": "d48d7d551ceb1adcb2f0b7825da4e52a",
                "sha256": "cea86f44a79ac863dcfaa639ac35670841a44a7fa8005a11261b037cc1c913ea"
            },
            "downloads": -1,
            "filename": "sysproxy-0.1.4-cp313-cp313-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "d48d7d551ceb1adcb2f0b7825da4e52a",
            "packagetype": "bdist_wheel",
            "python_version": "cp313",
            "requires_python": null,
            "size": 55691,
            "upload_time": "2024-12-23T15:08:41",
            "upload_time_iso_8601": "2024-12-23T15:08:41.773594Z",
            "url": "https://files.pythonhosted.org/packages/32/bf/3e254befb690eb6963266df3ac0a7f2a4bc8e03007c40015d0d9280ef77e/sysproxy-0.1.4-cp313-cp313-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "177da63d883386db02ada146bace45993b651e7f01b08e367bba6ee9caca25f2",
                "md5": "9e6d282df5d4c071eff4dbdd9694eb2f",
                "sha256": "4213e901545e3f462a88ed5da9e8e7a90d00e05a2b418bde2cf5b1ab7247ac09"
            },
            "downloads": -1,
            "filename": "sysproxy-0.1.4-cp36-cp36m-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "9e6d282df5d4c071eff4dbdd9694eb2f",
            "packagetype": "bdist_wheel",
            "python_version": "cp36",
            "requires_python": null,
            "size": 97649,
            "upload_time": "2024-12-23T15:08:44",
            "upload_time_iso_8601": "2024-12-23T15:08:44.168627Z",
            "url": "https://files.pythonhosted.org/packages/17/7d/a63d883386db02ada146bace45993b651e7f01b08e367bba6ee9caca25f2/sysproxy-0.1.4-cp36-cp36m-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "59e586f715f99121828ce5660a228254116bd32603529a25a3f5241485ea7bf2",
                "md5": "5fce1448e72a6b32cec46280b1bb586b",
                "sha256": "897aafe7da5c2d29f7ffdccf086a4273e1edf15264d6c02ae42aba14354e6b3c"
            },
            "downloads": -1,
            "filename": "sysproxy-0.1.4-cp37-cp37m-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "5fce1448e72a6b32cec46280b1bb586b",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 55775,
            "upload_time": "2024-12-23T15:08:45",
            "upload_time_iso_8601": "2024-12-23T15:08:45.395389Z",
            "url": "https://files.pythonhosted.org/packages/59/e5/86f715f99121828ce5660a228254116bd32603529a25a3f5241485ea7bf2/sysproxy-0.1.4-cp37-cp37m-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7f77df2ecf25449844cb9d3ca3df917c0f60f17acc052ce1296771123434daff",
                "md5": "5a4134fc069d4de30e984a7f3345607e",
                "sha256": "e1507bfd477e6fc0fa2096ee5594943f0ff6a1646148116f35b7f74840fdc881"
            },
            "downloads": -1,
            "filename": "sysproxy-0.1.4-cp38-cp38-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "5a4134fc069d4de30e984a7f3345607e",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": null,
            "size": 55419,
            "upload_time": "2024-12-23T15:08:49",
            "upload_time_iso_8601": "2024-12-23T15:08:49.228103Z",
            "url": "https://files.pythonhosted.org/packages/7f/77/df2ecf25449844cb9d3ca3df917c0f60f17acc052ce1296771123434daff/sysproxy-0.1.4-cp38-cp38-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c4eca7dca9fc7e953ddccedd0345f8972baba7f30811f2bafa1a59ff04586fa9",
                "md5": "1764e6bd0ebb37e881923778b91130eb",
                "sha256": "db105a936dba0e902644e6d80ca6ec4a31e253e6ede496e6a7e62806bff5ee1a"
            },
            "downloads": -1,
            "filename": "sysproxy-0.1.4-cp39-cp39-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "1764e6bd0ebb37e881923778b91130eb",
            "packagetype": "bdist_wheel",
            "python_version": "cp39",
            "requires_python": null,
            "size": 55519,
            "upload_time": "2024-12-23T15:08:50",
            "upload_time_iso_8601": "2024-12-23T15:08:50.674163Z",
            "url": "https://files.pythonhosted.org/packages/c4/ec/a7dca9fc7e953ddccedd0345f8972baba7f30811f2bafa1a59ff04586fa9/sysproxy-0.1.4-cp39-cp39-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "31991114a157fe6f258e63ad18dd0317ef15564c669a29033280544078ddf0a9",
                "md5": "7eb1b16793ccb7fd545cb47dd3fdf8cd",
                "sha256": "267e5754d633623ce533d2c516a8412cf6f34c9902109a685ed76846ac97b26e"
            },
            "downloads": -1,
            "filename": "sysproxy-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "7eb1b16793ccb7fd545cb47dd3fdf8cd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4972,
            "upload_time": "2024-12-23T15:08:52",
            "upload_time_iso_8601": "2024-12-23T15:08:52.236854Z",
            "url": "https://files.pythonhosted.org/packages/31/99/1114a157fe6f258e63ad18dd0317ef15564c669a29033280544078ddf0a9/sysproxy-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-23 15:08:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "LorenEteval",
    "github_project": "sysproxy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "sysproxy"
}
        
Elapsed time: 3.42953s