mirror of
https://github.com/qinyuhang/ShadowsocksX-NG-R.git
synced 2026-10-20 14:34:30 +00:00
修正问题
1. 修正Ping test最后通知最快的并不是实际最快的服务器 2. 临时移除 macOS 10.12 Sierra 网速显示的功能,将会有一个提示
This commit is contained in:
@@ -66,7 +66,8 @@ ref: [GitFlow](http://nvie.com/posts/a-successful-git-branching-model/)
|
||||
- [ ] Embed the http proxy server [privoxy](http://www.privoxy.org/).
|
||||
|
||||
## Know Issue
|
||||
[Issue 1.]() Auto PAC & White list is not working on macOS 10.12 Serria because system proxy not allow [file:///](file:///) protocol.
|
||||
Solved [Issue 1.]() Auto PAC & White list is not working on macOS 10.12 Serria because system proxy not allow [file:///](file:///) protocol.
|
||||
[Issue 2.]() The net speed is how ever have some problem with macOS 10.12, welcome logs from all users.
|
||||
|
||||
## License
|
||||
|
||||
|
||||
@@ -26,7 +26,24 @@ public class NetWorkMonitor: NSObject {
|
||||
|
||||
func startUpdateTimer() {
|
||||
timer = NSTimer.scheduledTimerWithTimeInterval(1, target: self, selector: #selector(updateNetWorkData), userInfo: nil, repeats: true)
|
||||
NSRunLoop.currentRunLoop().run()
|
||||
if #available(OSX 10.12, *){
|
||||
|
||||
let alertView = NSAlert()
|
||||
alertView.messageText = "网速显示不支持 macOS 10.12 Sierra!"
|
||||
alertView.informativeText = "因为 macOS 10.12 Sierra ABI 不稳定,因此暂时移除网速功能"
|
||||
alertView.addButtonWithTitle("取消网速显示")
|
||||
alertView.runModal()
|
||||
let defaults = NSUserDefaults.standardUserDefaults()
|
||||
defaults.setBool(false, forKey: "enable_showSpeed")
|
||||
|
||||
// NSRunLoop.currentRunLoop().run()
|
||||
// CFRunLoopRun()
|
||||
|
||||
} else {
|
||||
NSRunLoop.currentRunLoop().addTimer(timer!, forMode: NSRunLoopCommonModes)
|
||||
NSRunLoop.currentRunLoop().run()
|
||||
print(NSRunLoop.currentRunLoop().getCFRunLoop())
|
||||
}
|
||||
}
|
||||
|
||||
func stop(){
|
||||
|
||||
@@ -101,7 +101,7 @@ class PingServers:NSObject{
|
||||
self.fastest = latency
|
||||
self.fastest_id = i
|
||||
}else{
|
||||
if latency < self.fastest{
|
||||
if Int(latency!) < Int(self.fastest!) {
|
||||
self.fastest = latency
|
||||
self.fastest_id = i
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user