tun2socks


Nametun2socks JSON
Version 2.5.2.3 PyPI version JSON
download
home_pagehttps://github.com/LorenEteval/tun2socks-python
SummaryPython bindings for go tun2socks.
upload_time2025-02-04 09:54:12
maintainerNone
docs_urlNone
authorLoren Eteval
requires_pythonNone
licenseGPL v3.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # tun2socks-python

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

Python bindings for [tun2socks](https://github.com/xjasonlyu/tun2socks).

## Install

### Core Building Tools

You have to install the following tools to be able to install this package successfully.

* [go](https://go.dev/doc/install) in your PATH. go 1.20.0 and above is recommended. To check go is ready,
  type `go version`. Also, if google service is blocked in your region(such as Mainland China), you have to configure
  your GOPROXY to be able to pull go packages. For Chinese users, refer to [goproxy.cn](https://goproxy.cn/) for more
  information.
* [cmake](https://cmake.org/download/) in your PATH. To check cmake is ready, type `cmake --version`.
* A working GNU C++ compiler(i.e. GNU C++ toolchains). To check GNU C++ compiler is ready, type `g++ --version`. These
  tools should have been installed in Linux or macOS by default. If you don't have GNU C++ toolchains(especially for
  Windows users) anyway:

    * For Linux users: type `sudo apt update && sudo apt install g++` and that should work out fine.
    * For Windows users: install [MinGW-w64](https://sourceforge.net/projects/mingw-w64/files/mingw-w64/)
      or [Cygwin](https://www.cygwin.com/) and make sure you have add them to PATH.

### Install Package

```
pip install tun2socks
```

## API

```pycon
>>> import tun2socks
>>> help(tun2socks) 
Help on package tun2socks:                                                                                                                                                                                    

NAME
    tun2socks

PACKAGE CONTENTS
    tun2socks

FUNCTIONS
    startFromArgs(...) method of builtins.PyCapsule instance
        startFromArgs(device: str, networkInterface: str, logLevel: str, proxy: str, restAPI: str) -> None

        Start tun2socks with custom arguments

VERSION
    2.5.1
```

## Source Code Modification

This repository, including the package that distributes to pypi,
contains [tun2socks](https://github.com/xjasonlyu/tun2socks) source code that's been
modified to build the binding and specific API. If without explicitly remark, the version of this package corresponds to
the version of the origin source code tag, so the binding will have full features as the original go distribution will
have. And due to its backward compatibility, there's no plan to generate bindings for older release of tun2socks.

To make installation of this package easier, I didn't add the
original [tun2socks](https://github.com/xjasonlyu/tun2socks)
source code as a submodule. To track what modifications have been made to the source code, you can compare it with the
same version under Python binding and corresponding go repository.

## Tested Platform

tun2socks-python works on all major platform with all Python version(Python 3).

Below are tested build in [github actions](https://github.com/LorenEteval/tun2socks-python/actions).

| Platform     | Python 3.7-Python 3.11 |
|--------------|:----------------------:|
| ubuntu 20.04 |   :heavy_check_mark:   |
| ubuntu 22.04 |   :heavy_check_mark:   |
| windows-2019 |   :heavy_check_mark:   |
| windows-2022 |   :heavy_check_mark:   |
| macos-11     |   :heavy_check_mark:   |
| macos-12     |   :heavy_check_mark:   |
| macos-13     |   :heavy_check_mark:   |

## License

The license for this project follows its original go repository [tun2socks](https://github.com/xjasonlyu/tun2socks) and
is under [GPL v3.0](https://github.com/LorenEteval/tun2socks-python/blob/main/LICENSE).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/LorenEteval/tun2socks-python",
    "name": "tun2socks",
    "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/72/8d/374e1dda71160caaa963a18374c210bf9b03eb64a76dd9481804adce4b21/tun2socks-2.5.2.3.tar.gz",
    "platform": null,
    "description": "# tun2socks-python\n\n[![Deploy PyPI](https://github.com/LorenEteval/tun2socks-python/actions/workflows/deploy-pypi.yml/badge.svg?branch=main)](https://github.com/LorenEteval/tun2socks-python/actions/workflows/deploy-pypi.yml)\n\nPython bindings for [tun2socks](https://github.com/xjasonlyu/tun2socks).\n\n## Install\n\n### Core Building Tools\n\nYou have to install the following tools to be able to install this package successfully.\n\n* [go](https://go.dev/doc/install) in your PATH. go 1.20.0 and above is recommended. To check go is ready,\n  type `go version`. Also, if google service is blocked in your region(such as Mainland China), you have to configure\n  your GOPROXY to be able to pull go packages. For Chinese users, refer to [goproxy.cn](https://goproxy.cn/) for more\n  information.\n* [cmake](https://cmake.org/download/) in your PATH. To check cmake is ready, type `cmake --version`.\n* A working GNU C++ compiler(i.e. GNU C++ toolchains). To check GNU C++ compiler is ready, type `g++ --version`. These\n  tools should have been installed in Linux or macOS by default. If you don't have GNU C++ toolchains(especially for\n  Windows users) anyway:\n\n    * For Linux users: type `sudo apt update && sudo apt install g++` and that should work out fine.\n    * For Windows users: install [MinGW-w64](https://sourceforge.net/projects/mingw-w64/files/mingw-w64/)\n      or [Cygwin](https://www.cygwin.com/) and make sure you have add them to PATH.\n\n### Install Package\n\n```\npip install tun2socks\n```\n\n## API\n\n```pycon\n>>> import tun2socks\n>>> help(tun2socks) \nHelp on package tun2socks:                                                                                                                                                                                    \n\nNAME\n    tun2socks\n\nPACKAGE CONTENTS\n    tun2socks\n\nFUNCTIONS\n    startFromArgs(...) method of builtins.PyCapsule instance\n        startFromArgs(device: str, networkInterface: str, logLevel: str, proxy: str, restAPI: str) -> None\n\n        Start tun2socks with custom arguments\n\nVERSION\n    2.5.1\n```\n\n## Source Code Modification\n\nThis repository, including the package that distributes to pypi,\ncontains [tun2socks](https://github.com/xjasonlyu/tun2socks) source code that's been\nmodified to build the binding and specific API. If without explicitly remark, the version of this package corresponds to\nthe version of the origin source code tag, so the binding will have full features as the original go distribution will\nhave. And due to its backward compatibility, there's no plan to generate bindings for older release of tun2socks.\n\nTo make installation of this package easier, I didn't add the\noriginal [tun2socks](https://github.com/xjasonlyu/tun2socks)\nsource code as a submodule. To track what modifications have been made to the source code, you can compare it with the\nsame version under Python binding and corresponding go repository.\n\n## Tested Platform\n\ntun2socks-python works on all major platform with all Python version(Python 3).\n\nBelow are tested build in [github actions](https://github.com/LorenEteval/tun2socks-python/actions).\n\n| Platform     | Python 3.7-Python 3.11 |\n|--------------|:----------------------:|\n| ubuntu 20.04 |   :heavy_check_mark:   |\n| ubuntu 22.04 |   :heavy_check_mark:   |\n| windows-2019 |   :heavy_check_mark:   |\n| windows-2022 |   :heavy_check_mark:   |\n| macos-11     |   :heavy_check_mark:   |\n| macos-12     |   :heavy_check_mark:   |\n| macos-13     |   :heavy_check_mark:   |\n\n## License\n\nThe license for this project follows its original go repository [tun2socks](https://github.com/xjasonlyu/tun2socks) and\nis under [GPL v3.0](https://github.com/LorenEteval/tun2socks-python/blob/main/LICENSE).\n",
    "bugtrack_url": null,
    "license": "GPL v3.0",
    "summary": "Python bindings for go tun2socks.",
    "version": "2.5.2.3",
    "project_urls": {
        "Homepage": "https://github.com/LorenEteval/tun2socks-python"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "728d374e1dda71160caaa963a18374c210bf9b03eb64a76dd9481804adce4b21",
                "md5": "8a27f1fac643dec31868e1104290d608",
                "sha256": "e4d3ca04cb16bcae9fc841259c644358447452c9e7732ac022ad26e6b7903632"
            },
            "downloads": -1,
            "filename": "tun2socks-2.5.2.3.tar.gz",
            "has_sig": false,
            "md5_digest": "8a27f1fac643dec31868e1104290d608",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 596953,
            "upload_time": "2025-02-04T09:54:12",
            "upload_time_iso_8601": "2025-02-04T09:54:12.353800Z",
            "url": "https://files.pythonhosted.org/packages/72/8d/374e1dda71160caaa963a18374c210bf9b03eb64a76dd9481804adce4b21/tun2socks-2.5.2.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-04 09:54:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "LorenEteval",
    "github_project": "tun2socks-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "tun2socks"
}
        
Elapsed time: 1.12193s