fatedier / frp

A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.
Apache License 2.0
85.26k stars 13.23k forks source link

frpc 客户端命令行是如何实现自动上线功能的? #1124

Closed clarkshu1016 closed 5 years ago

clarkshu1016 commented 5 years ago

Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly. (为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。)

Use the commands below to provide key information from your environment: You do NOT have to include this information if this is a FEATURE REQUEST

What version of frp are you using (./frpc -v or ./frps -v)? 0.25.0

What operating system and processor architecture are you using (go env)? Android armv7 Nexus5x

想问一下 frpc客户端如何在网络连接成功的情况下实现了 自动上线? 原理是什么,是不断用ping去检测是否开启网络吗 ? 这块代码具体在哪里?

fatedier commented 5 years ago

自动上线是什么?

clarkshu1016 commented 5 years ago

我在安卓手机上运行了 frpc 命令行,并且通过dashboard查看该设备已经在线,这时候我人为打开手机飞行模式,设备会变成离线,最后我再人为关闭飞行模式 网络恢复正常,frpc客户端自动会上线,无需人工干预,想具体问一下是如何做到frpc客户端自动发现设备已联网实现上线的功能

fatedier commented 5 years ago

断线重连,心跳检测,都是常规的方法。

1070148808 commented 3 years ago

Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly. (为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。)

Use the commands below to provide key information from your environment: You do NOT have to include this information if this is a FEATURE REQUEST

What version of frp are you using (./frpc -v or ./frps -v)? 0.25.0

What operating system and processor architecture are you using (go env)? Android armv7 Nexus5x

想问一下 frpc客户端如何在网络连接成功的情况下实现了 自动上线? 原理是什么,是不断用ping去检测是否开启网络吗 ? 这块代码具体在哪里?

你好,您用的arm64的frpc跑在android平台上的么;目前使用pixel4,android10版本下执行frpc,显示login to server failed: EOF