美文网首页
Frp(frps,frpc) 内网穿透

Frp(frps,frpc) 内网穿透

作者: 坐在河边的蚂蚁 | 来源:发表于2020-10-27 16:50 被阅读0次

    说明


    Frp:https://github.com/fatedier/frp/releases 下载对应的版本。
    我这边使用 Linux 版本。frp_0.34.1_linux_amd64.tar.gz

    第一步:配置 Frps 服务端(可以固定一个服务器)IP(例如:123.456.789.221)


    编辑包中的 frps.ini 文件

    服务端参数说明请移步:https://gofrp.org/docs/reference/server-configures/

    [common]
    bind_port = 7000
    vhost_https_port = 8081
    

    然后启动服务端

    ./frps -c ./frps.ini
    

    第二步:配置 Frpc 客户端(可以是在任意一台服务器上)


    编辑 frpc.ini

    客户端参数说明请移步:https://gofrp.org/docs/reference/client-configures/

    客户端插件说明请移步:https://gofrp.org/docs/features/common/client-plugin/

    [common]
    server_addr = 123.456.789.221(上面的服务端)
    server_port = 7000
    
    [web]
    type = https
    custom_domains = test.yourdomain.com
    
    plugin = https2http
    plugin_local_addr = 127.0.0.1:4999
    
    plugin_crt_path = 证书地址
    plugin_key_path = 证书地址
    plugin_host_header_rewrite = 127.0.0.1
    plugin_header_X-From-Where = frp
    

    然后启动它

    ./frpc -c ./frpc.ini
    

    第三步:将域名解析到你对应的服务器上(123.456.789.221)


    例如:test.yourdomain.com 配置证书然后访问

    https://test.yourdomain.com:8081

    这里 8081 写的就是服务端的 vhost_https_port

    大工告成!

    相关文章

      网友评论

          本文标题:Frp(frps,frpc) 内网穿透

          本文链接:https://www.haomeiwen.com/subject/pspxvktx.html