Skip to main content

浏览器代理服务器

Project description

Orion Sandbox

Orion是一个提供终端模拟器和浏览器代理功能的服务器。它可以作为独立服务运行,也可以作为Python包导入使用。


## 使用方法

### 作为服务使用

#### 方法1: 使用命令行工具

安装后,可以直接使用命令行工具启动服务:

```bash
# 使用默认配置启动
orion-server

# 指定端口和日志级别
orion-server --port 8888 --log-level debug

# 开发模式(自动重载)
orion-server --reload

方法2: 使用Python脚本启动

python start_server.py --port 8330

作为库导入使用

可以将Orion作为Python库导入使用,示例代码:

import asyncio
from app import BrowserManager, terminal_manager, text_editor

# 初始化浏览器管理器
async def browser_example():
    browser = BrowserManager(headless=False)
    await browser.initialize()
    # 执行浏览器操作...
    await browser.close()

# 使用终端管理器
async def terminal_example():
    terminal = await terminal_manager.create_or_get_terminal("my_terminal")
    await terminal.execute_command("ls -la")
    history = terminal.get_history(True, True)
    # 处理终端输出...

# 运行示例
asyncio.run(browser_example())

更多示例请参考 examples/use_as_package.py

Docker部署

# 构建容器
docker build -t orion-server .

# 运行容器
docker run -p 8330:8330 orion-server

API文档

启动服务后,访问 http://localhost:8330/docs 查看API文档。

许可证

MIT

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

orion_browser-0.4.0.tar.gz (387.5 kB view details)

Uploaded Source

Built Distribution

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

orion_browser-0.4.0-py3-none-any.whl (425.5 kB view details)

Uploaded Python 3

File details

Details for the file orion_browser-0.4.0.tar.gz.

File metadata

  • Download URL: orion_browser-0.4.0.tar.gz
  • Upload date:
  • Size: 387.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for orion_browser-0.4.0.tar.gz
Algorithm Hash digest
SHA256 fd8917fa03c4d4bc5a69c44e0c23ee410566f41f9e1e8ed518e279179150aaaa
MD5 e3fc30e5f6b6ccaa296f847a2d6ec140
BLAKE2b-256 a97ee05f47dab6ccc820fc7e9848695fcdba1af1de311fb74d726fcee85209f0

See more details on using hashes here.

File details

Details for the file orion_browser-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: orion_browser-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 425.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for orion_browser-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8cda25ed49262d02e05367d5b2d96b8409bc4c9b6596b8de89df88f9947896b1
MD5 3e5990d9d1a079ed6994198fd7550f66
BLAKE2b-256 fb49d89b24222638e5628ffbcc5360eb35b08d559ee80265f7a32bf537bb1b6c

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