frp内网穿透

首先的有一个可以使用公网IP的服务器。

先下载 wget https://github.com/fatedier/frp/releases/download/v0.13.0/frp_0.13.0_linux_amd64.tar.gz

解压tar -zxvf  frp_0.13.0_linux_amd64.tar.gz

配置服务端

[common]

bind_addr = 0.0.0.0

bind_port = 8999

bind_udp_port = 8999

kcp_bind_port = 8999

vhost_http_port = 8080

vhost_https_port = 8443

token = 123456789

 

配置客户端

[common]

server_addr = 47.103.122.205

server_port = 8999

token = 123456789

 

; ssh

[ssh]

type = tcp

local_ip = 127.0.0.1

local_port = 22

remote_port = 8998

 

;redis

[redis]

type = tcp

local_ip = 127.0.0.1

local_port = 46379

remote_port = 8997

 

; mysql_m

[mysql_m]

type = tcp

local_ip = 127.0.0.1

local_port = 43306

remote_port = 8996

 

; mysql_s

[mysql_s]

type = tcp

local_ip = 127.0.0.1

local_port = 43307

remote_port = 8995

 

; zookeeper

[zookeeper]

type = tcp

local_ip = 127.0.0.1

local_port = 42181

remote_port = 8994

 

; kafka_1

[kafka_1]

type = tcp

local_ip = 127.0.0.1

local_port = 49091

remote_port = 8993

 

; kafka_2

[kafka_2]

type = tcp

local_ip = 127.0.0.1

local_port = 49092

remote_port = 8992

 

; kafka_3

[kafka_3]

type = tcp

local_ip = 127.0.0.1

local_port = 49093

remote_port = 8991

 

[web1]

type = http

local_port = 80

custom_domains = xypj.xyz

 

[web2]

type = http

local_port = 80

custom_domains = cc.xypj.xyz

 

 

然后设置自动启动,使用systemctl管理。

服务端

vim /lib/systemd/system/frps.service

[Unit]
Description=fraps service
After=network.target syslog.target
Wants=network.target

[Service]
Type=simple
#启动服务的命令(此处写你的frps的实际安装目录)
ExecStart=/your/path/frps -c /your/path/frps.ini

[Install]
WantedBy=multi-user.target
 

客户端

vim /lib/systemd/system/frpc.service

[Unit]
Description=frapc service
After=network.target syslog.target
Wants=network.target

[Service]
Type=simple
#启动服务的命令(此处写你的frps的实际安装目录)
ExecStart=/your/path/frpc -c /your/path/frpc.ini

[Install]
WantedBy=multi-user.target

然后

systemctl start frps

systemctl start frpc

systemctl enable frps

systemctl enable frpc

如果要重启应用,可以这样,sudo systemctl restart frps
如果要停止应用,可以输入,sudo systemctl stop frps
如果要查看应用的日志,可以输入,sudo systemctl status frps

 

Github下载地址:https://github.com/XLAccount/MiaoBo 项目详解地址:http://www.code4app.com/blog-843201-350.html 快速集成RTMP的视频推流教程:http://www.code4app.com/blog-843201-315.html ffmpeg常用命令操作:http://www.code4app.com/blog-843201-326.html #关于IJKMediaFramework/IJKMediaFramework.h找不到的问题,下载后直接拉到项目中即可 下载地址:https://pan.baidu.com/s/1boPOomN 密码::9yd8 #BUG修复: 解决登录程序偶尔崩溃,修复轮播图片和页面控制器叠加等问题,修复新浪授权登录 (2016.9.7) 解决程序运行中偶尔崩溃问题,解决连续下拉刷新崩溃问题,优化代码 (2016.9.8) 优化直播页面,减少不必要的性能消耗,增加用户体验 (2016.9.11) 适配5s以上的机型除了6sPlus和6Plus延迟较大外,其余延迟都较小,网速好的话可以忽略不计 (2016.9.12) 新版本极大优化程序性能,修复关注数据异常等小问题,重新布局热门页面,减少因反复加载带来的性能消耗 (2016.9.13) 增加个人中心页面,采用下拉放大图片 ➕ 波纹效果 (2016.9.14) ![image text](https://github.com/XLAccount/ALLGIFS/blob/master/psb.gif) 展示图片 ![image](https://github.com/XLAccount/ALLGIFS/blob/master/psb-1.gif) 展示图片 ![image text](https://github.com/XLAccount/ALLGIFS/blob/master/psb-2.gif) 展示图片 ![image text](https://github.com/XLAccount/ALLGIFS/blob/master/psb-3.gif) 展示图片 感谢大神Monkey_ALin http://www.jianshu.com/users/9723687edfb5/latest_articles 的demo支持
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值