{"id":19593923,"url":"https://github.com/loreneteval/xray-core-python","last_synced_at":"2026-01-18T15:10:59.223Z","repository":{"id":183390765,"uuid":"670085136","full_name":"LorenEteval/Xray-core-python","owner":"LorenEteval","description":"Python bindings for Xray-core.","archived":false,"fork":false,"pushed_at":"2026-01-16T13:10:11.000Z","size":2988,"stargazers_count":38,"open_issues_count":5,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-01-17T03:42:18.170Z","etag":null,"topics":["cpp","golang","proxy","pybind11","python","reality","socks5","tunnel","vless","vmess","xray-core","xtls"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LorenEteval.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-07-24T09:04:02.000Z","updated_at":"2026-01-16T13:08:09.000Z","dependencies_parsed_at":"2024-05-28T04:45:58.890Z","dependency_job_id":"314510a4-c139-4a5a-aad9-a99b20c8b7c0","html_url":"https://github.com/LorenEteval/Xray-core-python","commit_stats":null,"previous_names":["loreneteval/xray-core-python"],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/LorenEteval/Xray-core-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LorenEteval%2FXray-core-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LorenEteval%2FXray-core-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LorenEteval%2FXray-core-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LorenEteval%2FXray-core-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LorenEteval","download_url":"https://codeload.github.com/LorenEteval/Xray-core-python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LorenEteval%2FXray-core-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28539125,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T14:59:57.589Z","status":"ssl_error","status_checked_at":"2026-01-18T14:59:46.540Z","response_time":98,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cpp","golang","proxy","pybind11","python","reality","socks5","tunnel","vless","vmess","xray-core","xtls"],"created_at":"2024-11-11T08:41:46.353Z","updated_at":"2026-01-18T15:10:59.217Z","avatar_url":"https://github.com/LorenEteval.png","language":"Go","readme":"# Xray-core-python\n\n[![Deploy PyPI](https://github.com/LorenEteval/Xray-core-python/actions/workflows/deploy-pypi.yml/badge.svg?branch=main)](https://github.com/LorenEteval/Xray-core-python/actions/workflows/deploy-pypi.yml)\n\nPython bindings for [Xray-core](https://github.com/XTLS/Xray-core).\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 \u0026\u0026 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 Xray-core\n```\n\n## API\n\n```pycon\n\u003e\u003e\u003e import xray\n\u003e\u003e\u003e help(xray) \nHelp on package xray:                                                                                                                                                                                       \n\nNAME\n    xray\n\nPACKAGE CONTENTS\n    xray\n\nFUNCTIONS\n    queryStats(...) method of builtins.PyCapsule instance\n        queryStats(apiServer: str, timeout: int, myPattern: str, reset: bool) -\u003e str\n\n        Query statistics from Xray\n\n    startFromJSON(...) method of builtins.PyCapsule instance\n        startFromJSON(json: str) -\u003e None\n\n        Start Xray client with JSON string\n```\n\n## Source Code Modification\n\nThis repository, including the package that distributes to pypi,\ncontains [Xray-core](https://github.com/XTLS/Xray-core) 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 Xray-core.\n\nTo make installation of this package easier, I didn't add the original [Xray-core](https://github.com/XTLS/Xray-core)\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\nXray-core-python works on all major platform with all Python version(Python 3).\n\nBelow are tested build in [github actions](https://github.com/LorenEteval/Xray-core-python/actions).\n\n| Platform     | Python 3.8-Python 3.14 |\n|--------------|:----------------------:|\n| ubuntu 22.04 |   :heavy_check_mark:   |\n| ubuntu 24.04 |   :heavy_check_mark:   |\n| windows-2019 |   :heavy_check_mark:   |\n| windows-2022 |   :heavy_check_mark:   |\n| windows-2025 |   :heavy_check_mark:   |\n| macos-13     |   :heavy_check_mark:   |\n| macos-14     |   :heavy_check_mark:   |\n| macos-15     |   :heavy_check_mark:   |\n\n## License\n\nThe license for this project follows its original go repository [Xray-core](https://github.com/XTLS/Xray-core)\nand is under [MPL 2.0](https://github.com/LorenEteval/Xray-core-python/blob/main/LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floreneteval%2Fxray-core-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floreneteval%2Fxray-core-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floreneteval%2Fxray-core-python/lists"}