承接 inigo-aldama/inmovilla-api-proxy 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

inigo-aldama/inmovilla-api-proxy

Composer 安装命令:

composer create-project inigo-aldama/inmovilla-api-proxy

包简介

A proxy server for interacting with the Inmovilla API, designed for environments with restricted IP access.

README 文档

README

Latest Version PHP License

inmovilla-api-proxy is a tool designed to solve a specific problem when interacting with the Inmovilla API: IP-based access restrictions.

Note: This project is not affiliated with, endorsed by, or maintained by Inmovilla.

Why Use Inmovilla API Proxy?

Inmovilla restricts access to their API to specific IP addresses. This becomes a problem when you're developing from a machine outside the allowed IP range. Here's how the situation looks:

  • Production server with inmovilla-api-client installed
    ✅ Can connect to the Inmovilla API (IP is allowed).

  • Development machine with inmovilla-api-client installed
    ❌ Cannot connect to the Inmovilla API (IP is not allowed).

This package solves the issue by enabling the production server to act as a proxy. With inmovilla-api-proxy installed on the production server:

  1. Your development machine sends requests to the production server (acting as the proxy).
  2. The production server forwards these requests to the Inmovilla API.
  3. The response from the Inmovilla API is sent back to your development machine.

How It Works

Here’s a visual representation of the interaction flow between the Development Server, Production Server, and the Inmovilla API:

UML Diagram

Production Server

  • inmovilla-api-client is installed to send API requests to Inmovilla.
  • inmovilla-api-proxy is installed to act as a proxy for requests from the development machine.

Development Machine

  • inmovilla-api-client is installed to send requests to the proxy on the production server.

Example Flow

  1. Without Proxy

    • Development server → Direct connection to Inmovilla API → ❌ IP not allowed.
  2. With Proxy

    • Development server → Proxy on production server → Inmovilla API → ✅ Works.

Requirements

Installation

  1. Install the Proxy on the Production Server Clone the repository or use Composer:

    composer require inigo-aldama/inmovilla-api-proxy
  2. Configure API Credentials Update the api.ini configuration file on both servers (development and production):

    api.ini on the production server:

    api_url = "https://api.inmovilla.com/v1"
    domain = "production-domain.com"
    agency = "production-agency"
    password = "production-password"
    language = 1

    api.ini on the development server:

    api_url = "http://production-server-url/api-proxy"
    domain = "production-domain.com"
    agency = "development-agency"
    password = "development-password"
    language = 1

Usage

  1. On the Production Server Deploy inmovilla-api-proxy with the following setup:

    <?php
    
    require 'vendor/autoload.php';
    
    use Inmovilla\ApiClient\ApiClientConfig;
    use Inmovilla\Proxy\ProxyService;
    use GuzzleHttp\Client as GuzzleClient;
    use GuzzleHttp\Psr7\HttpFactory;
    
    $serverConfig = ApiClientConfig::fromIniFile(__DIR__ . '/config/api.ini');
    $httpClient = new GuzzleClient();
    $requestFactory = new HttpFactory();
    
    $proxyService = new ProxyService($httpClient, $requestFactory, $serverConfig);
    
    $input = file_get_contents('php://input');
    $response = $proxyService->handleRequest($input);
    
    header('Content-Type: application/json');
    echo json_encode($response);
  2. On the Development Machine Configure api_url to point to the production server's proxy, and use inmovilla-api-client as usual.

Key Points

  • The proxy must be installed on the production server; it's not needed on the development machine.
  • The api.ini configuration must exist on both servers:
    • The production server uses the real Inmovilla API URL.
    • The development machine points api_url to the proxy URL.

Data Sent to Inmovilla API

When using the proxy, the following data is sent to Inmovilla:

  • api_url: From the production server.
  • domain: From the production server.
  • agency: From the development machine.
  • password: From the development machine.
  • language: From the development machine.

Testing

Run PHPUnit tests to validate functionality:

./vendor/bin/phpunit --testdox

Contribution

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/new-feature).
  3. Commit your changes (git commit -m 'Add new feature').
  4. Push to your branch (git push origin feature/new-feature).
  5. Open a pull request.

License

This project is licensed under the MIT License.

Credits

inigo-aldama/inmovilla-api-proxy 适用场景与选型建议

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

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

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

围绕 inigo-aldama/inmovilla-api-proxy 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-12-19