使用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
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 HOLER_ACCESS_KEY:
设置HOLER_ACCESS_KEY:
HOLER_ACCESS_KEY=HOLER_CLIENT-2F8D8B78B3C2A0AE
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 | holer.org:65530 | 127.0.0.1:8080 |
HOLER_CLIENT-3C07CDFD1BF99BF2 | holer.org:65531 | 127.0.0.1:8088 |
HOLER_CLIENT-2A623FCB6E2A7D1D | holer.org: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://holer.org: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://holer.org:65531
重启Holer,然后就可以通过URL http://holer.org:65531
来访问您的Web应用。