登录
注册
写文章
发现
工具
frp内网穿透v0.44.0
_3t3lfz KEKfID
编辑文章
frp内网穿透v0.44.0
asfx站长
2023.06.30 15:47:10
阅读
502
最近用老的方式在服务器上安装frp的时候遇到错误,提示 ``` mv: cannot stat ‘frp_0.20.0_linux_amd64/frps’ ``` 现在改用下载tar包,手动改配置的方式安装。步骤如下: ####1.在线下载或自己下载tar包丢到服务器上: ``` wget https://github.com/fatedier/frp/releases/download/v0.44.0/frp_0.44.0_linux_amd64.tar.gz mkdir /opt/module tar -zxvf frp_0.44.0_linux_amd64.tar.gz -C /opt/module cd /opt/module mv frp_0.44.0_linux_amd64 frp ``` ####2.改配置: ``` cd frp vi frps.ini ``` 修改内容如下: ``` # [common] is integral section [common] # A literal address or host name for IPv6 must be enclosed # in square brackets, as in "[::1]:80", "[ipv6-host]:http" or "[ipv6-host%zone]:80" bind_addr = 0.0.0.0 bind_port = 5443 # udp port used for kcp protocol, it can be same with 'bind_port' # if not set, kcp is disabled in frps kcp_bind_port = 5443 # if you want to configure or reload frps by dashboard, dashboard_port must be set dashboard_port = 6443 # dashboard assets directory(only for debug mode) dashboard_user = admin dashboard_pwd = xxx # assets_dir = ./static vhost_http_port = 8888 vhost_https_port = 10443 # console or real logFile path like ./frps.log log_file = ./frps.log # debug, info, warn, error log_level = info log_max_days = 3 # auth token token = token123 # only allow frpc to bind ports you list, if you set nothing, there won't be any limit #allow_ports = 1-65535 # pool_count in each proxy will change to max_pool_count if they exceed the maximum value max_pool_count = 50 # if tcp stream multiplexing is used, default is true tcp_mux = true ``` 启动服务端: ./frps -c ./frps.ini & ####3.客户端配置: ``` [common] server_addr = 自己的服务器公网ip server_port = 5443 token = token123 [myapp] type = http local_ip = 127.0.0.1 local_port = 本机服务端口 custom_domains = 自己的域名 ``` 启动客户端: 用cmd命令开启frp的客户端服务: 进入frp客户端目录,例如我的目录是:C:\dev\frp_0.20.0_windows_amd64 在地址栏输入cmd敲回车,快速进入当下目录的dos窗口,输入下面这行命令进行启动。 frpc.exe -c frpc.ini 提示[api] start proxy success 就表示客户端和服务端已经正常建立连接通信了。
我的主页
退出