这篇文章上次修改于 341 天前,可能其部分内容已经发生变化,如有疑问可询问作者。 #### 下载: linux版本: https://github.com/fatedier/frp/releases/download/v0.53.0/frp_0.53.0_linux_amd64.tar.gz windows 版本: https://github.com/fatedier/frp/releases/download/v0.53.0/frp_0.53.0_windows_amd64.zip #### 服务端: 2. 配置frps.service ``` bash [Unit] Description=frps service After=network.target syslog.target Wants=network.target [Service] Type=simple #Restart=always Restart=on-failure RestartSec=5s #启动服务的命令(此处写你的frps的实际安装目录) ExecStart=/www/wwwroot/frp_0.53.0_linux_amd64/frps -c /www/wwwroot/frp_0.53.0_linux_amd64/frps.toml [Install] WantedBy=multi-user.target ``` 3. 配置frps.toml ``` bash [common] bind_addr = 0.0.0.0 #与客户端 绑定端口 bind_port = 7088 #dashboard 用户名 dashboard_user = sf1 #dashboard 密码 dashboard_pwd = sf1 #dashboard 端口,启动成功后可通过浏览器访问如http://ip:7500 dashboard_port = 7500 #设置客户端token,对应客户端有页需要配置 token = 8d262f2b-6dba-4a8d-857e-8a53d1d439e3 log_file = /var/log/frps.log ``` 4. 运行命令: ``` bash cp frps.service /etc/systemd/system/ systemctl enable frps systemctl start frps ``` 5. 查看http://ip:7500/ #### 客户端winodws 1. 配置frpc.toml ```bash # 客户端配置 [common] server_addr = 47.116.11.xxx server_port = 7088 token = 8d262f2b-6dba-4a8d-857e-8a53d1d439e3 [yclj] type = tcp local_ip = 127.0.0.1 local_port = 3317 remote_port = 3317 [vnc] type = tcp protocol = websocket local_ip = 192.168.11.128 local_port = 6083 remote_port = 3083 protocol.websocket.path=/websockify [bt] type = tcp local_ip = 127.0.0.1 local_port = 8888 remote_port = 3888 ``` 2. 启动: ``` frpc.exe -c frpc.ini ```
没有评论