鹊桥(内网穿透工具)

介绍

使用java实现的内网穿透工具,致力于帮助开发者内网开发供外部调试使用。

软件架构

鹊桥软件架构图

安装教程

1.准备公网(假设公网ip=10.1.1.22)服务器,安装openjdk1.7+

下载发行版本(magpiebridge-server-0.0.1.tar.gz)服务端

解压magpiebridge-server-0.0.1.tar.gz到指定目录

(tar -zxvf magpiebridge-server-0.0.1.tar.gz -C /usr/local/magpiebridge-server)

解压后目录及文件结构如下:

   \_bin
       |_startup.sh
       |_stop.sh
   \_conf
       |_cfg.properties
   \_lib
       |_magpiebridge-common-0.0.1.jar
       |_magpiebridge-server-0.0.1.jar
   \_logs

配置服务端端口(供客户端连接使用)、代理端端口(对外服务端口)

(vim /usr/local/magpiebridge-server/conf/cfg.properties)

  # server
  # 服务端IP及端口
  server.ip=0.0.0.0
  server.port=9799
  # 代理端端口映射内网具体端口
  server.10001.mappings=0.0.0.0:13389/192.168.1.102:3389,0.0.0.0:13306/127.0.0.1:3306

如上10001(客户端的密钥)供客户端配置使用,来确认打开具体代理端口

用户访问公网服务器的13389端口会被转发请求到内网IP(192.168.1.102)3389端口

同样用户访问公网服务器的13306端口会被转发请求到内网IP(127.0.0.1即客户端允许机器)3306端口

启动服务端及代理端

  /usr/local/magpiebridge-server/bin/startup.sh

关闭服务端及代理端

  /usr/local/magpiebridge-server/bin/stop.sh

2.准备内网服务器,安装openjdk1.7+

下载发行版本(magpiebridge-client-0.0.1.tar.gz)服务端

解压magpiebridge-client-0.0.1.tar.gz到指定目录

(tar -zxvf magpiebridge-client-0.0.1.tar.gz -C /usr/local/magpiebridge-client)

解压后目录及文件结构如下:

   \_bin
       |_startup.sh
       |_stop.sh
   \_conf
       |_cfg.properties
   \_lib
       |_magpiebridge-common-0.0.1.jar
       |_magpiebridge-client-0.0.1.jar
   \_logs

配置客户端的服务端IP及端口

(vim /usr/local/magpiebridge-client/conf/cfg.properties)

  # server info
  # 配置公网服务器的服务端IP及端口
  server.ip=10.1.1.22
  server.port=9799

  # 配置(服务端对应客户端的密钥)
  client.key=10001
启动客户端
  /usr/local/magpiebridge-client/bin/startup.sh
关闭客户端
  /usr/local/magpiebridge-client/bin/stop.sh

开源许可协议

1.GNU General Public License v2.0

3

评论

  1. 异常记录 HTTP Status 500 - type Exception report message description The server encountered an internal error that prevented it from fulfilling this request. exception java.lang.reflect.UndeclaredThrowableException com.sun.proxy.$Proxy20.getBySite(Unknown Source) in.wenwen.handler.IndexHandler.before(IndexHandler.java:64) org.jiucheng.web.filter.DispatcherFilter.doFilter(DispatcherFilter.java:56) org.jiucheng.web.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:34) root cause org.jiucheng.aop.AopException: java.lang.reflect.UndeclaredThrowableException org.jiucheng.aop.MethodInvocation.proceed(MethodInvocation.java:60) org.jiucheng.orm.interceptor.Close.invoke(Close.java:11) org.jiucheng.aop.AopProxy.result(AopProxy.java:50) org.jiucheng.aop.AopProxy.invoke(AopProxy.java:39) com.sun.proxy.$Proxy20.getBySite(Unknown Source) in.wenwen.handler.IndexHandler.before(IndexHandler.java:64) org.jiucheng.web.filter.DispatcherFilter.doFilter(DispatcherFilter.java:56) org.jiucheng.web.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:34) root cause java.lang.reflect.UndeclaredThrowableException com.sun.proxy.$Proxy9.list(Unknown Source) org.jiucheng.plugin.db.BaseServiceImpl.list(BaseServiceImpl.java:30) in.wenwen.service.impl.DomainServiceImpl.getBySite(DomainServiceImpl.java:19) sun.reflect.GeneratedMethodAccessor58.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:606) org.jiucheng.aop.MethodInvocation.proceed(MethodInvocation.java:54) org.jiucheng.orm.interceptor.Close.invoke(Close.java:11) org.jiucheng.aop.AopProxy.result(AopProxy.java:50) org.jiucheng.aop.AopProxy.invoke(AopProxy.java:39) com.sun.proxy.$Proxy20.getBySite(Unknown Source) in.wenwen.handler.IndexHandler.before(IndexHandler.java:64) org.jiucheng.web.filter.DispatcherFilter.doFilter(DispatcherFilter.java:56) org.jiucheng.web.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:34) root cause org.jiucheng.aop.AopException: java.lang.IllegalMonitorStateException org.jiucheng.aop.MethodInvocation.proceed(MethodInvocation.java:60) org.jiucheng.aop.AopProxy.invoke(AopProxy.java:41) com.sun.proxy.$Proxy9.list(Unknown Source) org.jiucheng.plugin.db.BaseServiceImpl.list(BaseServiceImpl.java:30) in.wenwen.service.impl.DomainServiceImpl.getBySite(DomainServiceImpl.java:19) sun.reflect.GeneratedMethodAccessor58.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:606) org.jiucheng.aop.MethodInvocation.proceed(MethodInvocation.java:54) org.jiucheng.orm.interceptor.Close.invoke(Close.java:11) org.jiucheng.aop.AopProxy.result(AopProxy.java:50) org.jiucheng.aop.AopProxy.invoke(AopProxy.java:39) com.sun.proxy.$Proxy20.getBySite(Unknown Source) in.wenwen.handler.IndexHandler.before(IndexHandler.java:64) org.jiucheng.web.filter.DispatcherFilter.doFilter(DispatcherFilter.java:56) org.jiucheng.web.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:34) root cause java.lang.IllegalMonitorStateException java.lang.Object.notifyAll(Native Method) org.jiucheng.orm.PoolDataSource.getPoolConnection0(PoolDataSource.java:121) org.jiucheng.orm.PoolDataSource.getPoolConnection(PoolDataSource.java:82) org.jiucheng.orm.PoolDataSource.getConnection(PoolDataSource.java:78) org.jiucheng.orm.PoolDataSource.getConnection(PoolDataSource.java:73) org.jiucheng.plugin.db.ManagerConnection.get(ManagerConnection.java:76) org.jiucheng.plugin.db.BaseDaoImpl.getConn(BaseDaoImpl.java:43) org.jiucheng.plugin.db.BaseDaoImpl.list(BaseDaoImpl.java:39) sun.reflect.GeneratedMethodAccessor37.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:606) org.jiucheng.aop.MethodInvocation.proceed(MethodInvocation.java:54) org.jiucheng.aop.AopProxy.invoke(AopProxy.java:41) com.sun.proxy.$Proxy9.list(Unknown Source) org.jiucheng.plugin.db.BaseServiceImpl.list(BaseServiceImpl.java:30) in.wenwen.service.impl.DomainServiceImpl.getBySite(DomainServiceImpl.java:19) sun.reflect.GeneratedMethodAccessor58.invoke(Unknown Source) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) java.lang.reflect.Method.invoke(Method.java:606) org.jiucheng.aop.MethodInvocation.proceed(MethodInvocation.java:54) org.jiucheng.orm.interceptor.Close.invoke(Close.java:11) org.jiucheng.aop.AopProxy.result(AopProxy.java:50) org.jiucheng.aop.AopProxy.invoke(AopProxy.java:39) com.sun.proxy.$Proxy20.getBySite(Unknown Source) in.wenwen.handler.IndexHandler.before(IndexHandler.java:64) org.jiucheng.web.filter.DispatcherFilter.doFilter(DispatcherFilter.java:56) org.jiucheng.web.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:34) note The full stack trace of the root cause is available in the Apache Tomcat/6.0.44 logs. Apache Tomcat/6.0.44

  2. 51151

  3. 文章不错非常喜欢

发表评论

电子邮件地址不会被公开。 必填项已用*标注

点击更换