codeseasy/xpos-laravel 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

codeseasy/xpos-laravel

Composer 安装命令:

composer require codeseasy/xpos-laravel

包简介

Instant public URLs for Laravel development - XPOS tunnel integration

README 文档

README

Latest Version on Packagist Total Downloads License

Instant public URLs for Laravel development. Share your local Laravel app with a single command.

⚠️ This repository has been moved to
https://github.com/GetXPOS/laravel

All new releases, updates, and active development now happen there.

🌐 xpos.dev

Features

  • One Command Setup - Get a public URL instantly with php artisan xpos
  • Auto-Start Server - Automatically starts php artisan serve if not running
  • Secure HTTPS Tunnels - All traffic is encrypted via SSH
  • Zero Configuration - Works out of the box, configure only if needed
  • Auto-Proxy Detection - Automatically configures TrustProxies for correct HTTPS URLs
  • Laravel 10, 11, 12 - Full support for modern Laravel versions

Use Cases

  • 🔗 Test webhooks from third-party services (Stripe, GitHub, etc.)
  • 📱 Test your app on mobile devices
  • 👥 Share work-in-progress with clients or team members
  • 🌐 Demo your local app without deploying
  • 🔧 Debug integrations requiring public callbacks

Installation

composer require codeseasy/xpos-laravel --dev

Usage

php artisan xpos

That's it! The command will:

  1. Start php artisan serve if not already running
  2. Create an SSH tunnel to XPOS
  3. Display your public URL (e.g., https://abc123.xpos.to)

Options

# Use a specific port
php artisan xpos --port=8080

# Use an existing server (don't start artisan serve)
php artisan xpos --no-serve --port=8000

# Bind to a specific host
php artisan xpos --host=0.0.0.0

Configuration

Publish the config file:

php artisan vendor:publish --tag=xpos-config

Config options in config/xpos.php:

return [
    'server' => 'go.xpos.dev',    // XPOS server
    'ssh_port' => 443,            // SSH port
    'default_port' => 8000,       // Default dev server port
    'trust_proxies' => true,      // Auto-configure HTTPS
];

HTTPS Support

The package automatically configures Laravel's TrustProxies middleware so that asset(), url(), and other helpers generate HTTPS URLs when accessed through an XPOS tunnel.

Requirements

  • PHP 8.1+
  • Laravel 10, 11, or 12
  • SSH client available in PATH

.gitignore

Add .xpos.pid to your project's .gitignore:

.xpos.pid

How It Works

  1. Serve Detection: Uses a .xpos.pid file to track which port belongs to your project
  2. SSH Tunnel: Connects to XPOS using ssh -p 443 -R0:127.0.0.1:PORT x@go.xpos.dev
  3. HTTPS: Auto-configures TrustProxies so assets load correctly

Troubleshooting

Port already in use?

# Use a different port
php artisan xpos --port=8001

SSH connection issues?

  • Ensure SSH client is installed and available in PATH
  • Check firewall settings for port 443

HTTPS URLs not working?

  • Make sure trust_proxies is set to true in config/xpos.php
  • Clear config cache: php artisan config:clear

Security

This package is intended for development use only. Do not use in production environments. All traffic goes through XPOS servers via encrypted SSH tunnels.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

Credits

License

MIT License. See LICENSE for details.

codeseasy/xpos-laravel 适用场景与选型建议

codeseasy/xpos-laravel 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 12 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 12 月 24 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「development」 「laravel」 「localhost」 「tunnel」 「share」 「xpos」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 codeseasy/xpos-laravel 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 codeseasy/xpos-laravel 我们能提供哪些服务?
定制开发 / 二次开发

基于 codeseasy/xpos-laravel 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 12
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 24
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-12-24