注册 登录
n/program · 2024-11-13 · 560 次浏览
u/zhiwenwang白银
n/programu/zhiwenwang · 2024-11-13

关于frp使用中的一点思考

之前的frp一直使用默认设置,发现连接的时候总是断断续续的,有时候很快连上,有时候等半天都连不上。通过抓包,发现本机到服务器很快,服务器上的面板也显示内网设备正常连接。今天将内网客户端的传输协议改成websocket后,连接变成了一点即开。思考,frp的tcp模式应该是断断续的,应该是90s的心跳,连上后过一段就会断,使用websocket长效保持协议,避免了这种断续,不知理解是否正确。也给各位老板设置提供参考

0
10
登录后参与讨论。
海外原生IP VPS,稳定访问全球网络

还在为IP不纯、平台风控、频繁验证而烦恼? 丽萨主机海外原生IP VPS,双ISP住宅IP,覆盖美国、香港、日本、新加坡、台湾、德国、越南、英国等热门地区,适合跨境电商、社媒运营、AI工具、流媒体及海外业务使用。

lisahost.com 了解更多

10 条回复

排序
  1. alay 铂金 3 YEARS 2024-11-13

    @"zhiwenwang"#p150983

    我都是用这个

    ```
    transport.protocol = "quic"
    ```
    
    0
  2. zhiwenwang 白银 楼主 2024-11-13

    @"alay"#p151036 本来也想用这个,但是听说运营商会封quic 就没用

    0
  3. alay 铂金 3 YEARS 2024-11-13

    @"zhiwenwang"#p151072 还有这个说法 ?

    0
  4. heiyu 🌩 钻石 2 YEARS 2024-11-13

    你们用frp是为了什么?

    0
  5. zhiwenwang 白银 楼主 2024-11-13

    @"heiyu"#p151150 家里搭了nas ,平时就ZeroTier 或者Tailscale 穿透,FRP可以给别人分享特定内容,或者在没装穿透的设备上用

    0
  6. zhiwenwang 白银 楼主 2024-11-13

    @"alay"#p151140 有,我看经常有人反馈封了quic

    0
  7. age98 白银 2024-11-13

    配置贴一下,学习一下,我就用stcp了,不知道还有其他协议

    0
  8. zhiwenwang 白银 楼主 2024-11-13

    @"age98"#p151517 服务端
    bindAddr = "0.0.0.0"
    bindPort = 8553

    transport.heartbeatTimeout = 90
    transport.maxPoolCount = 50

    vhostHTTPPort = 80
    vhostHTTPSPort = 7000

    webServer.addr = "0.0.0.0"
    webServer.port = 8443
    webServer.user = "~~*~~"
    webServer.password = "
    *
    *******~~
    *~~"
    webServer.tls.certFile = "/etc/tls/
    *
    *****~~~~.crt"
    webServer.tls.keyFile = "/etc/tls/
    ******.key"

    log.to = "enable"
    log.level = "info"
    log.maxDays = 3

    auth.method = "token"
    auth.token = "~~*~~"
    客户端
    serverAddr = "
    *
    *******~~
    *~~"
    serverPort = 8553
    auth.method = "token"
    auth.token = "
    *
    ********"
    transport.protocol = "websocket"
    transport.tcpMux = true

    [[proxies]]
    name = "dsm"
    type = "https"
    localIP = "192.168.1.2"
    localPort = 5001
    customDomains = ["*********"]

    [[proxies]]
    name = "web"
    type = "https"
    localIP = "192.168.1.3"
    localPort = 443
    customDomains = ["*********"]

    0
  9. age98 白银 2024-11-14

    GOOD,学习了,多谢

    0
  10. smlqbzd 白银 2024-11-15

    学习了

    0