-
Notifications
You must be signed in to change notification settings - Fork 71
IpAddress: 添加获取公网IP功能 #119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ttimasdf
wants to merge
9
commits into
zhongyang219:main
Choose a base branch
from
ttimasdf:feat-ipaddress-externalip
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
目前只适配并测试了 IPv4,暂未适配 IPv6,不知道有没有需求。 |
发现插件的定时 poll 函数全都在主线程中被调用的,在主线程中发起 http 请求的时候,如果网络阻塞就会把界面卡死。 得像 Weather 插件一样放到线程里面 |
我发现目前LAN IP好像没有自动更新的机制,可能获取adapter是一个比较重的操作,既然线程机制都实现了,干脆一起加上算了吧 不过这里有个 design choice,就是要不要分别指定LAN IP和WAN IP的更新间隔,如果LAN IP和WAN IP更新间隔相同,那就一个线程全搞定,简单,否则就要写两个线程,代码写两份。 Related issue #114 |
LAN和WAN的地址获取写进一个线程了。用 semophere 大概能保证两个 item 同时调用的时候,也只触发一次更新。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
IExternalIpProvider
扩展其他接口。(挂代理的用户可以用国内的API获取正确的本机地址,ref: ”查看外网IP地址“ 功能增强 TrafficMonitor#516 建议获取外网 IP 的功能使用国内的服务 TrafficMonitor#319)