mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[GH-ISSUE #1452] Support network condition changes (DDNS) #1144
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#1144
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @loblab on GitHub (Oct 2, 2019).
Original GitHub issue: https://github.com/fatedier/frp/issues/1452
What version of frp are you using (./frpc -v or ./frps -v)?
0.29
What operating system and processor architecture are you using (
go env)?docker 18.06.1-ce go1.10.3 ubuntn 18.04, host: ubuntu 18.04 or 16.04
(docker is not the important factor)
Configures you used:
Simple as examples.
Use domain name (not IP). DDNS
Steps to reproduce the issue:
Case 1:
If I restart the client, it will succeed to connect.
Case 2:
Reboot server side router (the IP address will change, and I am using dynamic DNS).
Describe the results you received:
When network changes, or not ready, connection retrials always fail even the network becomes ready soon.
Describe the results you expected:
Work as the network ready
Additional information you deem important (e.g. issue happens only occasionally):
Always
Can you point out what caused this issue (optional)
Case 1. network not ready as the client reboot, but will ready soon. seems frpc does not resolve the DNS, or using the old resolve results.
Case 2. DNS changes as server router reboot, but will ready soon. frpc still retry on old IP.
Case 1: 客户端操作系统重启时,frpc开机自启动,但网络部分可能没有完全ready(比如DNS)。frpc一直重试失败。但实际上,比如1分钟后,网络就ready了。此时只有手动重启frpc才行。这导致客户端机器重启后不能自动连接。
Case 2: 服务器端路由器重启后,IP地址改变。但我使用的是动态域名,一两分钟后就会正常。但此时客户端一直检测的是与旧的IP地址的连接(我的配置文件里使用的是域名)。所以重试永远不会成功。
Case 3: 服务器端机器重启,未测试。
总而言之,我希望在服务器端或客户端任何重启、或网络状态变化时,对理论上能恢复的情况,都能自动恢复连接。自动、自动、自动!很重要。
frp简单易用。谢谢国人又做了这么好的一款开源软件!
@loblab commented on GitHub (Oct 2, 2019):
A workaround is to use restart:always in docker.
忘了说了,我用docker的restart always也可以解决这个问题,只要frpc连不上就退出就行了。貌似 login_fail_exit = true 是控制这个的(不仅登录不上退出,任何导致连接不上的都退出)。
所以,这个特性对于使用docker的场景,不是很急迫了。
@fatedier commented on GitHub (Oct 5, 2019):
@loblab commented on GitHub (Oct 6, 2019):
@fatedier
Thanks. Yes, systemd can work well with Restart=on-failure.
I set login_fail_exit = false at first time.
If I set login_fail_exit = true, and use "restart on failure" (in systemd or docker), it is not a problem any more.
Thank you for the great software!