使用Holer将本地端口映射到公网

What is holer

Holer exposes local servers behind NATs and firewalls to the public internet over secure tunnels.
Support forwarding message based on TCP protocol.

Holer是一个将局域网服务器代理到公网的内网穿透工具,支持转发基于TCP协议的报文。

工具地址:https://github.com/Wisdom-Projects/holer

Demo

How it works

1. Download software package holer-client.zip;

    下载软件包holer-client.zip

2. Install Java 1.7 or higher version;

    使用前请先安装Java 1.7或者更高版本;

3. Unzip holer-client.zip, modify configuration file

    解压holer-client.zip,修改配置文件

    holer-client/conf/holer.conf

    Set the following configurations:
    设置以下配置:

    HOLER_ACCESS_KEY=HOLER_CLIENT-2F8D8B78B3C2A0AE
    HOLER_SERVER_HOST=106.14.70.153
    HOLER_SERVER_PORT=6060

4. Start holer

    启动Holer服务
    cd holer-client/bin

    Windows:
    Run command startup.bat or double click startup.bat

    Linux:
    Run command sh startup.sh

5. Internet and local address mapping

    公网和内网的地址映射关系

Holer Access Key Internet Address Local Address
HOLER_CLIENT-2F8D8B78B3C2A0AE 106.14.70.153:65530 127.0.0.1:8080
HOLER_CLIENT-3C07CDFD1BF99BF2 106.14.70.153:65531 127.0.0.1:8088
HOLER_CLIENT-2A623FCB6E2A7D1D 106.14.70.153:65532 127.0.0.1:80

6. Demo

    使用示例
    If your tomcat program local URL:
    如果您本地的tomcat服务地址:
    http://127.0.0.1:8088

    Exposes to the public internet URL:
    代理到公网上的服务地址为:
    http://106.14.70.153:65531

    Only need modify configuration file to set HOLER_ACCESS_KEY:
    只需要在配置文件里修改HOLER_ACCESS_KEY即可,其他配置项跟步骤3一致:
    holer-client/conf/holer.conf
    HOLER_ACCESS_KEY=HOLER_CLIENT-3C07CDFD1BF99BF2

    Restart holer, then you can visit you web application through URL http://106.14.70.153:65531
    重启Holer,然后就可以通过URL http://106.14.70.153:65531来访问您的Web应用。

    Note: Only need to set HOLER_ACCESS_KEY,
    for HOLER_SERVER_HOST and HOLER_SERVER_PORT please keep consistent with step 3.

    注意: 这里只需要修改HOLER_ACCESS_KEY即可, HOLER_SERVER_HOSTHOLER_SERVER_PORT设置跟步骤3保持一致。

猜你喜欢

转载自www.cnblogs.com/witpool/p/8908274.html