Skip to content
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

不能切换了,提示错误 #3

Open
jaylong opened this issue Jun 21, 2014 · 5 comments
Open

不能切换了,提示错误 #3

jaylong opened this issue Jun 21, 2014 · 5 comments

Comments

@jaylong
Copy link

jaylong commented Jun 21, 2014

http://ww3.sinaimg.cn/large/7a5f79a7gw1ehlo1v5wj6j20ai03c3yh.jpg
如图

@kodango kodango added the bug label Jun 21, 2014
@kodango
Copy link
Owner

kodango commented Jun 21, 2014

请问你用的是最新的版本吗?另外,有没有其他详细信息?

@jaylong
Copy link
Author

jaylong commented Jul 15, 2014

貌似是因为以太网的DNS被其他软件给清空了,导致读取不到当前DNS信息,手动随便添加一个之后就切换成功了。另外是否可以考虑开发可以用户添加切换到自定义DNS地址的功能?

@kodango
Copy link
Owner

kodango commented Aug 2, 2014

我上传了一个新版本,把 dns 的配置移到 workflow 的配置框了,你试试。

具体位置是:workflows -> Switch DNS -> 双击 Script Filter -> 参考 Script 输入框

@luosky
Copy link

luosky commented Jun 22, 2015

我用新版本也碰到了这个问题。
我执行 netstat -rn | awk '/default/{print $NF}' 的结果是
ppp0
en0

function get_curr_network_dev()
里的 head -1 改成 tail -1 后可以用了

@metahys
Copy link

metahys commented Oct 27, 2015

(1) SAMSUNG_Android 2
(Hardware Port: Modem (usbmodem1412), Device: usbmodem1412)

(2) SAMSUNG_Android
(Hardware Port: Modem (usbmodem1422), Device: usbmodem1422)

(3) PPPoE
(Hardware Port: USB 以太网, Device: en3)

(4) Wi-Fi
(Hardware Port: Wi-Fi, Device: en0)

(5) USB Ethernet
(Hardware Port: USB Ethernet, Device: en3)

(6) Thunderbolt Bridge
(Hardware Port: Thunderbolt Bridge, Device: bridge0)

(7) iPhone USB
(Hardware Port: iPhone USB, Device: en4)

(8) Bluetooth PAN
(Hardware Port: Bluetooth PAN, Device: en2)

这是我的network service list,如果调用

get_network_service() "en3"

那么返回的是PPPoE,但我实际上此时用的是USB Ethernet...

问题来自于光用device信息并不能判断当前活跃的networkservice,而且活跃的networkservice可能不止一个...
一个妥协方案是用户先设定好服务优先顺序,确保head -1得倒自己想要的服务。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants