下载
简易搭建
# bindPort为frps和frpc通信的端口,需要在防火墙中放行该端口 bindPort = 12000# 服务端将只接受 TLS链接 transport.tls.enable = true # frps的连接密码 auth.token = "token" # Server Dashboard,可以查看frp服务状态以及统计信息 webServer.addr = "0.0.0.0" # 后台管理地址 webServer.port = 8500 # 后台管理端口 webServer.user = "user" # 后台登录用户名 webServer.password = "password" # 后台登录密码
# frpc.toml serverAddr = "111.222.333.444" transport.tls.enable = true serverPort = 12000 # 公网服务端通信端口 auth.token = "token" # 令牌,与公网服务端保持一致 [[proxies]] name = "http" type = "tcp" localIP = "127.0.0.1" # 需要暴露的服务的 IPlocalPort = 9000 # 将本地9000端口的服务暴露在公网的12300端口 remotePort = 12300 # 暴露服务的公网入口 [[proxies]] name = "ssh" type = "tcp" localIP = "127.0.0.1" localPort = 22 remotePort = 12400
frps开机启动 ubuntu
[Unit] # 服务名称,可自定义 Description = frp-server After = network.target syslog.target Wants = network.target [Service] Restart=on-failure RestartSec=5 Type = simple # 启动命令 ExecStart = /path/to/frps -c /path/to/frps.toml [Install] WantedBy = multi-user.target # 修改完后, 将此文件拷贝至/etc/systemd/system/ 执行以下命令 # 刷新服务列表 # sudo systemctl daemon-reload # 设置开机自启 # sudo systemctl enable frps.service# 启动服务 # sudo systemctl start frps.service # 查看启动状态 # sudo systemctl status frps.service # 查看失败信息# sudo journalctl -u frps.service
推荐本站淘宝优惠价购买喜欢的宝贝:
本文链接:https://hqyman.cn/post/8587.html 非本站原创文章欢迎转载,原创文章需保留本站地址!
休息一下~~