MAC平台卸载dnscrypt的方法

dnscrypt越来越不好用了,起不到应用的作用还经常自动重置DNS地址,干脆卸载算了。于是经过一番搜索后找到了卸载的方法。


打开这个项目的git页面:https://github.com/opendns/dnscrypt-osx-client



下载里边的Apple脚本执行就搞定了。

或者复制粘贴执行下面的脚本,总之内容都是一样的。

set question to display dialog "Do you really want to uninstall DNSCrypt from this computer?" buttons {"Yes", "No"} default button "No" giving up after 10
set answer to button returned of question

if answer is equal to "Yes" then
	do shell script "cd /Library/PreferencePanes/DNSCrypt.prefPane/Contents/Resources/usr/scripts ; /Library/PreferencePanes/DNSCrypt.prefPane/Contents/Resources/usr/scripts/set-dns-to-dhcp.sh; pkill -f '/Applications/System Preferences.app';launchctl remove com.opendns.osx.DNSCryptMenuBar; launchctl remove com.opendns.osx.DNSCryptConfigUpdater; launchctl remove com.opendns.osx.DNSCryptAfterboot; launchctl remove com.opendns.osx.DNSCryptConsoleChange; launchctl remove com.opendns.osx.DNSCryptControlChange; launchctl remove com.opendns.osx.DNSCryptNetworkChange; rm -f /var/run/dnscrypt*; pkill dns-updater; pkill DNSCrypt-Menubar; sleep 5; for i in '/Library/LaunchDaemons/com.opendns.osx.DNSCryptAfterboot.plist' '/Library/LaunchDaemons/com.opendns.osx.DNSCryptConsoleChange.plist' '/Library/LaunchDaemons/com.opendns.osx.DNSCryptControlChange.plist' '/Library/LaunchDaemons/com.opendns.osx.DNSCryptNetworkChange.plist' '/Library/LaunchAgents/com.opendns.osx.DNSCryptMenuBar.plist' '/Library/LaunchDaemons/com.opendns.osx.DNSCryptConfigUpdater.plist' '/Applications/DNSCrypt-Menubar.app' '/Library/Application Support/DNSCrypt Updater' '/Library/Application Support/DNSCrypt' ~'/Library/Application Support/DNSCrypt Prefpane' '/Library/PreferencePanes/DNSCrypt.prefPane' '/usr/local/sbin/dnscrypt-proxy' '/usr/local/bin/alarmer' '/usr/local/bin/hostip' '/usr/local/share/man/man8/hostip.8' '/usr/local/share/man/man8/dnscrypt-proxy.8' '/usr/local/lib/dnscrypt-proxy' '/usr/local/share/dnscrypt-proxy' '/var/log/dnscrypt-query.log'; do rm -fr \"$i\"; done" with administrator privileges
	display alert "DNSCrypt has been sucessfully removed from this computer."
end if


不过这个应用的menu bar却不一定会卸载掉,就像图中这样。

1.删除Applications文件夹中的

2.删除/Library/LaunchDaemons文件夹中的以下文件:



如果出现无法删除的情况,删除前先强制退出应用。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值