Skip to main content

Expose web services on internal servers through a cloud relay with a dashboard and reverse proxy over WebSocket tunnels.

Project description

Kite - 反向隧道服务注册系统

将内网服务器上的 Web 服务通过云服务器暴露给外部访问。Raw TCP 隧道,零 HTTP 解析,完全透明。

架构

Browser ──HTTP──► X:10001 ──raw TCP tunnel──► Server-A localhost:3000
Browser ──HTTP──► X:10002 ──raw TCP tunnel──► Server-B localhost:8888

Dashboard:        X:8080

每个服务分配独立端口,浏览器直连。不解析、不改写、不编码任何 HTTP 内容。

安装

pip install kite-strings

使用

1. 在云服务器 X 上启动 Server

kite-server --port 8080 --tunnel-port 8081 --proxy-port-start 10001
参数 默认值 说明
--port 8080 Dashboard 端口
--tunnel-port 8081 隧道连接端口(Client 连接用)
--proxy-port-start 10001 代理端口范围起始
--proxy-port-end 10100 代理端口范围结束

2. 在内网服务器上启动 Client

kite-client --server ws://X:8080/ws --port 3000 --name "my-api"
参数 必填 说明
--server Server 的 WebSocket 地址
--port 本地 Web 服务端口
--name 服务显示名称(默认 hostname:port)
--tunnel 隧道地址(默认从 --server 推导)

3. 访问

  • Dashboardhttp://X:8080 查看服务列表
  • 服务访问:点击 Dashboard 中的链接(如 http://X:10001/

原理

  1. Client 通过 WebSocket 注册,Server 分配独立端口
  2. Client 维护一组到 Server 的 raw TCP 隧道连接池
  3. 浏览器连接分配的端口时,Server 激活一条隧道
  4. Client 连接本地服务,双向 pipe raw TCP 字节
  5. 完全透明 —— SPA、WebSocket、SSE、gzip 全部正常工作

防火墙要求

Server X 需要开放:

  • Dashboard 端口(默认 8080)
  • Tunnel 端口(默认 8081)
  • 代理端口范围(默认 10001-10100)

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

kite_strings-0.2.1.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

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

kite_strings-0.2.1-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file kite_strings-0.2.1.tar.gz.

File metadata

  • Download URL: kite_strings-0.2.1.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for kite_strings-0.2.1.tar.gz
Algorithm Hash digest
SHA256 21dd28694c40428d66ff97486d1bea65618d1b0416738a19afa223b69e46d502
MD5 da1566190d51b2ff7d65a3da1a60db31
BLAKE2b-256 a011e7644ff54180d52d96b2bac1a07cf222d7b13cba773033056a88634993ec

See more details on using hashes here.

File details

Details for the file kite_strings-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: kite_strings-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for kite_strings-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d05af6ee30e1fa24c0a301e95a2d9ca67029be71afb1b9a38d85fbb20285ceba
MD5 f75d8357c7892b73fd6b785fe66b9df2
BLAKE2b-256 6d5f91cb028aa670a65dd9849c8a4c798a995fd9a0ccc078781e69547c2b6e63

See more details on using hashes here.

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