frp新版本frp_0.52.3设置

服务端

frps.toml

cp /root/frp/frpc /usr/bin

#bindPort = 7000
bindPort = 7000
 
# 如果指定了“oidc”,将使用 OIDC 设置颁发 OIDC(开放 ID 连接)令牌。默认情况下,此值为“令牌”。auth.method = “token”
auth.method = "token"
# 身份验证令牌 auth.token = “密码”
auth.token = "密码"
 
# 配置 Web 服务器以启用 frps 的仪表板。
webServer.addr = "0.0.0.0"
webServer.port = 7001
webServer.user = "admin"
webServer.password = "密码"

frps.toml
serverAddr 修改为frps部署服务器ip
auth.token 需修改为frps部署服务器配置中的auth.token一致

vim /etc/systemd/system/frps.service

[Unit]
# 服务名称,可自定义
Description = frp server
After = network.target syslog.target
Wants = network.target

[Service]
Type = simple
# 启动frps的命令,需修改为您的frps的安装路径
ExecStart = /usr/bin/frps -c /root/frp/frps.toml

[Install]
WantedBy = multi-user.target

 systemctl restart frps && systemctl enable frps 

客户端

frpc.toml

cp /root/frp/frpc /usr/bin

vim /etc/systemd/system/frpc.service 


[Unit]
# 服务名称,可自定义
Description = frp server
After = network.target syslog.target
Wants = network.target

[Service]
Type = simple
# 启动frps的命令,需修改为您的frps的安装路径
ExecStart = /usr/bin/frpc -c /root/frp/frpc.toml

[Install]
WantedBy = multi-user.target

frpc.toml

serverAddr = "*.*.*.*"
serverPort = 7000

# 如果指定了“oidc”,将使用 OIDC 设置颁发 OIDC(开放 ID 连接)令牌。默认情况下,此值为“令牌”。auth.method = “token”
auth.method = "token"
# 身份验证令牌 auth.token = “密码自行设置”
auth.token = "*密码"

[[proxies]]
name = "ssh"
type = "tcp"
localIP = "127.0.0.1"
localPort = 22
remotePort = 22

[[proxies]]
name = "81"
type = "tcp"
localIP = "127.0.0.1"
localPort = 81
remotePort = 81

你可能感兴趣的:(java,前端,开发语言)