欢迎来到德薄能鲜网

德薄能鲜网

内网穿透!frp新版0.56.0的配置文件如何配置?.toml:提供web、samba、远程连接ssh示例

时间:2025-06-24 12:14:54 阅读(143)

最新版本的frp在配置上与以前大不相同c;需要使用.配置toml文件。toml文件内部出现了主要问题。所以,本文将讨论这个问题。

一、服务端配置。

下载并解压#xff08;以debian系统为例):

sudo apt updatesudo apt install wgetwget https://github.com/fatedier/frp/releases/download/v0.56.0/frp_0.56.0_linux_amd64.tar.gztar -xvf frp_0.56.0_linux_amd64.tar.gzcd frp_0.56.0_linux_amd64。

注意版:服务系统版(linux、windows)、硬件CPU版(arm、#xff09amd等。;对应的不是相同的文件。

frps配置文件.toml:

bindPort = 7000vhostHTTPPortttport = 8080。

frps配置文件.toml:

bindPort = 7000vhostHTTPPortttport = 8080.

其中vhosthttport是http的监控,要使用https设置vhosthttpsport。

操作:

  1. ./frps -c ./frps.toml。随机自动启动:创建服务文件。: 在。/etc/systemd/system/。在目录下创建一个名字。

  2. frps.service。的文件。编辑服务文件。: 编辑。
    frps.service。

    文件,以下内容如下:

     。

  3. [Unit]Description=frps serviceAfter=network.target[Service]Type=simpleExecStart=//你的frps地址/frps -c //你的frps地址/frps.tomlRestart=on-failureRestartSec=5s[Install]WantedBy=multi-user.target。

    注意替换您的实际frps路径。
  4. 注意替换您的实际frps路径。
    启动服务:

    systemctl enable frps.servicesystemctl start frps.service。

检查服务状态:

 。

systemctl status frps.service。

二、客户端配置:        客户端安装同一服务端󿀌配置frpc.toml文件内容为:

serverAddr = "IP地址或域名"serverPort = 7000[[proxies]]name = "web"type = "http"localPort = 80customdomainsnsnsns = ["域名"][[proxies]]name = "samba"type = "tcp"localIP = "127.0.0.1"localPort = 445remotePorte = 4450[[proxies]]name = "ssh"type = "tcp"localIP = "127.0.0.1"localPort = 22remoteporteport = 6000。运行和自动启动也参考服务端󿀌唯一的区别是需要使用客户端操作。

运行和自动启动也参考服务端󿀌唯一的区别是需要使用客户端操作。

frpc -c frpc.toml。＀配置文件c;samba和ssh指定的服务器端口。记得在服务器端放行remotePort!!到目前为止,已完成配置󿀌记得将22个端口修改为6000,需要修改的samba连接端口为4450。

分享到:

温馨提示:以上内容和图片整理于网络,仅供参考,希望对您有帮助!如有侵权行为请联系删除!

友情链接: