Skip to content

Commit

Permalink
完善README
Browse files Browse the repository at this point in the history
  • Loading branch information
ffay committed Aug 31, 2017
1 parent df373d9 commit 8c76688
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 28 deletions.
59 changes: 34 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ lanproxy是一个将局域网个人电脑、服务器代理到公网的内网穿

#### 配置

##### server
##### server配置

server的配置文件放置在conf目录中,配置 config.properties

Expand All @@ -25,46 +25,50 @@ server.bind=0.0.0.0
#与代理客户端通信端口
server.port=4900

#代理配置服务相关信息
#ssl相关配置
server.ssl.enable=false
server.ssl.bind=0.0.0.0
server.ssl.port=4993
server.ssl.jksPath=test.jks
server.ssl.keyStorePassword=123456
server.ssl.keyManagerPassword=123456
server.ssl.needsClientAuth=false

#WEB在线配置管理相关信息
config.server.bind=0.0.0.0
config.server.port=8090
config.admin.username=admin
config.admin.password=admin

```

代理配置,打开地址 http://ip:8090 ,使用上面配置中配置的用户名密码登录,进入如下代理配置界面

![webconfig](webconfig.png)

```js
[
{
"clientKey":"client_01",//一个proxy-server可以支持多个client连接,通过client_key区分
"proxyMappings":[//支持同时配置多个代理映射
{
"inetPort":8080,//公网端口,本配置表示访问公网ip的8080端口将代理到内网192.168.1.5的8080端口
"lan":"192.168.1.5:8080" // 要代理的后端服务器
}
]
}
//支持同时配置多个client
]
```
![webconfig](webconfig01.jpeg)

> 配置存放在 ~/.lanproxy/config.json 文件中
![webconfig](webconfig02.jpeg)

##### client
> 一个server可以支持多个客户端连接
> 配置数据存放在 ~/.lanproxy/config.json 文件中
##### client配置

client的配置文件放置在conf目录中,配置 config.properties

```
#该配置项必须与服务器端client_key对应
client.key=client_01
```properties
#与proxy-server通信认证标识秘钥,可在server配置中心查看
client.key=e3150ad72f8a47859b8c7ae6be2f1544

#proxy-server ip地址
#proxy-server地址
server.host=127.0.0.1

#proxy-server 内部通信端口
#是否开启ssl通信,如果开启,server.port配置成对应的服务器端的ssl端口
ssl.enable=false
ssl.jksPath=test.jks
ssl.keyStorePassword=123456

#客户端与proxy-server通信端口
#default ssl port is 4993
server.port=4900
```

Expand All @@ -74,3 +78,8 @@ server.port=4900
- 安装java运行环境
- linux(mac)环境中运行bin目录下的 startup.sh
- windows环境中运行bin目录下的 startup.bat

#### 其他

- 后面是将自己电脑从日本VPS代理出去测试的一个地址,大家可以访问试试 http://devbook.thingsglobal.org/
- 对于正常网站,80和443端口只有一个,可以和 https://github.com/ffay/proxygateway 这个项目或nginx配合使用,不同域名反向代理到内部其他端口上去,再由其他端口映射到内网即可;对于ssh或远程桌面等可随意选择其他未占用的端口映射到内网
6 changes: 3 additions & 3 deletions proxy-server/webpages/lanproxy-config/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1">
<title>LanPrxoy-内网穿透工具</title>
<title>LanProxy-内网穿透工具</title>
<link rel="stylesheet" href="/lanproxy-config/layui/css/layui.css">
<style type="text/css">
.main-content {
Expand All @@ -15,7 +15,7 @@
<body>
<div class="layui-layout layui-layout-admin">
<div class="layui-header">
<div class="layui-logo">LanPrxoy内网穿透</div>
<div class="layui-logo">LanProxy内网穿透</div>
<ul class="layui-nav layui-layout-right">
<li class="layui-nav-item"><a href="javascript:;" class="logout">退出</a></li>
</ul>
Expand All @@ -31,7 +31,7 @@

<div class="layui-footer">
<!-- 底部固定区域 -->
LanPrxoy内网穿透工具
LanProxy内网穿透工具
</div>
</div>
<script src="/lanproxy-config/layui/layui.js"></script>
Expand Down
Binary file removed webconfig.png
Binary file not shown.
Binary file added webconfig01.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added webconfig02.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8c76688

Please sign in to comment.