1 云服务器安全组TCP端口配置开放8803
2 云服务器防火墙端口开放配置(centos)
firewall-cmd --zone=public --add-port=8803/tcp –permanent
firewall-cmd –reload
3 云服务器frps配置()
[common]
bind_addr = 0.0.0.0
bind_port = 7000
bind_udp_port = 7001
kcp_bind_port = 7000
vhost_http_port = 8800
vhost_https_port = 8801
vhost_http_timeout = 60
dashboard_addr = 0.0.0.0
dashboard_port = 7500
dashboard_user = xxx
dashboard_pwd = xxxxxx
token = 123456
4 本地frpc配置
[common]
token = 123456
#frps服务器运行公网ip
server_addr = x.x.x.x
#frps与frpc通信端口
server_port = 7000
# set admin address for control frpc's action by http api such as reload
admin_addr = 127.0.0.1
admin_port = 8888
admin_user = admin
admin_pwd = admin
[xly_tcp]
type = tcp
local_ip = 127.0.0.1
local_port = 8900
remote_port = 8803
5 启动服务器frps 和本地frpc,frpc正常如下提示
6 配置java程序运行环境,根据自己的程序配置,我的配置如下
程序启动端口,或者本地Tomcat端口为local_port = 8900