Download the PHP package xiaosongshu/port-mapping without Composer

On this page you can find all versions of the php package xiaosongshu/port-mapping. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package port-mapping

端口映射

项目介绍

本项目主要用来代理http服务,提供端口映射服务,可以作为网关使用。 比如可以将很多域名解析到本服务器,然后由本服务器代理到其他任意服务器。 比如一台连接了公网的服务器,然后很多台内网服务器,那么可以使用公网服务器转发请求的到内网服务器。 本项目也可以代理公网ip,将需要代理的服务ip地址换成公网ip即可。 当然本项目也可以用作类似于nginx的负载均衡的功能,不过需要调整服务端和客户端以及配置文件。 原理就是给每一个被代理的服务器设置权重,当浏览器访问这个代理服务器的某个端口的时候,服务端根据权重给对应的客户端转发http请求。

项目安装

项目结构

|--config
  |-config.php              # 配置文件
|--temp_client_for_win      # windows环境 channel客户端运行目录
  |-tpl.php                 # windows环境 channel客户端模板文件
|--vendor                   # 扩展文件
  |-...
|--windows_server           # windows环境 服务端运行目录
  |-...
-   channel.php             # windows环境channel服务端文件
-   client.php              # linux环境channel客户端文件
-   client_for_win.bat      # windows环境启动文件
-   client_for_win.php      # windows环境 channel客户端生成器
-   common.php              # 公共函数
-   composer.json           # 项目依赖配置文件
-   composer.lock           # 项目依赖配置文件版本锁定文件
-   server.php              # linux环境服务端启动文件
-   server_for_win.php      # windows环境服务端模板文件
-   start_win_server.php    # windows环境服务端启动模板文件

配置

见config/config.php 。

启动

linux环境

启动服务端

启动客户端

windows环境

直接双击client_for_win.bat文件即可,

关闭服务

在窗口按ctrl+c 可以关闭服务。

联系作者

[email protected]


All versions of port-mapping with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
workerman/workerman Version ^4.1
workerman/channel Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package xiaosongshu/port-mapping contains the following files

Loading the files please wait ....