Skip to main content

No project description provided

Project description

OpenFrpLib

based on OpenFrp OPENAPI
presented by LxHTT

这是一个封装了OpenFrp OPENAPI的Python库。

安装


pip install OpenFrpLib

开始使用


导入

import OpenFrpLib

设置是否绕过系统代理

from OpenFrpLib import BYPASS_SYSTEM_PROXY

BYPASS_SYSTEM_PROXY(True) # True为开启绕过, False不绕过

登录

现在会打开浏览器提示授权,授权后会返回SessionID和Authorization

from OpenFrpLib import login

# 用一个列表存取,方便记录SessionID和Authorization
LoginInfo = login()

获取用户信息

from OpenFrpLib import getUserInfo

getUserInfo(Authorization="Authorization内容", session="Session ID")

获取用户隧道列表

from OpenFrpLib import getUserProxies

getUserProxies(Authorization="Authorization内容", session="Session ID")

新建隧道

from OpenFrpLib import newProxy
# 含有Optional为可选
newProxy(Authorization: str,
         session: str,
         node_id: int,
         type: str,
         remote_port: int,
         local_addr: Optional[str] = "127.0.0.1",
         local_port: Optional[int] = 25565,
         domain_bind: Optional[str] = "",
         host_rewrite: Optional[str] = "",
         request_from: Optional[str] = "",
         custom: Optional[str] = "",
         dataGzip: Optional[bool] = False,
         dataEncrypt: Optional[bool] = False,
         url_route: Optional[str] = "",
         name: Optional[str] = f"OfApp_{randint(30000, 99999)}",
         request_pass: Optional[str] = ""
        )

删除隧道

from OpenFrpLib import removeProxy
# 含有Optional为可选
removeProxy(Authorization="Authorization内容", session="Session ID", proxy_id="隧道ID")

获取节点列表

from OpenFrpLib import getNodeList
# 含有Optional为可选
getNodeList(Authorization="Authorization内容", session="Session ID")

编辑隧道

from OpenFrpLib import editProxy
# 含有Optional为可选
editProxy(Authorization: str,
          session: str,
          node_id: int,
          type: str,
          remote_port: int,
          proxy_id: int,
          local_addr: Optional[str] = "127.0.0.1",
          local_port: Optional[int] = 25565,
          domain_bind: Optional[str] = "",
          custom: Optional[str] = "",
          dataGzip: Optional[bool] = False,
          dataEncrypt: Optional[bool] = False,
          name: Optional[str] = f"OfApp_{randint(30000, 99999)}"
         )

签到

from OpenFrpLib import userSign

userSign(Authorization="Authorization内容", session="Session ID")
警告

请勿设计任何有关自动签到的相关功能,因为这是违反服务条款的行为,自动签到为滥用行为行为之一。

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

OpenFrpLib-1.4.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

OpenFrpLib-1.4.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file OpenFrpLib-1.4.0.tar.gz.

File metadata

  • Download URL: OpenFrpLib-1.4.0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for OpenFrpLib-1.4.0.tar.gz
Algorithm Hash digest
SHA256 b930a113786cd2201195f5ac982d5119875dc332d2cccc02e29cbccb4535e285
MD5 4fc56e4227ad9bbe0278c175fc897e7e
BLAKE2b-256 41f52c2dc7211951629f35adcdc36354051955ecaf9a97b91ab5e8ab67516302

See more details on using hashes here.

Provenance

The following attestation bundles were made for OpenFrpLib-1.4.0.tar.gz:

Publisher: publish-to-pypi.yml on LxHTT/OpenFrpLib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file OpenFrpLib-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: OpenFrpLib-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for OpenFrpLib-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 135ad4669f720fc4b40bc33a54caab2c1dde48649087c72aca0700dfb277761a
MD5 5db42dad02239e4796633d5788fe08cd
BLAKE2b-256 72a27d3fbe217979bf68c815b14dc47406de040563e496e6a07935c3162a0735

See more details on using hashes here.

Provenance

The following attestation bundles were made for OpenFrpLib-1.4.0-py3-none-any.whl:

Publisher: publish-to-pypi.yml on LxHTT/OpenFrpLib

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page