👤

重置密码

发送中...
返回登录

FRP配置笔记

资料 122 浏览 1 分钟阅读

frps.toml配置

vi /root/frps/frps.toml

插入

bindPort = 7000
vhostHTTPPort = 8080
auth.method = "token"
auth.token = "token密码"

# 安全配置(按需配置,默认注释)
#transport.tls.force = true
#transport.tls.certFile = "/etc/frp/tls/server.crt"
#transport.tls.keyFile = "/etc/frp/tls/server.key"
#transport.tls.trustedCaFile = "/etc/frp/tls/ca.crt"

# 管理面板
webServer.addr = "0.0.0.0"
webServer.port = 指定端口
webServer.user = "用户名"
webServer.password = "密码"

# 日志
log.to = "/var/log/frps.log"
log.level = "info"
log.maxDays = 3

配置FRPS自启动

vi /etc/systemd/system/frps.service

插入

[Unit]
Description=Frp Server Service
After=network.target
[Service]
User=root
Restart=on-failure
ExecStart=/root/frps/frps -c /root/frps/frps.toml
[Install]
WantedBy=multi-user.target

配置服务自启动

sudo systemctl daemon-reload
sudo systemctl start frps
sudo systemctl enable frps

frpc.toml配置

vi /root/frpc/frpc.toml

插入

serverAddr = "公网服务器IP"
serverPort = 7000
auth.method = "token"
auth.token = "token密码和服务端一致"
[[proxies]]
name = "web"
type = "http"
localPort = 需要映射的端口
customDomains = ["自定义域名"]

配置客户端自启动

vi /etc/systemd/system/frpc.service

插入

[Unit]
Description=Frp Client Service
After=network.target
[Service]
User=root
Restart=on-failure
ExecStart=/root/frpc/frpc -c /root/frpc/frpc.toml
[Install]
WantedBy=multi-user.target

配置服务自启动

sudo systemctl daemon-reload 
sudo systemctl start frpc 
sudo systemctl enable frpc

CentOS7 可用的yum源

curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo

0

  1. 老表~ 来都来了!不打算留个言再走吗?

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注